mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-29 12:14:48 +00:00
gha: Split payload-after-push-*.yaml
Let's split those actions into two different ones: * Build the kata-static tarball * Publish the kata-deploy payload We're doing this as, later in this series we'll start taking advantage of both pieces. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
07e49c63e1
commit
56331bd7bc
@ -1,9 +1,9 @@
|
|||||||
name: CI | Publish kata-deploy payload for amd64
|
name: CI | Build kata-static tarball for amd64
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
target-arch:
|
tarball-suffix:
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -23,13 +23,6 @@ jobs:
|
|||||||
- shim-v2
|
- shim-v2
|
||||||
- virtiofsd
|
- virtiofsd
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Kata Containers quay.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # This is needed in order to keep the commit ids history
|
fetch-depth: 0 # This is needed in order to keep the commit ids history
|
||||||
@ -47,7 +40,7 @@ jobs:
|
|||||||
- name: store-artifact ${{ matrix.asset }}
|
- name: store-artifact ${{ matrix.asset }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-artifacts-amd64
|
name: kata-artifacts-amd64${{ inputs.tarball-suffix }}
|
||||||
path: kata-build/kata-static-${{ matrix.asset }}.tar.xz
|
path: kata-build/kata-static-${{ matrix.asset }}.tar.xz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@ -60,7 +53,7 @@ jobs:
|
|||||||
- name: get-artifacts
|
- name: get-artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-artifacts-amd64
|
name: kata-artifacts-amd64${{ inputs.tarball-suffix }}
|
||||||
path: kata-artifacts
|
path: kata-artifacts
|
||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
@ -68,31 +61,7 @@ jobs:
|
|||||||
- name: store-artifacts
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-static-tarball-amd64
|
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
|
||||||
path: kata-static.tar.xz
|
path: kata-static.tar.xz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
kata-payload:
|
|
||||||
needs: create-kata-tarball
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Login to Kata Containers quay.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: get-kata-tarball
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: kata-static-tarball-amd64
|
|
||||||
|
|
||||||
- name: build-and-push-kata-payload
|
|
||||||
id: build-and-push-kata-payload
|
|
||||||
run: |
|
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
|
||||||
$(pwd)/kata-static.tar.xz "quay.io/kata-containers/kata-deploy-ci" \
|
|
||||||
"kata-containers-${{ inputs.target-arch }}"
|
|
@ -1,9 +1,9 @@
|
|||||||
name: CI | Publish kata-deploy payload for arm64
|
name: CI | Build kata-static tarball for arm64
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
target-arch:
|
tarball-suffix:
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -23,13 +23,6 @@ jobs:
|
|||||||
- shim-v2
|
- shim-v2
|
||||||
- virtiofsd
|
- virtiofsd
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Kata Containers quay.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Adjust a permission for repo
|
- name: Adjust a permission for repo
|
||||||
run: |
|
run: |
|
||||||
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
||||||
@ -51,7 +44,7 @@ jobs:
|
|||||||
- name: store-artifact ${{ matrix.asset }}
|
- name: store-artifact ${{ matrix.asset }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-artifacts-arm64
|
name: kata-artifacts-arm64${{ inputs.tarball-suffix }}
|
||||||
path: kata-build/kata-static-${{ matrix.asset }}.tar.xz
|
path: kata-build/kata-static-${{ matrix.asset }}.tar.xz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@ -68,7 +61,7 @@ jobs:
|
|||||||
- name: get-artifacts
|
- name: get-artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-artifacts-arm64
|
name: kata-artifacts-arm64${{ inputs.tarball-suffix }}
|
||||||
path: kata-artifacts
|
path: kata-artifacts
|
||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
@ -76,35 +69,7 @@ jobs:
|
|||||||
- name: store-artifacts
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-static-tarball-arm64
|
name: kata-static-tarball-arm64${{ inputs.tarball-suffix }}
|
||||||
path: kata-static.tar.xz
|
path: kata-static.tar.xz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
kata-payload:
|
|
||||||
needs: create-kata-tarball
|
|
||||||
runs-on: arm64
|
|
||||||
steps:
|
|
||||||
- name: Login to Kata Containers quay.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Adjust a permission for repo
|
|
||||||
run: |
|
|
||||||
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: get-kata-tarball
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: kata-static-tarball-arm64
|
|
||||||
|
|
||||||
- name: build-and-push-kata-payload
|
|
||||||
id: build-and-push-kata-payload
|
|
||||||
run: |
|
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
|
||||||
$(pwd)/kata-static.tar.xz "quay.io/kata-containers/kata-deploy-ci" \
|
|
||||||
"kata-containers-${{ inputs.target-arch }}"
|
|
@ -1,9 +1,9 @@
|
|||||||
name: CI | Publish kata-deploy payload for s390x
|
name: CI | Build kata-static tarball for s390x
|
||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
target-arch:
|
tarball-suffix:
|
||||||
required: true
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
@ -19,13 +19,6 @@ jobs:
|
|||||||
- shim-v2
|
- shim-v2
|
||||||
- virtiofsd
|
- virtiofsd
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Kata Containers quay.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Adjust a permission for repo
|
- name: Adjust a permission for repo
|
||||||
run: |
|
run: |
|
||||||
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
||||||
@ -48,7 +41,7 @@ jobs:
|
|||||||
- name: store-artifact ${{ matrix.asset }}
|
- name: store-artifact ${{ matrix.asset }}
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-artifacts-s390x
|
name: kata-artifacts-s390x${{ inputs.tarball-suffix }}
|
||||||
path: kata-build/kata-static-${{ matrix.asset }}.tar.xz
|
path: kata-build/kata-static-${{ matrix.asset }}.tar.xz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
@ -65,7 +58,7 @@ jobs:
|
|||||||
- name: get-artifacts
|
- name: get-artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-artifacts-s390x
|
name: kata-artifacts-s390x${{ inputs.tarball-suffix }}
|
||||||
path: kata-artifacts
|
path: kata-artifacts
|
||||||
- name: merge-artifacts
|
- name: merge-artifacts
|
||||||
run: |
|
run: |
|
||||||
@ -73,35 +66,7 @@ jobs:
|
|||||||
- name: store-artifacts
|
- name: store-artifacts
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: kata-static-tarball-s390x
|
name: kata-static-tarball-s390x${{ inputs.tarball-suffix }}
|
||||||
path: kata-static.tar.xz
|
path: kata-static.tar.xz
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
kata-payload:
|
|
||||||
needs: create-kata-tarball
|
|
||||||
runs-on: s390x
|
|
||||||
steps:
|
|
||||||
- name: Login to Kata Containers quay.io
|
|
||||||
uses: docker/login-action@v2
|
|
||||||
with:
|
|
||||||
registry: quay.io
|
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Adjust a permission for repo
|
|
||||||
run: |
|
|
||||||
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- name: get-kata-tarball
|
|
||||||
uses: actions/download-artifact@v3
|
|
||||||
with:
|
|
||||||
name: kata-static-tarball-s390x
|
|
||||||
|
|
||||||
- name: build-and-push-kata-payload
|
|
||||||
id: build-and-push-kata-payload
|
|
||||||
run: |
|
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
|
||||||
$(pwd)/kata-static.tar.xz "quay.io/kata-containers/kata-deploy-ci" \
|
|
||||||
"kata-containers-${{ inputs.target-arch }}"
|
|
39
.github/workflows/payload-after-push.yaml
vendored
39
.github/workflows/payload-after-push.yaml
vendored
@ -7,26 +7,41 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-assets-amd64:
|
build-assets-amd64:
|
||||||
uses: ./.github/workflows/payload-after-push-amd64.yaml
|
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml
|
||||||
with:
|
|
||||||
target-arch: amd64
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
build-assets-arm64:
|
build-assets-arm64:
|
||||||
uses: ./.github/workflows/payload-after-push-arm64.yaml
|
uses: ./.github/workflows/build-kata-static-tarball-arm64.yaml
|
||||||
with:
|
|
||||||
target-arch: arm64
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
build-assets-s390x:
|
build-assets-s390x:
|
||||||
uses: ./.github/workflows/payload-after-push-s390x.yaml
|
uses: ./.github/workflows/build-kata-static-tarball-s390x.yaml
|
||||||
|
|
||||||
|
publish-kata-deploy-payload-amd64:
|
||||||
|
needs: build-assets-amd64
|
||||||
|
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
|
||||||
with:
|
with:
|
||||||
target-arch: s390x
|
registry: quay.io/kata-containers/kata-deploy-ci
|
||||||
|
tag: kata-containers-amd64
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
publish:
|
publish-kata-deploy-payload-arm64:
|
||||||
|
needs: build-assets-arm64
|
||||||
|
uses: ./.github/workflows/publish-kata-deploy-payload-arm64.yaml
|
||||||
|
with:
|
||||||
|
registry: quay.io/kata-containers/kata-deploy-ci
|
||||||
|
tag: kata-containers-arm64
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
publish-kata-deploy-payload-s390x:
|
||||||
|
needs: build-assets-s390x
|
||||||
|
uses: ./.github/workflows/publish-kata-deploy-payload-s390x.yaml
|
||||||
|
with:
|
||||||
|
registry: quay.io/kata-containers/kata-deploy-ci
|
||||||
|
tag: kata-containers-s390x
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
publish-manifest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: [build-assets-amd64, build-assets-arm64, build-assets-s390x]
|
needs: [publish-kata-deploy-payload-amd64, publish-kata-deploy-payload-arm64, publish-kata-deploy-payload-s390x]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
38
.github/workflows/publish-kata-deploy-payload-amd64.yaml
vendored
Normal file
38
.github/workflows/publish-kata-deploy-payload-amd64.yaml
vendored
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
name: CI | Publish kata-deploy payload for amd64
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tarball-suffix:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
repo:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
tag:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
kata-payload:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: get-kata-tarball
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
|
||||||
|
|
||||||
|
- name: Login to Kata Containers quay.io
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: quay.io
|
||||||
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
||||||
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: build-and-push-kata-payload
|
||||||
|
id: build-and-push-kata-payload
|
||||||
|
run: |
|
||||||
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
||||||
|
$(pwd)/kata-static.tar.xz \
|
||||||
|
quay.io/kata-containers/${{ inputs.repo }} ${{ inputs.tag }}
|
42
.github/workflows/publish-kata-deploy-payload-arm64.yaml
vendored
Normal file
42
.github/workflows/publish-kata-deploy-payload-arm64.yaml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: CI | Publish kata-deploy payload for arm64
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tarball-suffix:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
repo:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
tag:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
kata-payload:
|
||||||
|
runs-on: arm64
|
||||||
|
steps:
|
||||||
|
- name: Adjust a permission for repo
|
||||||
|
run: |
|
||||||
|
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: get-kata-tarball
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: kata-static-tarball-arm64${{ inputs.tarball-suffix }}
|
||||||
|
|
||||||
|
- name: Login to Kata Containers quay.io
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: quay.io
|
||||||
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
||||||
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: build-and-push-kata-payload
|
||||||
|
id: build-and-push-kata-payload
|
||||||
|
run: |
|
||||||
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
||||||
|
$(pwd)/kata-static.tar.xz \
|
||||||
|
quay.io/kata-containers/$${ inputs.repo }} ${{ inputs.tag }}
|
42
.github/workflows/publish-kata-deploy-payload-s390x.yaml
vendored
Normal file
42
.github/workflows/publish-kata-deploy-payload-s390x.yaml
vendored
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
name: CI | Publish kata-deploy payload for s390x
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
tarball-suffix:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
registry:
|
||||||
|
repo: true
|
||||||
|
type: string
|
||||||
|
tag:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
kata-payload:
|
||||||
|
runs-on: s390x
|
||||||
|
steps:
|
||||||
|
- name: Adjust a permission for repo
|
||||||
|
run: |
|
||||||
|
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
|
||||||
|
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: get-kata-tarball
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
name: kata-static-tarball-s390x${{ inputs.tarball-suffix }}
|
||||||
|
|
||||||
|
- name: Login to Kata Containers quay.io
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: quay.io
|
||||||
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
||||||
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
||||||
|
|
||||||
|
- name: build-and-push-kata-payload
|
||||||
|
id: build-and-push-kata-payload
|
||||||
|
run: |
|
||||||
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
||||||
|
$(pwd)/kata-static.tar.xz \
|
||||||
|
quay.io/kata-containers/${{ inputs.repo }} ${{ inputs.tag }}
|
Loading…
Reference in New Issue
Block a user