With some changes made upstream to COSA [1] and a few fixups here
to make sure the directory tree for our built software doesn't have
setgid files we shouldn't need to runAsUser: 0 any longer.
[1] https://github.com/coreos/coreos-assembler/pull/4410
// Build FCOS and run kola tests.
// There's some parallelization in testiso up to 8G, add 1G for overhead
-cosaPod(runAsUser: 0, memory: "9Gi", cpu: "4") {
+cosaPod(memory: "9Gi", cpu: "4") {
stage("Build FCOS") {
checkout scm
unstash 'build'
shwrap("""
+ # Make sure none of the files in the unstashed build are setgid
+ chmod -c -R g-s installed/
# Move the bits into the cosa pod (but only if major versions match)
buildroot_id=\$(cat installed/buildroot-id)
osver=\$(. /usr/lib/os-release && echo \$VERSION_ID)