Skip to content

Commit

Permalink
pipeline: Run cosa kola --basic-qemu-scenarios
Browse files Browse the repository at this point in the history
So we test NVMe root disk, Secure Boot etc.
See coreos/coreos-assembler#1029
  • Loading branch information
cgwalters authored and jlebon committed Jan 15, 2020
1 parent 46521e4 commit 90956f3
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,21 @@ node {
}
}

// Parse and handle the result of Kola
boolean checkKolaSuccess(currentBuild) {
// archive the image if the tests failed
def report = readJSON file: "tmp/kola/reports/report.json"
def result = report["result"]
print("kola result: ${result}")
if (result != "PASS") {
utils.shwrap("coreos-assembler compress --compressor xz")
archiveArtifacts "builds/latest/**/*.qcow2.xz"
currentBuild.result = 'FAILURE'
return false
}
return true
}

// Share with the Fedora testing account so we can test it afterwards
FEDORA_AWS_TESTING_USER_ID = "013116697141"

Expand Down Expand Up @@ -282,6 +297,17 @@ podTemplate(cloud: 'openshift', label: pod_label, yaml: pod) {
""")
}

stage('Kola:QEMU basic') {
utils.shwrap("""
cosa kola run --basic-qemu-scenarios || :
tar -cf - tmp/kola/ | xz -c9 > kola-basic.tar.xz
""")
archiveArtifacts "kola-basic.tar.xz"
}
if (!checkKolaSuccess(currentBuild)) {
return
}

stage('Kola:QEMU') {
// leave 512M for overhead; VMs are 1G each
def parallel = ((cosa_memory_request_mb - 512) / 1024) as Integer
Expand All @@ -291,13 +317,7 @@ podTemplate(cloud: 'openshift', label: pod_label, yaml: pod) {
""")
archiveArtifacts "_kola_temp.tar.xz"
}

// archive the image if the tests failed
def report = readJSON file: "tmp/kola/reports/report.json"
if (report["result"] != "PASS") {
utils.shwrap("coreos-assembler compress --compressor xz")
archiveArtifacts "builds/latest/**/*.qcow2.xz"
currentBuild.result = 'FAILURE'
if (!checkKolaSuccess(currentBuild)) {
return
}

Expand Down

0 comments on commit 90956f3

Please sign in to comment.