Yerbacon/Jenkinsfile

35 lines
1.5 KiB
Plaintext
Raw Normal View History

pipeline {
agent any
options {
buildDiscarder(logRotator(numToKeepStr: '12', artifactNumToKeepStr: '14'))
}
triggers {
pollSCM('*/10 * * * *')
}
stages {
stage('Build') {
steps {
echo 'Building..'
cmakeBuild buildDir: 'cmake-build-release', buildType: 'release', cleanBuild: true, installation: 'Main'
cmakeBuild buildDir: 'cmake-build-release-win32', buildType: 'release', cleanBuild: true, installation: 'Main',
cmakeArgs: '-DCMAKE_C_COMPILER=/usr/bin/i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=/usr/bin/i686-w64-mingw32-c++'
cmake arguments: '--build ./cmake-build-release --target ybcon -- -j 9', installation: 'Main'
cmake arguments: '--build ./cmake-build-release-win32 --target ybcon -- -j 9', installation: 'Main'
cpack installation: 'Main', workingDir: 'cmake-build-release'
cpack installation: 'Main', workingDir: 'cmake-build-release-win32'
}
}
stage('Deploy') {
steps {
echo 'Deploying....'
dir('cmake-build-release') {
archiveArtifacts artifacts:'*.deb, *.rpm, *.tar.gz, *.sh', fingerprint: false
}
dir('cmake-build-release-win32') {
archiveArtifacts artifacts:'*.exe', fingerprint: false
}
}
}
}
}