From 86616e33e445ca5e877c36605d7f1039237df5c8 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 31 May 2024 17:40:54 +0900 Subject: [PATCH 1/3] .github: workflows: Ensure that local base images are used This commit adds the `--pull-never` flag to the derivative image builds in order to ensure that the locally built base image is used instead of a remote pulled one. Without this flag, buildah may pull the remote tag even if a local copy with the same tag name exists. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 079c45a..1a62329 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -132,6 +132,8 @@ jobs: labels: ${{ steps.meta_ci.outputs.labels }} build-args: | BASE_IMAGE=${{ env.GHCR_BASE }}/${{ env.BASE_IMAGE_NAME }}:${{ steps.meta_base.outputs.version }} + extra-args: | + --pull-never - name: Build Developer image uses: redhat-actions/buildah-build@v2 @@ -142,6 +144,8 @@ jobs: labels: ${{ steps.meta_developer.outputs.labels }} build-args: | BASE_IMAGE=${{ env.GHCR_BASE }}/${{ env.CI_IMAGE_NAME }}:${{ steps.meta_ci.outputs.version }} + extra-args: | + --pull-never - name: Push base image if: ${{ github.event_name != 'pull_request' }} From 10ae5bcb9fdfc6fc8662fa919e5dba9486c72545 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 31 May 2024 19:46:23 +0900 Subject: [PATCH 2/3] .github: workflows: Place container storage inside work volume for merge This commit updates the CI image merge job to place the Podman container storage inside the runner work volume in order to ensure that sufficient free space is available for the source images to be pulled. Refer to d9bdf4bf44c3e44ab23595b4d28539ff33c076c1 for more details. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1a62329..6b73c1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -175,6 +175,11 @@ jobs: if: ${{ github.event_name != 'pull_request' }} steps: + - name: Configure container storage + run: | + sed -i 's/graphroot = .*/graphroot = "\/__w\/container_storage"/' /etc/containers/storage.conf + mkdir -p /__w/container_storage + - name: Login to DockerHub if: ${{ github.event_name != 'pull_request' }} uses: redhat-actions/podman-login@v1 From 011e2f9059e5f3dd6dcda8215c5c31ba5896ac3e Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 31 May 2024 21:33:03 +0900 Subject: [PATCH 3/3] .github: workflows: Set TMPDIR to under work volume This commit updates the CI workflow to set the TMPDIR environment variable to `/__w/tmp`, which is under the runner work volume in order to ensure that sufficient free space is available for the temporary image layers to be stored. Note that the TMPDIR environment variable is used by Podman/Buildah to set `image_copy_tmp_dir`. Signed-off-by: Stephanos Ioannidis --- .github/workflows/ci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b73c1f..259955c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -46,6 +46,11 @@ jobs: builder: zephyr-runner-v2-linux-arm64-4xlarge steps: + - name: Configure temporary directory + run: | + mkdir -p /__w/tmp + echo "TMPDIR=/__w/tmp" >> $GITHUB_ENV + - name: Configure container storage run: | sed -i 's/graphroot = .*/graphroot = "\/__w\/container_storage"/' /etc/containers/storage.conf @@ -175,6 +180,11 @@ jobs: if: ${{ github.event_name != 'pull_request' }} steps: + - name: Configure temporary directory + run: | + mkdir -p /__w/tmp + echo "TMPDIR=/__w/tmp" >> $GITHUB_ENV + - name: Configure container storage run: | sed -i 's/graphroot = .*/graphroot = "\/__w\/container_storage"/' /etc/containers/storage.conf