2018-08-29 00:15:31 +02:00
|
|
|
node(label: 'raspberrypi') {
|
2019-08-01 15:57:53 +02:00
|
|
|
def dists = ["stretch", "jessie"]
|
2018-08-29 00:15:31 +02:00
|
|
|
def srcdir = "${WORKSPACE}/src"
|
|
|
|
|
|
|
|
stage('Checkout') {
|
|
|
|
sh "rm -fr ${srcdir}"
|
|
|
|
sh "mkdir ${srcdir}"
|
|
|
|
dir(srcdir) {
|
|
|
|
checkout scm
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
for (int i = 0; i < dists.size(); ++i) {
|
|
|
|
def dist = dists[i]
|
|
|
|
def pkgdir = "package-${dist}"
|
|
|
|
def results = "results-${dist}"
|
|
|
|
|
|
|
|
stage("Prepare source for ${dist}") {
|
|
|
|
sh "rm -fr ${pkgdir}"
|
|
|
|
sh "${srcdir}/prepare-build.sh ${dist} ${pkgdir}"
|
|
|
|
}
|
|
|
|
|
|
|
|
stage("Build for ${dist}") {
|
|
|
|
sh "rm -fr ${results}"
|
|
|
|
sh "mkdir -p ${results}"
|
|
|
|
dir(pkgdir) {
|
2019-09-04 15:53:53 +02:00
|
|
|
sh "DIST=${dist} BRANCH=${env.BRANCH_NAME} pdebuild --use-pdebuild-internal --debbuildopts -b --buildresult ${WORKSPACE}/${results} -- --override-config"
|
2018-08-29 00:15:31 +02:00
|
|
|
}
|
|
|
|
archiveArtifacts artifacts: "${results}/*.deb", fingerprint: true
|
|
|
|
}
|
|
|
|
|
|
|
|
stage("Test install on ${dist}") {
|
2019-09-04 17:55:48 +02:00
|
|
|
sh "BRANCH=${env.BRANCH_NAME} /build/pi-builder/scripts/validate-packages.sh ${dist} ${results}/dump1090-fa_*.deb ${results}/dump1090_*.deb"
|
2018-08-29 00:15:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2019-09-04 15:53:53 +02:00
|
|
|
stage('Deploy to internal repository') {
|
|
|
|
for (int i = 0; i < dists.size(); ++i) {
|
|
|
|
def dist = dists[i]
|
|
|
|
def results = "results-${dist}"
|
|
|
|
sh "/build/pi-builder/scripts/deploy.sh -distribution ${dist} -branch ${env.BRANCH_NAME} ${results}/*.deb"
|
2018-08-29 00:15:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|