From 85d3bcd7134fc230cf3bd11129a83a51a7da7bcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Bombo?= Date: Mon, 2 Dec 2024 15:50:01 -0600 Subject: [PATCH] ci: Fix Docker publishing for CSI driver MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The compilation succeeds, however Docker can't find the binary because we specify an absolute path. In Docker world, an absolute path is absolute to the Docker build context (here: src/tools/csi-kata-directvolume). To fix this, we link the binary into the build context, where the Dockerfile expects it. Failure mode: https://github.com/kata-containers/kata-containers/actions/runs/12068202642/job/33693101962?pr=10563#step:8:213 Signed-off-by: Aurélien Bombo --- .github/workflows/ci.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 4636078bd4..9fbb6d7ac4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -160,6 +160,13 @@ jobs: - name: Install tools run: bash tests/integration/kubernetes/gha-run.sh install-kata-tools kata-artifacts + - name: Link binary into Docker context + run: | + mkdir -p src/tools/csi-kata-directvolume/bin/ + # Hard link (Docker doesn't follow symlinks) to the location + # where the Dockerfile expects to find the binary. + ln -f /opt/kata/bin/csi-kata-directvolume src/tools/csi-kata-directvolume/bin/directvolplugin + - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 @@ -178,8 +185,6 @@ jobs: context: src/tools/csi-kata-directvolume/ platforms: linux/amd64 file: src/tools/csi-kata-directvolume/Dockerfile - build-args: | - binary=/opt/kata/bin/csi-kata-directvolume run-kata-monitor-tests: if: ${{ inputs.skip-test != 'yes' }}