mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-28 16:14:21 +02:00
add Jenkinsfile for continuous integration.
This commit is contained in:
parent
584d161be6
commit
c3b7bce111
30
centreon-plugins/Jenkinsfile
vendored
Normal file
30
centreon-plugins/Jenkinsfile
vendored
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
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}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
stage('Package') {
|
||||||
|
parallel 'centos7': {
|
||||||
|
node {
|
||||||
|
sh 'setup_centreon_build.sh'
|
||||||
|
sh './centreon-build/jobs/plugins/plugins-package.sh centos7'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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}"
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user