2019-07-11 14:23:35 +00:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
triggers {
|
2021-07-28 12:20:14 +00:00
|
|
|
cron(env.BRANCH_NAME == 'main' ? 'H 0 * * *' : '')
|
2019-07-11 14:23:35 +00:00
|
|
|
}
|
|
|
|
options {
|
|
|
|
timestamps()
|
|
|
|
timeout(time: 1, unit: 'HOURS')
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('test') {
|
2021-07-28 12:20:14 +00:00
|
|
|
when { branch 'main' }
|
2019-07-11 14:23:35 +00:00
|
|
|
steps {
|
|
|
|
dir('app/src/androidTest/java/org/mozilla/fenix/syncIntegration') {
|
|
|
|
sh 'pipenv install'
|
|
|
|
sh 'pipenv check'
|
|
|
|
sh 'pipenv run pytest'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
always {
|
|
|
|
script {
|
2021-07-28 12:20:14 +00:00
|
|
|
if (env.BRANCH_NAME == 'main') {
|
2019-07-11 14:23:35 +00:00
|
|
|
publishHTML(target: [
|
|
|
|
allowMissing: false,
|
|
|
|
alwaysLinkToLastBuild: true,
|
|
|
|
keepAll: true,
|
2020-03-04 15:56:56 +00:00
|
|
|
reportDir: 'app/src/androidTest/java/org/mozilla/fenix/syncintegration/results',
|
2019-07-11 14:23:35 +00:00
|
|
|
reportFiles: 'index.html',
|
|
|
|
reportName: 'HTML Report'])
|
2020-02-27 21:32:24 +00:00
|
|
|
}
|
2019-07-11 14:23:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
failure {
|
2020-02-27 21:32:24 +00:00
|
|
|
script {
|
2021-07-28 12:20:14 +00:00
|
|
|
if (env.BRANCH_NAME == 'main') {
|
2020-02-27 21:32:24 +00:00
|
|
|
slackSend(
|
|
|
|
color: 'danger',
|
2020-03-12 15:36:51 +00:00
|
|
|
message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL}HTML_20Report/)")
|
2020-02-27 21:32:24 +00:00
|
|
|
}
|
|
|
|
}
|
2019-07-11 14:23:35 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
fixed {
|
|
|
|
slackSend(
|
|
|
|
color: 'good',
|
2020-03-12 15:36:51 +00:00
|
|
|
message: "FIXED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL}HTML_20Report/)")
|
2019-07-11 14:23:35 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|