| pipeline { |
| agent { |
| kubernetes { |
| label 'migration' |
| } |
| } |
| tools { |
| maven 'apache-maven-3.5.4' |
| jdk 'oracle-jdk8-latest' |
| } |
| triggers { |
| pollSCM('H/5 * * * *') |
| } |
| stages { |
| stage('Build') { |
| steps { |
| sh 'mvn -T2 -pl '!:org.hawk.updatesite,!:org.hawk.service.server.product,!:org.hawk.service.cli.product' clean install -DfailIfNoTests=false' |
| } |
| } |
| stage('Update website') { |
| when { branch 'master' } |
| steps { |
| sh 'echo Do nothing for now' |
| } |
| } |
| stage('Deploy to OSSRH') { |
| when { branch 'master' } |
| steps { |
| sh 'echo Do nothing for now' |
| } |
| } |
| } |
| post { |
| changed { |
| emailext(body: "${currentBuild.currentResult}: Job ${env.JOB_NAME} build ${env.BUILD_NUMBER}\n More info at: ${env.BUILD_URL}", |
| recipientProviders: [[ |
| $class: "DevelopersRecipientProvider", |
| $class: "RequesterRecipientProvider" |
| ]], |
| subject: "Jenkins Build ${currentBuild.currentResult}: Job ${env.JOB_NAME}") |
| } |
| } |
| } |