2020-12-11 22:36:10 +01:00
|
|
|
pipeline {
|
|
|
|
agent any
|
|
|
|
|
|
|
|
options {
|
|
|
|
buildDiscarder(logRotator(numToKeepStr: '12', artifactNumToKeepStr: '14'))
|
2021-02-21 16:45:14 +01:00
|
|
|
sidebarLinks([
|
|
|
|
[displayName: 'Gitea Repository', iconFileName: 'Yerbacon.png', urlName: 'https://gits.username404.fr/Username404-59/Yerbacon/src/branch/' + env.BRANCH_NAME]
|
|
|
|
])
|
2020-12-11 22:36:10 +01:00
|
|
|
}
|
|
|
|
triggers {
|
|
|
|
pollSCM('*/10 * * * *')
|
|
|
|
}
|
|
|
|
stages {
|
|
|
|
stage('Build') {
|
|
|
|
steps {
|
|
|
|
echo 'Building..'
|
|
|
|
cmakeBuild buildDir: 'cmake-build-release', buildType: 'release', cleanBuild: true, installation: 'Main'
|
2021-02-14 13:54:14 +01:00
|
|
|
cmakeBuild buildDir: 'cmake-build-release-arm', buildType: 'release', cleanBuild: true, installation: 'Main',
|
2021-02-14 14:17:16 +01:00
|
|
|
cmakeArgs: '-DCMAKE_C_COMPILER=/usr/bin/arm-linux-gnueabi-gcc -DCMAKE_CXX_COMPILER=/usr/bin/arm-linux-gnueabi-g++ -DCMAKE_LINKER=/usr/bin/arm-linux-gnueabi-ld.gold -DCMAKE_AR=/usr/bin/arm-linux-gnueabi-ar -DCPACK_GENERATOR="TGZ;STGZ"'
|
2020-12-11 22:36:10 +01:00
|
|
|
cmakeBuild buildDir: 'cmake-build-release-win32', buildType: 'release', cleanBuild: true, installation: 'Main',
|
2021-02-14 14:12:19 +01:00
|
|
|
cmakeArgs: '-DCMAKE_C_COMPILER=/usr/bin/i686-w64-mingw32-gcc -DCMAKE_CXX_COMPILER=/usr/bin/i686-w64-mingw32-c++ -DCMAKE_SYSTEM_PROCESSOR=i686'
|
2020-12-11 22:36:10 +01:00
|
|
|
cmake arguments: '--build ./cmake-build-release --target ybcon -- -j 9', installation: 'Main'
|
2021-02-14 14:12:19 +01:00
|
|
|
cmake arguments: '--build ./cmake-build-release-win32 --target ybcon -- -j 9', installation: 'Main'
|
2020-12-11 22:36:10 +01:00
|
|
|
cpack installation: 'Main', workingDir: 'cmake-build-release'
|
2021-02-14 13:54:14 +01:00
|
|
|
cpack installation: 'Main', workingDir: 'cmake-build-release-arm'
|
2020-12-11 22:36:10 +01:00
|
|
|
cpack installation: 'Main', workingDir: 'cmake-build-release-win32'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
stage('Deploy') {
|
|
|
|
steps {
|
|
|
|
echo 'Deploying....'
|
2021-02-14 13:54:14 +01:00
|
|
|
dir('cmake-build-release') { archiveArtifacts artifacts:'*.deb, *.rpm, *.tar.gz, *.sh', fingerprint: false }
|
2021-02-14 14:49:33 +01:00
|
|
|
dir('cmake-build-release-arm') { zip zipFile: './Yerbacon-ARM_lpkg.zip', archive: true, glob: "*.tar.gz, *.sh" }
|
2021-02-14 13:54:14 +01:00
|
|
|
dir('cmake-build-release-win32') { archiveArtifacts artifacts:'*.exe', fingerprint: false }
|
2020-12-11 22:36:10 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|