2020-04-21 09:20:09 +02:00
|
|
|
properties([buildDiscarder(logRotator(numToKeepStr: '50'))])
|
|
|
|
|
2018-11-02 11:57:18 +01:00
|
|
|
stage('Source') {
|
|
|
|
node {
|
|
|
|
sh 'setup_centreon_build.sh'
|
|
|
|
dir('centreon-plugins') {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
sh './centreon-build/jobs/plugins/plugins-source.sh'
|
|
|
|
source = readProperties file: 'source.properties'
|
|
|
|
env.VERSION = "${source.VERSION}"
|
|
|
|
env.RELEASE = "${source.RELEASE}"
|
2018-12-10 11:38:29 +01:00
|
|
|
if (env.BRANCH_NAME == 'master') {
|
|
|
|
withSonarQubeEnv('SonarQube') {
|
|
|
|
sh './centreon-build/jobs/plugins/plugins-analysis.sh'
|
|
|
|
}
|
|
|
|
}
|
2018-11-02 11:57:18 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
stage('Package') {
|
2018-11-07 13:55:01 +01:00
|
|
|
parallel 'all': {
|
2018-11-02 11:57:18 +01:00
|
|
|
node {
|
|
|
|
sh 'setup_centreon_build.sh'
|
2018-11-07 13:55:01 +01:00
|
|
|
sh './centreon-build/jobs/plugins/plugins-package.sh'
|
2018-11-02 11:57:18 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
|
|
|
|
error('Package stage failure.');
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} catch(e) {
|
|
|
|
if (env.BRANCH_NAME == 'master') {
|
|
|
|
slackSend channel: "#monitoring-metrology", color: "#F30031", message: "*FAILURE*: `CENTREON PLUGINS` <${env.BUILD_URL}|build #${env.BUILD_NUMBER}> on branch ${env.BRANCH_NAME}\n*COMMIT*: <https://github.com/centreon/centreon-plugins/commit/${source.COMMIT}|here> by ${source.COMMITTER}\n*INFO*: ${e}"
|
|
|
|
}
|
|
|
|
}
|