Jenkinsfile (1560B)
1 pipeline { 2 agent any 3 triggers { 4 cron(env.BRANCH_NAME == 'main' ? 'H 0 * * *' : '') 5 } 6 options { 7 timestamps() 8 timeout(time: 1, unit: 'HOURS') 9 } 10 stages { 11 stage('test') { 12 when { branch 'main' } 13 steps { 14 dir('app/src/androidTest/java/org/mozilla/fenix/syncIntegration') { 15 sh 'pipenv install' 16 sh 'pipenv check' 17 sh 'pipenv run pytest' 18 } 19 } 20 } 21 } 22 post { 23 always { 24 script { 25 if (env.BRANCH_NAME == 'main') { 26 publishHTML(target: [ 27 allowMissing: false, 28 alwaysLinkToLastBuild: true, 29 keepAll: true, 30 reportDir: 'app/src/androidTest/java/org/mozilla/fenix/syncintegration/results', 31 reportFiles: 'index.html', 32 reportName: 'HTML Report']) 33 } 34 } 35 } 36 37 failure { 38 script { 39 if (env.BRANCH_NAME == 'main') { 40 slackSend( 41 color: 'danger', 42 message: "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL}HTML_20Report/)") 43 } 44 } 45 } 46 47 fixed { 48 slackSend( 49 color: 'good', 50 message: "FIXED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.BUILD_URL}HTML_20Report/)") 51 } 52 } 53 }