Skip to content

Commit

Permalink
ci: Run cosa unprivileged
Browse files Browse the repository at this point in the history
  • Loading branch information
jlebon committed Sep 9, 2023
1 parent fc5aef6 commit 2fe88f8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .cci.jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,24 +47,23 @@ cosaPod(runAsUser: 0, memory: "9Gi", cpu: "4") {
checkout scm
unstash 'build'
shwrap("""
chown -R -h builder: .
# 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)
if test \$osver = \$buildroot_id; then
rsync -rlv installed/rootfs/ /
fi
rsync -rlv installed/tests/ /
coreos-assembler init --force https://github.com/coreos/fedora-coreos-config
mkdir -p overrides/rootfs
runuser -u builder -- coreos-assembler init --force https://github.com/coreos/fedora-coreos-config
# And override the on-host bits
mv installed/rootfs/* overrides/rootfs/
rm installed -rf
coreos-assembler fetch
coreos-assembler build
coreos-assembler buildextend-metal
coreos-assembler buildextend-metal4k
coreos-assembler buildextend-live --fast

runuser -u builder -- coreos-assembler fetch
runuser -u builder -- coreos-assembler build
runuser -u builder -- coreos-assembler buildextend-metal
runuser -u builder -- coreos-assembler buildextend-metal4k
runuser -u builder -- coreos-assembler buildextend-live --fast
""")
}
kola(cosaDir: "${env.WORKSPACE}")
Expand Down

0 comments on commit 2fe88f8

Please sign in to comment.