From d6fd2a89ed75f8111647e76caa5a2354e34269d2 Mon Sep 17 00:00:00 2001 From: Zakaria Guennoune <83596451+zguennoune02@users.noreply.github.com> Date: Wed, 27 Oct 2021 14:07:52 +0200 Subject: [PATCH] new delivery workflow --- connectors/vmware/Jenkinsfile | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/connectors/vmware/Jenkinsfile b/connectors/vmware/Jenkinsfile index 1f0ac782e..cd115506b 100644 --- a/connectors/vmware/Jenkinsfile +++ b/connectors/vmware/Jenkinsfile @@ -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,30 @@ 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') { + 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*: by ${source.COMMITTER}\n*INFO*: ${e}"