mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-04-30 04:34:27 +00:00
gha: Use ghcr.io for the k8s CI
Let's switch to using the `ghcr.io` registry for the k8s CI, as this will save us some troubles on running the CI with PRs coming from forked repos. Fixes: #6587 Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
parent
e1f972fb1d
commit
d17dfe4cdd
8
.github/workflows/ci-on-push.yaml
vendored
8
.github/workflows/ci-on-push.yaml
vendored
@ -13,13 +13,17 @@ jobs:
|
|||||||
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
|
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
|
||||||
with:
|
with:
|
||||||
tarball-suffix: -${{ github.event.pull_request.number}}-${{ github.sha }}
|
tarball-suffix: -${{ github.event.pull_request.number}}-${{ github.sha }}
|
||||||
repo: kata-deploy-ci
|
registry: ghcr.io
|
||||||
|
repo: ${{ github.repository_owner }}/kata-deploy-ci
|
||||||
tag: ${{ github.event.pull_request.number }}-${{ github.sha }}-amd64
|
tag: ${{ github.event.pull_request.number }}-${{ github.sha }}-amd64
|
||||||
|
quay-io-login-continue-on-error: true
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
run-k8s-tests-on-aks:
|
run-k8s-tests-on-aks:
|
||||||
needs: publish-kata-deploy-payload-amd64
|
needs: publish-kata-deploy-payload-amd64
|
||||||
uses: ./.github/workflows/run-k8s-tests-on-aks.yaml
|
uses: ./.github/workflows/run-k8s-tests-on-aks.yaml
|
||||||
with:
|
with:
|
||||||
image-tag: ${{ github.event.pull_request.number }}-${{ github.sha }}-amd64
|
registry: ghcr.io
|
||||||
|
repo: ${{ github.repository_owner }}/kata-deploy-ci
|
||||||
|
tag: ${{ github.event.pull_request.number }}-${{ github.sha }}-amd64
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
3
.github/workflows/payload-after-push.yaml
vendored
3
.github/workflows/payload-after-push.yaml
vendored
@ -19,7 +19,8 @@ jobs:
|
|||||||
needs: build-assets-amd64
|
needs: build-assets-amd64
|
||||||
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
|
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
|
||||||
with:
|
with:
|
||||||
registry: quay.io/kata-containers/kata-deploy-ci
|
registry: quay.io
|
||||||
|
repo: kata-containers/kata-deploy-ci
|
||||||
tag: kata-containers-amd64
|
tag: kata-containers-amd64
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
|
@ -5,12 +5,19 @@ on:
|
|||||||
tarball-suffix:
|
tarball-suffix:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
registry:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
repo:
|
repo:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
tag:
|
tag:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
quay-io-login-continue-on-error:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
kata-payload:
|
kata-payload:
|
||||||
@ -29,10 +36,18 @@ jobs:
|
|||||||
registry: quay.io
|
registry: quay.io
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
||||||
|
continue-on-error: ${{ inputs.quay-io-login-continue-on-error }}
|
||||||
|
|
||||||
|
- name: Login to Kata Containers ghcr.io
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: build-and-push-kata-payload
|
- name: build-and-push-kata-payload
|
||||||
id: build-and-push-kata-payload
|
id: build-and-push-kata-payload
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
||||||
$(pwd)/kata-static.tar.xz \
|
$(pwd)/kata-static.tar.xz \
|
||||||
quay.io/kata-containers/${{ inputs.repo }} ${{ inputs.tag }}
|
${{ inputs.registry }}/${{ inputs.repo }} ${{ inputs.tag }}
|
||||||
|
@ -5,12 +5,19 @@ on:
|
|||||||
tarball-suffix:
|
tarball-suffix:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
registry:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
repo:
|
repo:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
tag:
|
tag:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
quay-io-login-continue-on-error:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
kata-payload:
|
kata-payload:
|
||||||
@ -33,10 +40,19 @@ jobs:
|
|||||||
registry: quay.io
|
registry: quay.io
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
||||||
|
continue-on-error: ${{ inputs.quay-io-login-continue-on-error }}
|
||||||
|
|
||||||
|
- name: Login to Kata Containers ghcr.io
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: build-and-push-kata-payload
|
- name: build-and-push-kata-payload
|
||||||
id: build-and-push-kata-payload
|
id: build-and-push-kata-payload
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
||||||
$(pwd)/kata-static.tar.xz \
|
$(pwd)/kata-static.tar.xz \
|
||||||
quay.io/kata-containers/$${ inputs.repo }} ${{ inputs.tag }}
|
${{ inputs.registry }}/${{ inputs.repo }} ${{ inputs.tag }}
|
||||||
|
|
||||||
|
@ -6,11 +6,18 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
registry:
|
registry:
|
||||||
repo: true
|
required: true
|
||||||
|
type: string
|
||||||
|
repo:
|
||||||
|
required: true
|
||||||
type: string
|
type: string
|
||||||
tag:
|
tag:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
quay-io-login-continue-on-error:
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
kata-payload:
|
kata-payload:
|
||||||
@ -33,10 +40,18 @@ jobs:
|
|||||||
registry: quay.io
|
registry: quay.io
|
||||||
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
username: ${{ secrets.QUAY_DEPLOYER_USERNAME }}
|
||||||
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
password: ${{ secrets.QUAY_DEPLOYER_PASSWORD }}
|
||||||
|
continue-on-error: ${{ inputs.quay-io-login-continue-on-error }}
|
||||||
|
|
||||||
|
- name: Login to Kata Containers ghcr.io
|
||||||
|
uses: docker/login-action@v2
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: build-and-push-kata-payload
|
- name: build-and-push-kata-payload
|
||||||
id: build-and-push-kata-payload
|
id: build-and-push-kata-payload
|
||||||
run: |
|
run: |
|
||||||
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
./tools/packaging/kata-deploy/local-build/kata-deploy-build-and-upload-payload.sh \
|
||||||
$(pwd)/kata-static.tar.xz \
|
$(pwd)/kata-static.tar.xz \
|
||||||
quay.io/kata-containers/${{ inputs.repo }} ${{ inputs.tag }}
|
${{ inputs.registry }}/${{ inputs.repo }} ${{ inputs.tag }}
|
||||||
|
12
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
12
.github/workflows/run-k8s-tests-on-aks.yaml
vendored
@ -2,7 +2,13 @@ name: CI | Run kubernetes tests on AKS
|
|||||||
on:
|
on:
|
||||||
workflow_call:
|
workflow_call:
|
||||||
inputs:
|
inputs:
|
||||||
image-tag:
|
registry:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
repo:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
tag:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
@ -52,9 +58,9 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy kata-deploy
|
- name: Deploy kata-deploy
|
||||||
run: |
|
run: |
|
||||||
sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|quay.io/kata-containers/kata-deploy-ci:${{ inputs.image-tag }}|g" tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
|
sed -i -e "s|quay.io/kata-containers/kata-deploy:latest|${{ inputs.registry }}/${{ inputs.repo }}:${{ inputs.tag }}|g" tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
|
||||||
cat tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
|
cat tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
|
||||||
cat tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml | grep "quay.io/kata-containers/kata-deploy-ci:${{ inputs.image-tag }}" || die "Failed to setup the tests image"
|
cat tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml | grep "${{ inputs.registry }}/${{ inputs.repo }}:${{ inputs.tag }}" || die "Failed to setup the tests image"
|
||||||
|
|
||||||
kubectl apply -f tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml
|
kubectl apply -f tools/packaging/kata-deploy/kata-rbac/base/kata-rbac.yaml
|
||||||
kubectl apply -f tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
|
kubectl apply -f tools/packaging/kata-deploy/kata-deploy/base/kata-deploy.yaml
|
||||||
|
Loading…
Reference in New Issue
Block a user