Select Git revision
Jenkinsfile
Jenkinsfile 5.78 KiB
stage('Source') {
node {
sh 'cd /opt/centreon-build && git pull && cd -'
dir('centreon-web') {
checkout scm
}
sh '/opt/centreon-build/jobs/web/3.4/mon-web-source.sh'
source = readProperties file: 'source.properties'
env.VERSION = "${source.VERSION}"
env.RELEASE = "${source.RELEASE}"
}
}
try {
stage('Unit tests') {
parallel 'centos6': {
node {
sh 'cd /opt/centreon-build && git pull && cd -'
sh '/opt/centreon-build/jobs/web/3.4/mon-web-unittest.sh centos6'
}
},
'centos7': {
node {
sh 'cd /opt/centreon-build && git pull && cd -'
sh '/opt/centreon-build/jobs/web/3.4/mon-web-unittest.sh centos7'
step([
$class: 'hudson.plugins.checkstyle.CheckStylePublisher',
pattern: 'codestyle.xml',
usePreviousBuildAsReference: true,
useDeltaValues: true,
failedNewAll: '0'
])
}
}
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
error('Unit tests stage failure.');
}
}
stage('Package') {
parallel 'centos6': {
node {
sh 'cd /opt/centreon-build && git pull && cd -'
sh '/opt/centreon-build/jobs/web/3.4/mon-web-package.sh centos6'
}
},
'centos7': {
node {
sh 'cd /opt/centreon-build && git pull && cd -'
sh '/opt/centreon-build/jobs/web/3.4/mon-web-package.sh centos7'
}
}
if ((currentBuild.result ?: 'SUCCESS') != 'SUCCESS') {
error('Package stage failure.');
}
}
stage('Bundle') {
parallel 'centos6': {
node {
sh 'cd /opt/centreon-build && git pull && cd -'
sh '/opt/centreon-build/jobs/web/3.4/mon-web-bundle.sh centos6'
}
},
'centos7': {
node {
sh 'cd /opt/centreon-build && git pull && cd -'
sh '/opt/centreon-build/jobs/web/3.4/mon-web-bundle.sh centos7'
}
}