Jenkinsfile: Update deprecated 'stage' syntax
parent
41c03fda84
commit
b325c53316
|
@ -1,21 +1,25 @@
|
||||||
|
#!/usr/bin/env groovy
|
||||||
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '30', artifactNumToKeepStr: '10']]])
|
properties([[$class: 'BuildDiscarderProperty', strategy: [$class: 'LogRotator', artifactDaysToKeepStr: '30', artifactNumToKeepStr: '10']]])
|
||||||
|
|
||||||
node('master') {
|
node('master') {
|
||||||
stage 'Pull changes'
|
stage('Pull changes') {
|
||||||
checkout scm
|
checkout scm
|
||||||
|
|
||||||
stage 'Build data'
|
|
||||||
sh 'mkdir -p build'
|
|
||||||
dir('build') {
|
|
||||||
sh '''
|
|
||||||
cmake -DCMAKE_INSTALL_PREFIX=/install -DCOLOBOT_INSTALL_DATA_DIR=/install/data ..
|
|
||||||
make
|
|
||||||
rm -rf install
|
|
||||||
DESTDIR=. make install
|
|
||||||
'''
|
|
||||||
}
|
}
|
||||||
|
|
||||||
stage 'Archive data'
|
stage('Build data') {
|
||||||
sh 'rm -f data.zip'
|
sh 'mkdir -p build'
|
||||||
zip zipFile: 'data.zip', archive: true, dir: 'build/install'
|
dir('build') {
|
||||||
|
sh '''
|
||||||
|
cmake -DCMAKE_INSTALL_PREFIX=/install -DCOLOBOT_INSTALL_DATA_DIR=/install/data ..
|
||||||
|
make
|
||||||
|
rm -rf install
|
||||||
|
DESTDIR=. make install
|
||||||
|
'''
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage('Archive data') {
|
||||||
|
sh 'rm -f data.zip'
|
||||||
|
zip zipFile: 'data.zip', archive: true, dir: 'build/install'
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue