workflows: Remove potential timing issues with artifacts

With the code I originally did I think there is potentially
a case where we can get a failure due to timing of steps.
Before this change the `build-asset-shim-v2`
job could start the `get-artifacts` step and concurrently
`remove-rootfs-binary-artifacts` could run and delete the artifact
during the download and result in the error. In this commit, I
try to resolve this by making sure that the shim build waits
for the artifact deletes to complete before starting.

Signed-off-by: stevenhorsman <steven@uk.ibm.com>
This commit is contained in:
stevenhorsman
2024-12-12 16:50:56 +00:00
parent 7b0c1d0a8c
commit e1f6aca9de
4 changed files with 8 additions and 9 deletions

View File

@@ -217,7 +217,7 @@ jobs:
build-asset-shim-v2: build-asset-shim-v2:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: [build-asset, build-asset-rootfs] needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts]
steps: steps:
- name: Login to Kata Containers quay.io - name: Login to Kata Containers quay.io
if: ${{ inputs.push-to-registry == 'yes' }} if: ${{ inputs.push-to-registry == 'yes' }}
@@ -274,7 +274,7 @@ jobs:
create-kata-tarball: create-kata-tarball:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: [build-asset, build-asset-rootfs, build-asset-shim-v2, remove-rootfs-binary-artifacts] needs: [build-asset, build-asset-rootfs, build-asset-shim-v2]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:

View File

@@ -155,7 +155,7 @@ jobs:
build-asset-shim-v2: build-asset-shim-v2:
runs-on: arm64-builder runs-on: arm64-builder
needs: [build-asset, build-asset-rootfs] needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts]
steps: steps:
- name: Login to Kata Containers quay.io - name: Login to Kata Containers quay.io
if: ${{ inputs.push-to-registry == 'yes' }} if: ${{ inputs.push-to-registry == 'yes' }}
@@ -210,7 +210,7 @@ jobs:
create-kata-tarball: create-kata-tarball:
runs-on: arm64-builder runs-on: arm64-builder
needs: [build-asset, build-asset-rootfs, build-asset-shim-v2, remove-rootfs-binary-artifacts] needs: [build-asset, build-asset-rootfs, build-asset-shim-v2]
steps: steps:
- name: Adjust a permission for repo - name: Adjust a permission for repo
run: | run: |

View File

@@ -163,7 +163,7 @@ jobs:
build-asset-shim-v2: build-asset-shim-v2:
runs-on: ppc64le runs-on: ppc64le
needs: [build-asset, build-asset-rootfs] needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts]
steps: steps:
- name: Prepare the self-hosted runner - name: Prepare the self-hosted runner
run: | run: |
@@ -223,7 +223,7 @@ jobs:
create-kata-tarball: create-kata-tarball:
runs-on: ppc64le runs-on: ppc64le
needs: [build-asset, build-asset-rootfs, build-asset-shim-v2, remove-rootfs-binary-artifacts] needs: [build-asset, build-asset-rootfs, build-asset-shim-v2]
steps: steps:
- name: Adjust a permission for repo - name: Adjust a permission for repo
run: | run: |

View File

@@ -219,7 +219,7 @@ jobs:
# We don't need the binaries installed in the rootfs as part of the tarball, so can delete them now we've built the rootfs # We don't need the binaries installed in the rootfs as part of the tarball, so can delete them now we've built the rootfs
remove-rootfs-binary-artifacts: remove-rootfs-binary-artifacts:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
needs: build-asset-rootfs needs: [build-asset-rootfs, build-asset-boot-image-se]
strategy: strategy:
matrix: matrix:
asset: asset:
@@ -233,7 +233,7 @@ jobs:
build-asset-shim-v2: build-asset-shim-v2:
runs-on: s390x runs-on: s390x
needs: [build-asset, build-asset-rootfs] needs: [build-asset, build-asset-rootfs, remove-rootfs-binary-artifacts]
steps: steps:
- name: Login to Kata Containers quay.io - name: Login to Kata Containers quay.io
if: ${{ inputs.push-to-registry == 'yes' }} if: ${{ inputs.push-to-registry == 'yes' }}
@@ -295,7 +295,6 @@ jobs:
- build-asset-rootfs - build-asset-rootfs
- build-asset-boot-image-se - build-asset-boot-image-se
- build-asset-shim-v2 - build-asset-shim-v2
- remove-rootfs-binary-artifacts
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with: