Jenkinsfile: abort tests if unstash fails
This likely means that we did not build the x86-64 target, so we abort since our test stage does not support other targets yet.
This commit is contained in:
parent
815c457abb
commit
d1dd82cc85
18
contrib/ci/Jenkinsfile
vendored
18
contrib/ci/Jenkinsfile
vendored
@ -122,15 +122,21 @@ pipeline {
|
||||
}
|
||||
stage('test') {
|
||||
agent { label 'gluon-docker-v2' }
|
||||
environment {
|
||||
TMUX = "notmux"
|
||||
}
|
||||
steps {
|
||||
sh label: 'Identify runner', script: 'echo $SLAVE_NAME'
|
||||
unstash 'gluon-x86-64-factory'
|
||||
sh label: 'Unpack image', script: 'gunzip -cd ./output/images/factory/*x86-64*.img.gz > ./image.img'
|
||||
sh label: 'Print python environment', script: 'python3 -m pip freeze'
|
||||
script {
|
||||
try {
|
||||
unstash 'gluon-x86-64-factory'
|
||||
} catch (err) {
|
||||
echo err.getMessage()
|
||||
// Abort here, if we don't have an x86-64 factory image we can't run tests
|
||||
currentBuild.result = 'ABORTED'
|
||||
return
|
||||
}
|
||||
|
||||
sh label: 'Unpack image', script: 'gunzip -cd ./output/images/factory/*x86-64*.img.gz > ./image.img'
|
||||
sh label: 'Print python environment', script: 'python3 -m pip freeze'
|
||||
|
||||
for (f in findFiles(glob: 'tests/*.py')) {
|
||||
timeout(time: 10, unit: "MINUTES") {
|
||||
sh label: "Test ${f.name}", script: "python3 tests/${f.name} --use-tmp-workdir"
|
||||
|
Loading…
Reference in New Issue
Block a user