Compare commits

..

1 Commits

Author SHA1 Message Date
Thomas Klaehn
09df804967 linux-blackfinn: Add Jenkinsfile
Signed-off-by: Thomas Klaehn <thomas.klaehn@u-blox.com>
2019-03-06 09:00:17 +01:00

37
Jenkinsfile vendored
View File

@ -59,21 +59,40 @@ pipeline {
agent {
label 'deploy'
}
when {
equals expected: "beaglebone-yocto", actual: "${params.MACHINE}"
}
steps {
unstash "deploy_images"
sh "mkdir -p /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}"
sh "mv build/tmp/deploy/images/${params.MACHINE}/zImage /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/zImage || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/Image /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/Image || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/zImage /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/zImage"
sh "mv build/tmp/deploy/images/${params.MACHINE}/am335x-boneblack.dtb /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/am335x-boneblack.dtb"
sh "mv build/tmp/deploy/images/${params.MACHINE}/*.dtb /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE} || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/*.dtbo /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE} || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.wic /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.wic || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.rpi-sdimg /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.rpi-sdimg || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.manifest /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.manifest || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.tar.bz2 /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.tar.bz2 || exit 0"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.wic /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.wic"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.manifest /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.manifest"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.tar.bz2 /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.tar.bz2"
}
}
stage('Deploy images') {
agent {
label 'deploy'
}
when {
equals expected: "raspberrypi3-64", actual: "${params.MACHINE}"
}
steps {
unstash "deploy_images"
sh "mkdir -p /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}"
sh "mv build/tmp/deploy/images/${params.MACHINE}/Image /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/Image"
sh "mv build/tmp/deploy/images/${params.MACHINE}/*.dtb /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}"
sh "mv build/tmp/deploy/images/${params.MACHINE}/*.dtbo /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.rpi-sdimg /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.rpi-sdimg"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.manifest /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.manifest"
sh "mv build/tmp/deploy/images/${params.MACHINE}/console-image-${params.MACHINE}.tar.bz2 /srv/files.blackfinn.de/data/images/${params.BRANCH}/${params.MACHINE}/console-image-${params.MACHINE}.tar.bz2"
}
}
}
// post {
// failure {
// mail to: 'tkl@blackfinn.de',