Skip to content

Commit

Permalink
[jenkins]: move cleanup ws into always section in post block
Browse files Browse the repository at this point in the history
  • Loading branch information
lguohan committed Jul 12, 2019
1 parent 5094fee commit 25457ee
Show file tree
Hide file tree
Showing 13 changed files with 36 additions and 22 deletions.
4 changes: 3 additions & 1 deletion jenkins/broadcom/buildimage-brcm-201904/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-aboot-broadcom.swi

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/broadcom/buildimage-brcm-all/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ make SONIC_CONFIG_BUILD_JOBS=1 target/docker-syncd-brcm-rpc.gz target/docker-ptf

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/common/dep-build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -70,13 +70,15 @@ make SONIC_CONFIG_BUILD_JOBS=1 target/files/stretch/ixgbe.ko \

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
8 changes: 2 additions & 6 deletions jenkins/common/sonic-utilities-build-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,9 @@ sudo py.test -v

success {
archiveArtifacts(artifacts: 'sonic-utilities/deb_dist/python-sonic-utilities_1.2-1_all.deb,wheels/sonic_config_engine-1.0-py2-none-any.whl,wheels/swsssdk-2.0.1-py2-none-any.whl, sonic-swss/tests/log/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/common/sonic-utilities-build/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,15 @@ sudo py.test -v

success {
archiveArtifacts(artifacts: 'sonic-utilities/deb_dist/python-sonic-utilities_1.2-1_all.deb,wheels/sonic_config_engine-1.0-py2-none-any.whl,wheels/swsssdk-2.0.1-py2-none-any.whl, sonic-swss/tests/log/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/generic/buildimage-baseimage/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-generic.bin target/sonic-aboot-gener

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/mellanox/buildimage-mlnx-201904/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,15 @@ make SONIC_CONFIG_BUILD_JOBS=1 ENABLE_DHCP_GRAPH_SERVICE=y target/sonic-mellanox

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
8 changes: 2 additions & 6 deletions jenkins/mellanox/buildimage-mlnx-all-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,9 @@ make SONIC_CONFIG_BUILD_JOBS=1 all

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
2 changes: 2 additions & 0 deletions jenkins/mellanox/buildimage-mlnx-all-released-pr/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ make SONIC_CONFIG_BUILD_JOBS=1 all

success {
archiveArtifacts(artifacts: 'target/**')
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
Expand Down
4 changes: 3 additions & 1 deletion jenkins/mellanox/buildimage-mlnx-all/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,15 @@ ENABLE_SYNCD_RPC=y make SONIC_CONFIG_BUILD_JOBS=1 target/docker-syncd-mlnx-rpc.g

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/vs/buildimage-vs-all/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,15 @@ sudo py.test -v

success {
archiveArtifacts(artifacts: 'target/**, platform/vs/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/vs/buildimage-vs-image-201904/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-vs.img.gz

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}
4 changes: 3 additions & 1 deletion jenkins/vs/buildimage-vs-image/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,15 @@ make SONIC_CONFIG_BUILD_JOBS=1 target/sonic-vs.img.gz

success {
archiveArtifacts(artifacts: 'target/**')
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
fixed {
slackSend(color:'#00FF00', message: "Build job back to normal: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
regression {
slackSend(color:'#FF0000', message: "Build job Regression: ${env.JOB_NAME} ${env.BUILD_NUMBER} (<${env.BUILD_URL}|Open>)")
}
always {
cleanWs(disableDeferredWipeout: false, deleteDirs: true, notFailBuild: true)
}
}
}

0 comments on commit 25457ee

Please sign in to comment.