From ab5f3008f98079242f974e2cbb5254d783b2b37d Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Fri, 8 Sep 2023 10:44:50 -0400 Subject: [PATCH] ci: Workaround virtiofs Same as https://github.com/coreos/rpm-ostree/pull/4585 --- .cci.jenkinsfile | 11 ++++++----- tests/e2e-update/e2e-update.sh | 7 ++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index 12eaed3d..42b9ccf3 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -40,15 +40,17 @@ cosaPod(runAsUser: 0, memory: "4608Mi", cpu: "4") { // because bootupd is used both during the `rpm-ostree compose tree` as well as // inside the target operating system. shwrap(""" + git config --global --add safe.directory '*' mkdir insttree tar -C insttree -xzvf insttree.tar.gz rsync -rlv insttree/ / - coreos-assembler init --force https://github.com/coreos/fedora-coreos-config + chown -R -h builder: . + runuser -u builder -- coreos-assembler init --force https://github.com/coreos/fedora-coreos-config mkdir -p overrides/rootfs mv insttree/* overrides/rootfs/ rmdir insttree - cosa fetch - cosa build + runuser -u builder -- cosa fetch + runuser -u builder -- cosa build """) } // The e2e-adopt test will use the ostree commit we just generated above @@ -57,13 +59,12 @@ cosaPod(runAsUser: 0, memory: "4608Mi", cpu: "4") { // Now a test that upgrades using bootupd stage("e2e upgrade test") { shwrap(""" - git config --global --add safe.directory "\$(pwd)" env COSA_DIR=${env.WORKSPACE} ./tests/e2e-update/e2e-update.sh """) } stage("Kola testing") { // The previous e2e leaves things only having built an ostree update - shwrap("cosa build") + shwrap("runuser -u builder -- cosa build") // bootupd really can't break upgrades for the OS kola(cosaDir: "${env.WORKSPACE}", extraArgs: "ext.*bootupd*", skipUpgrade: true, skipBasicScenarios: true) } diff --git a/tests/e2e-update/e2e-update.sh b/tests/e2e-update/e2e-update.sh index 47f87930..1e9b01ae 100755 --- a/tests/e2e-update/e2e-update.sh +++ b/tests/e2e-update/e2e-update.sh @@ -78,10 +78,11 @@ undo_manifest_fork() { if test -z "${e2e_skip_build:-}"; then echo "Building starting image" + git config --global --add safe.directory '*' rm -f ${overrides}/rpm/*.rpm # Version from F37 GA add_override grub2-2.06-58.fc37 - runv cosa build + runv runuser -u builder -- cosa build prev_image=$(runv cosa meta --image-path qemu) create_manifest_fork rm -f ${overrides}/rpm/*.rpm @@ -90,7 +91,7 @@ if test -z "${e2e_skip_build:-}"; then add_override grub2-2.06-70.fc37 mv ${test_tmpdir}/yumrepo/packages/$(arch)/*.rpm ${overrides}/rpm/ # Only build ostree update - runv cosa build ostree + runv runuser -u builder -- cosa build ostree undo_manifest_fork fi echo "Preparing test" @@ -130,7 +131,7 @@ systemd: EOF runv butane -o ${testtmp}/test.ign ${testtmp}/test.bu cd ${testtmp} -qemuexec_args=(kola qemuexec --propagate-initramfs-failure --qemu-image "${prev_image}" --qemu-firmware uefi \ +qemuexec_args=(runuser -u builder -- kola qemuexec --propagate-initramfs-failure --qemu-image "${prev_image}" --qemu-firmware uefi \ -i test.ign --bind-ro ${COSA_DIR},/run/cosadir --bind-ro ${bootupd_git},/run/bootupd-source --bind-rw .,/run/testtmp) if test -n "${e2e_debug:-}"; then runv ${qemuexec_args[@]} --devshell