Skip to content

Commit afa7dfe

Browse files
committed
kola: add skipReprovision parameter
Some upstreams just want to run a subset of tests. For consistency with the other `kola` runs in this file, make running the reprovisioning tests skippable.
1 parent 8dc6b0c commit afa7dfe

File tree

1 file changed

+8
-5
lines changed

1 file changed

+8
-5
lines changed

vars/kola.groovy

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
// parallel: integer -- number of tests to run in parallel (default: # CPUs)
66
// skipBasicScenarios boolean -- skip basic qemu scenarios
77
// skipUpgrade: boolean -- skip running `cosa kola --upgrades`
8+
// skipReprovision: boolean -- skip running reprovisioning tests
89
// build: string -- cosa build ID to target
910
// platformArgs: string -- platform-specific kola args (e.g. '-p aws --aws-ami ...`)
1011
// extraArgs: string -- additional kola args for `kola run` (e.g. `ext.*`)
@@ -73,11 +74,13 @@ def call(params = [:]) {
7374
shwrap("tar -c -C ${outputDir} kola | xz -c9 > ${env.WORKSPACE}/${marker}-${token}.tar.xz")
7475
archiveArtifacts allowEmptyArchive: true, artifacts: "${marker}-${token}.tar.xz"
7576
}
76-
try {
77-
shwrap("cd ${cosaDir} && cosa kola run ${rerun} --output-dir=${outputDir}/kola-reprovision --build=${buildID} ${arch} ${platformArgs} --tag reprovision ${args} ${extraArgs}")
78-
} finally {
79-
shwrap("tar -c -C ${outputDir} kola-reprovision | xz -c9 > ${env.WORKSPACE}/${marker}-reprovision-${token}.tar.xz")
80-
archiveArtifacts allowEmptyArchive: true, artifacts: "${marker}-reprovision-${token}.tar.xz"
77+
if (!params['skipReprovision']) {
78+
try {
79+
shwrap("cd ${cosaDir} && cosa kola run ${rerun} --output-dir=${outputDir}/kola-reprovision --build=${buildID} ${arch} ${platformArgs} --tag reprovision ${args}")
80+
} finally {
81+
shwrap("tar -c -C ${outputDir} kola-reprovision | xz -c9 > ${env.WORKSPACE}/${marker}-reprovision-${token}.tar.xz")
82+
archiveArtifacts allowEmptyArchive: true, artifacts: "${marker}-reprovision-${token}.tar.xz"
83+
}
8184
}
8285
// sanity check kola actually ran and dumped its output in tmp/
8386
shwrap("test -d ${outputDir}/kola")

0 commit comments

Comments
 (0)