From a65946bcb0b14e6808cd846e47bd0268bdff260c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabiano=20Fid=C3=AAncio?= Date: Thu, 24 Oct 2024 16:27:38 +0200 Subject: [PATCH] workflows: build: Ensure rootfs is present for shim-v2 build MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Let's ensure that we get the already built rootfs tarball from previous steps of the action at the time we're building the shim-v2. The reason we do that is because the rootfs binary tarballs has a root_hash.txt file that contains the information needed the shim-v2 build scripts to add the measured rootfs arguments to the shim-v2 configuration files. Signed-off-by: Fabiano FidĂȘncio --- .github/workflows/build-kata-static-tarball-amd64.yaml | 8 ++++++++ .github/workflows/build-kata-static-tarball-arm64.yaml | 8 ++++++++ .github/workflows/build-kata-static-tarball-ppc64le.yaml | 8 ++++++++ .github/workflows/build-kata-static-tarball-s390x.yaml | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/.github/workflows/build-kata-static-tarball-amd64.yaml b/.github/workflows/build-kata-static-tarball-amd64.yaml index f4c761e9e3..00fcd964ce 100644 --- a/.github/workflows/build-kata-static-tarball-amd64.yaml +++ b/.github/workflows/build-kata-static-tarball-amd64.yaml @@ -224,9 +224,17 @@ jobs: env: TARGET_BRANCH: ${{ inputs.target-branch }} + - name: get-artifacts + uses: actions/download-artifact@v4 + with: + pattern: kata-artifacts-amd64-*${{ inputs.tarball-suffix }} + path: kata-artifacts + merge-multiple: true + - name: Build shim-v2 id: build run: | + ./tests/gha-adjust-to-use-prebuilt-components.sh kata-artifacts "${KATA_ASSET}" make "${KATA_ASSET}-tarball" build_dir=$(readlink -f build) # store-artifact does not work with symlink diff --git a/.github/workflows/build-kata-static-tarball-arm64.yaml b/.github/workflows/build-kata-static-tarball-arm64.yaml index d0a38d98c8..4f549c5fb3 100644 --- a/.github/workflows/build-kata-static-tarball-arm64.yaml +++ b/.github/workflows/build-kata-static-tarball-arm64.yaml @@ -164,8 +164,16 @@ jobs: env: TARGET_BRANCH: ${{ inputs.target-branch }} + - name: get-artifacts + uses: actions/download-artifact@v4 + with: + pattern: kata-artifacts-arm64-*${{ inputs.tarball-suffix }} + path: kata-artifacts + merge-multiple: true + - name: Build shim-v2 run: | + ./tests/gha-adjust-to-use-prebuilt-components.sh kata-artifacts "${KATA_ASSET}" make "${KATA_ASSET}-tarball" build_dir=$(readlink -f build) # store-artifact does not work with symlink diff --git a/.github/workflows/build-kata-static-tarball-ppc64le.yaml b/.github/workflows/build-kata-static-tarball-ppc64le.yaml index a1838b1b8c..d322db9bde 100644 --- a/.github/workflows/build-kata-static-tarball-ppc64le.yaml +++ b/.github/workflows/build-kata-static-tarball-ppc64le.yaml @@ -177,8 +177,16 @@ jobs: env: TARGET_BRANCH: ${{ inputs.target-branch }} + - name: get-artifacts + uses: actions/download-artifact@v4 + with: + pattern: kata-artifacts-ppc64le-*${{ inputs.tarball-suffix }} + path: kata-artifacts + merge-multiple: true + - name: Build shim-v2 run: | + ./tests/gha-adjust-to-use-prebuilt-components.sh kata-artifacts "${KATA_ASSET}" make "${KATA_ASSET}-tarball" build_dir=$(readlink -f build) # store-artifact does not work with symlink diff --git a/.github/workflows/build-kata-static-tarball-s390x.yaml b/.github/workflows/build-kata-static-tarball-s390x.yaml index aee654d764..599e512e55 100644 --- a/.github/workflows/build-kata-static-tarball-s390x.yaml +++ b/.github/workflows/build-kata-static-tarball-s390x.yaml @@ -240,9 +240,17 @@ jobs: env: TARGET_BRANCH: ${{ inputs.target-branch }} + - name: get-artifacts + uses: actions/download-artifact@v4 + with: + pattern: kata-artifacts-s390x-*${{ inputs.tarball-suffix }} + path: kata-artifacts + merge-multiple: true + - name: Build shim-v2 id: build run: | + ./tests/gha-adjust-to-use-prebuilt-components.sh kata-artifacts "${KATA_ASSET}" make "${KATA_ASSET}-tarball" build_dir=$(readlink -f build) # store-artifact does not work with symlink