Merge pull request #98 from centreon/new-delivery-workflow

enh(ci): New rpm delivery workflow
This commit is contained in:
Zakaria Guennoune 2021-10-27 15:25:36 +02:00 committed by GitHub
commit e1acfcaae1
1 changed files with 15 additions and 1 deletions

View File

@ -9,7 +9,7 @@ stage('Source') {
env.VERSION = "${source.VERSION}"
env.RELEASE = "${source.RELEASE}"
if (env.BRANCH_NAME == 'master') {
withSonarQubeEnv('SonarQube') {
withSonarQubeEnv('SonarQubeDev') {
sh './centreon-build/jobs/vmware/vmware-analysis.sh'
}
}
@ -22,18 +22,32 @@ try {
node {
sh 'setup_centreon_build.sh'
sh './centreon-build/jobs/vmware/vmware-package.sh centos7'
archiveArtifacts artifacts: 'rpms-centos7.tar.gz'
stash name: "rpms-centos7", includes: 'output/noarch/*.rpm'
sh 'rm -rf output'
}
},
'centos8': {
node {
sh 'setup_centreon_build.sh'
sh './centreon-build/jobs/vmware/vmware-package.sh centos8'
archiveArtifacts artifacts: 'rpms-centos8.tar.gz'
stash name: "rpms-centos8", includes: 'output/noarch/*.rpm'
sh 'rm -rf output'
}
}
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
error('Package stage failure.');
}
}
stage('Delivery') {
node {
sh 'setup_centreon_build.sh'
unstash "rpms-centos7"
unstash "rpms-centos8"
sh './centreon-build/jobs/vmware/vmware-delivery.sh'
}
}
} catch(e) {
if (env.BRANCH_NAME == 'master') {
slackSend channel: "#monitoring-metrology", color: "#F30031", message: "*FAILURE*: `CENTREON VMWARE` <${env.BUILD_URL}|build #${env.BUILD_NUMBER}> on branch ${env.BRANCH_NAME}\n*COMMIT*: <https://github.com/centreon/centreon-vmware/commit/${source.COMMIT}|here> by ${source.COMMITTER}\n*INFO*: ${e}"