Skip to content

Commit

Permalink
kola/kolaTestIso: fix tar path
Browse files Browse the repository at this point in the history
If we pass the full directory name to `tar -c`, it'll want to recreate
the whole structure on extracting. Instead, use `-C` so we only pass the
final directory to `tar`. That'll ensure we still create at least one
directory on extraction instead of filling up the working directory. We
used to do this, but I think it got lost in the recent enhancements on
these steps.
  • Loading branch information
jlebon authored and dustymabe committed Oct 25, 2022
1 parent 0d36cc2 commit e322f43
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion vars/kola.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ def call(params = [:]) {
// sanity check kola actually ran and dumped its output
shwrap("cd ${cosaDir} && cosa shell -- test -d ${outputDir}/${id}")
// collect the output
shwrap("cd ${cosaDir} && cosa shell -- tar -c --xz ${outputDir}/${id} > ${env.WORKSPACE}/${id}-${token}.tar.xz || :")
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"
}
}
Expand Down
2 changes: 1 addition & 1 deletion vars/kolaTestIso.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ def call(params = [:]) {
utils.runParallel(testIsoRuns, 2)
} finally {
for (id in ids) {
shwrap("cd ${cosaDir} && cosa shell -- tar -c --xz ${outputDir}/${id} > ${env.WORKSPACE}/${id}-${token}.tar.xz || :")
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"
}
}
Expand Down

0 comments on commit e322f43

Please sign in to comment.