Skip to content

Commit

Permalink
kola/kolaTestIso: use kola-junit to publish JUnit test results
Browse files Browse the repository at this point in the history
This will allow us to much more easily inspect failing kola tests.
Goes together with coreos/coreos-assembler#3667,
which has more details.

While we're here, use `kola-testiso` as marker since it looks clearer
and for consistency with `kola-upgrade`.
  • Loading branch information
jlebon committed Nov 27, 2023
1 parent b7c3eeb commit b2a97c5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
7 changes: 7 additions & 0 deletions vars/kola.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,13 @@ def call(params = [:]) {
// collect the output
shwrap("cd ${cosaDir} && cosa shell -- tar -C ${outputDir} -c --xz ${id} > ${env.WORKSPACE}/${id}-${token}.tar.xz || :")
archiveArtifacts allowEmptyArchive: true, artifacts: "${id}-${token}.tar.xz"
// skip basic, which isn't native to kola so has a different layout; we can drop
// this once https://github.com/coreos/coreos-assembler/pull/3652 merges
if (id.contains('basic')) {
continue
}
shwrap("cd ${cosaDir} && cosa shell -- /usr/lib/coreos-assembler/kola-junit ${id} ${outputDir}/${id} - > ${env.WORKSPACE}/${id}-${token}.xml || :")
junit allowEmptyResults: true, skipMarkingBuildUnstable: true, skipPublishingChecks: true, testResults: "${id}-${token}.xml"
}
}
}
4 changes: 3 additions & 1 deletion vars/kolaTestIso.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def call(params = [:]) {
// Create a unique output directory for this run of kola
def outputDir = shwrapCapture("cd ${cosaDir} && cosa shell -- mktemp -d ${cosaDir}/tmp/kola-XXXXX")

def id = marker == "" ? "kolatestiso" : "kolatestiso-${marker}"
def id = marker == "" ? "kola-testiso" : "kola-testiso-${marker}"

// We add --inst-insecure here since in CI and in our build pipeline
// the signatures for the metal images won't have been created yet.
Expand All @@ -34,5 +34,7 @@ def call(params = [:]) {
} finally {
shwrap("cd ${cosaDir} && cosa shell -- tar -C ${outputDir} -c --xz ${id} > ${env.WORKSPACE}/${id}-${token}.tar.xz || :")
archiveArtifacts allowEmptyArchive: true, artifacts: "${id}-${token}.tar.xz"
shwrap("cd ${cosaDir} && cosa shell -- /usr/lib/coreos-assembler/kola-junit ${id} ${outputDir}/${id} - > ${env.WORKSPACE}/${id}-${token}.xml || :")
junit allowEmptyResults: true, skipMarkingBuildUnstable: true, skipPublishingChecks: true, testResults: "${id}-${token}.xml"
}
}

0 comments on commit b2a97c5

Please sign in to comment.