2022-06-28 15:35:16 +02:00
|
|
|
pipeline {
|
|
|
|
agent { label 'docker' }
|
|
|
|
stages {
|
|
|
|
stage('Build Debian package') {
|
|
|
|
agent {
|
|
|
|
docker {
|
|
|
|
image 'evolix/gbp:bullseye'
|
2022-06-29 13:41:31 +02:00
|
|
|
args '-u root --privileged'
|
2022-06-28 15:35:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
when {
|
|
|
|
branch 'debian'
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
sh 'mk-build-deps --install --remove debian/control'
|
2022-07-11 14:39:50 +02:00
|
|
|
sh 'rm -rf {source,*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt,.git}'
|
2022-06-28 15:35:16 +02:00
|
|
|
sh "gbp clone --debian-branch=$GIT_BRANCH $GIT_URL source"
|
|
|
|
sh 'cd source && git checkout $GIT_BRANCH && gbp buildpackage -us -uc'
|
|
|
|
}
|
|
|
|
archiveArtifacts allowEmptyArchive: true, artifacts: '*.gz,*.bz2,*.xz,*.deb,*.dsc,*.changes,*.buildinfo,lintian.txt'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
stage('Upload Debian package') {
|
|
|
|
when {
|
|
|
|
branch 'debian'
|
|
|
|
}
|
|
|
|
steps {
|
|
|
|
script {
|
|
|
|
sh 'echo Dummy line to remove once something actually happens.'
|
2022-06-29 13:41:31 +02:00
|
|
|
/* No crendentials yet.
|
|
|
|
sh 'rsync -avP bkctld* droneci@pub.evolix.net:/home/droneci/bkctld/'
|
2022-06-28 15:35:16 +02:00
|
|
|
*/
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
post {
|
|
|
|
// Clean after build
|
|
|
|
always {
|
2022-06-28 16:03:11 +02:00
|
|
|
cleanWs()
|
2022-06-28 15:35:16 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|