From 46deaad9657b651e4f8a12446b8f2da87a683560 Mon Sep 17 00:00:00 2001 From: Zack Zlotnik Date: Tue, 7 Jun 2022 10:41:46 -0400 Subject: [PATCH 1/4] set COSA_DIR in Dockerfile --- ci/Dockerfile | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ci/Dockerfile b/ci/Dockerfile index 67a5e7a6d..76b884a50 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -8,5 +8,14 @@ RUN go test -v -c -o layering_test ./tests/layering FROM registry.svc.ci.openshift.org/coreos/coreos-assembler:latest WORKDIR /src +ENV COSA_DIR=/tmp/cosa COPY --from=builder /go/src/github.com/openshift/os/layering_test /usr/local/bin/layering_test COPY . . +RUN mkdir -p "${COSA_DIR}" +# We need to make sure that root can read / write to the COSA_DIR so that +# when this container is actually run, we have permissions to read and +# write to the COSA_DIR to allow the Kola tests to run. +USER root +RUN chgrp -Rf root "${COSA_DIR}" && \ + chmod -Rf g+w "${COSA_DIR}" +USER builder From aeb3e1649bc4fbe9573a4c6cfce5dbf462ca45fd Mon Sep 17 00:00:00 2001 From: Zack Zlotnik Date: Tue, 7 Jun 2022 16:08:32 -0400 Subject: [PATCH 2/4] explicitly set WORKDIR --- ci/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/Dockerfile b/ci/Dockerfile index 76b884a50..c6ec6c4a9 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -19,3 +19,4 @@ USER root RUN chgrp -Rf root "${COSA_DIR}" && \ chmod -Rf g+w "${COSA_DIR}" USER builder +WORKDIR /tmp/cosa From 511f376802a796d6f69982c713826b72c366b59e Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 7 Jun 2022 20:13:36 -0400 Subject: [PATCH 3/4] ci/Dockerfile: Also set `ENV COSA_SKIP_OVERLAY=1` This way it should be inherited more consistently by further jobs. --- ci/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/Dockerfile b/ci/Dockerfile index c6ec6c4a9..913096e1e 100644 --- a/ci/Dockerfile +++ b/ci/Dockerfile @@ -9,6 +9,8 @@ RUN go test -v -c -o layering_test ./tests/layering FROM registry.svc.ci.openshift.org/coreos/coreos-assembler:latest WORKDIR /src ENV COSA_DIR=/tmp/cosa +# Prow doesn't support emptydir for jobs today +ENV COSA_SKIP_OVERLAY=1 COPY --from=builder /go/src/github.com/openshift/os/layering_test /usr/local/bin/layering_test COPY . . RUN mkdir -p "${COSA_DIR}" From 9de7192f1498f5494be90e63e9691dbf2fbbfa43 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Tue, 7 Jun 2022 20:15:22 -0400 Subject: [PATCH 4/4] ci: Avoid bash trap with `set -e` and `&&` I noticed in CI we just plowed forward and yeah...bash is just a language that seems superficially convenient and simple. But then you pay it back later spending hours on inane problems. --- ci/prow-build-test-qemu.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ci/prow-build-test-qemu.sh b/ci/prow-build-test-qemu.sh index 883dd2edd..11b7a32e0 100755 --- a/ci/prow-build-test-qemu.sh +++ b/ci/prow-build-test-qemu.sh @@ -48,7 +48,9 @@ cosa kola --basic-qemu-scenarios kola run-upgrade -b rhcos -v --find-parent-image --qemu-image-dir tmp/ --output-dir tmp/kola-upgrade cosa kola run --parallel 2 # Build metal + installer now so we can test them -cosa buildextend-metal && cosa buildextend-metal4k && cosa buildextend-live +cosa buildextend-metal +cosa buildextend-metal4k +cosa buildextend-live # compress the metal and metal4k images now so we're testing # installs with the image format we ship cosa compress --artifact=metal --artifact=metal4k