Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

kola/kolaTestIso: use kola-junit to publish JUnit test results #156

Merged
merged 1 commit into from
Dec 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions vars/kola.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,14 @@ 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 junit output for 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 --classname ${id} --koladir ${outputDir}/${id} --output - > ${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 --classname ${id} --koladir ${outputDir}/${id} --output - > ${env.WORKSPACE}/${id}-${token}.xml || :")
junit allowEmptyResults: true, skipMarkingBuildUnstable: true, skipPublishingChecks: true, testResults: "${id}-${token}.xml"
}
}