Merge pull request #6953 from fidencio/topic/add-nightly-jobs

gha: Add nightly jobs
This commit is contained in:
Wainer Moschetta
2023-07-06 14:50:10 -03:00
committed by GitHub
15 changed files with 164 additions and 73 deletions

View File

@@ -13,6 +13,9 @@ on:
required: false required: false
type: string type: string
default: no default: no
commit-hash:
required: false
type: string
jobs: jobs:
build-asset: build-asset:
@@ -60,7 +63,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
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
- name: Build ${{ matrix.asset }} - name: Build ${{ matrix.asset }}
@@ -88,7 +91,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: get-artifacts - name: get-artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:

View File

@@ -9,6 +9,9 @@ on:
required: false required: false
type: string type: string
default: no default: no
commit-hash:
required: false
type: string
jobs: jobs:
build-asset: build-asset:
@@ -41,7 +44,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
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
- name: Build ${{ matrix.asset }} - name: Build ${{ matrix.asset }}
run: | run: |
@@ -72,7 +75,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: get-artifacts - name: get-artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:

View File

@@ -9,6 +9,9 @@ on:
required: false required: false
type: string type: string
default: no default: no
commit-hash:
required: false
type: string
jobs: jobs:
build-asset: build-asset:
@@ -37,7 +40,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
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
- name: Build ${{ matrix.asset }} - name: Build ${{ matrix.asset }}
run: | run: |
@@ -69,7 +72,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: get-artifacts - name: get-artifacts
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3
with: with:

20
.github/workflows/ci-nightly.yaml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Kata Containers Nightly CI
on:
schedule:
cron: '0 0 * * *'
env:
COMMIT_HASH: ${GITHUB_REF}
jobs:
set-fake-pr-number:
runs-on: ubuntu-latest
run: |
echo "PR_NUMBER=$(date +%Y%m%d%H%M%S)" >> "$GITHUB_ENV"
kata-containers-ci-on-push:
uses: ./.github/workflows/ci.yaml
with:
commit-hash: ${{ env.COMMIT_HASH }}
pr-number: ${{ env.PR_NUMBER }}
tag: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}-nightly

View File

@@ -12,65 +12,15 @@ on:
- synchronize - synchronize
- reopened - reopened
- labeled - labeled
env:
COMMIT_HASH: ${{ github.event.pull_request.head.sha }}
PR_NUMBER: ${{ github.event.pull_requesst.number }}
jobs: jobs:
build-kata-static-tarball-amd64: kata-containers-ci-on-push:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }} if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml uses: ./.github/workflows/ci.yaml
with: with:
tarball-suffix: -${{ github.event.pull_request.number}}-${{ github.event.pull_request.head.sha }} commit-hash: ${{ env.COMMIT_HASH }}
pr-number: ${{ env.PR_NUMBER }}
publish-kata-deploy-payload-amd64: tag: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
needs: build-kata-static-tarball-amd64
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
with:
tarball-suffix: -${{ github.event.pull_request.number}}-${{ github.event.pull_request.head.sha }}
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-amd64
secrets: inherit
run-k8s-tests-on-aks:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-aks.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-amd64
secrets: inherit
run-k8s-tests-on-sev:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-sev.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-amd64
run-k8s-tests-on-snp:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-snp.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-amd64
run-k8s-tests-on-tdx:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-tdx.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ github.event.pull_request.number }}-${{ github.event.pull_request.head.sha }}-amd64
run-metrics-tests:
if: ${{ contains(github.event.pull_request.labels.*.name, 'ok-to-test') }}
needs: build-kata-static-tarball-amd64
uses: ./.github/workflows/run-metrics.yaml
with:
tarball-suffix: -${{ github.event.pull_request.number}}-${{ github.event.pull_request.head.sha }}

76
.github/workflows/ci.yaml vendored Normal file
View File

@@ -0,0 +1,76 @@
name: Run the Kata Containers CI
on:
workflow_call:
inputs:
commit-hash:
required: true
type: string
pr-number:
required: true
type: string
tag:
required: true
type: string
jobs:
build-kata-static-tarball-amd64:
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml
with:
tarball-suffix: -${{ inputs.tag }}
commit-hash: ${{ inputs.commit-hash }}
publish-kata-deploy-payload-amd64:
needs: build-kata-static-tarball-amd64
uses: ./.github/workflows/publish-kata-deploy-payload-amd64.yaml
with:
tarball-suffix: -${{ inputs.tag }}
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ inputs.tag }}-amd64
commit-hash: ${{ inputs.commit-hash }}
secrets: inherit
run-k8s-tests-on-aks:
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-aks.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ inputs.tag }}-amd64
commit-hash: ${{ inputs.commit-hash }}
secrets: inherit
run-k8s-tests-on-sev:
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-sev.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ inputs.tag }}-amd64
commit-hash: ${{ inputs.commit-hash }}
run-k8s-tests-on-snp:
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-snp.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ inputs.tag }}-amd64
pr-number: ${{ inputs.pr-number }}
commit-hash: ${{ inputs.commit-hash }}
run-k8s-tests-on-tdx:
needs: publish-kata-deploy-payload-amd64
uses: ./.github/workflows/run-k8s-tests-on-tdx.yaml
with:
registry: ghcr.io
repo: ${{ github.repository_owner }}/kata-deploy-ci
tag: ${{ inputs.tag }}-amd64
commit-hash: ${{ inputs.commit-hash }}
run-metrics-tests:
needs: build-kata-static-tarball-amd64
uses: ./.github/workflows/run-metrics.yaml
with:
tarball-suffix: -${{ inputs.tag }}-amd64
commit-hash: ${{ inputs.commit-hash }}

View File

@@ -5,22 +5,28 @@ on:
- main - main
- stable-* - stable-*
env:
COMMIT_HASH: $GITHUB_REF
jobs: jobs:
build-assets-amd64: build-assets-amd64:
uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml uses: ./.github/workflows/build-kata-static-tarball-amd64.yaml
with: with:
commit-hash: ${{ env.COMMIT_HASH }}
push-to-registry: yes push-to-registry: yes
secrets: inherit secrets: inherit
build-assets-arm64: build-assets-arm64:
uses: ./.github/workflows/build-kata-static-tarball-arm64.yaml uses: ./.github/workflows/build-kata-static-tarball-arm64.yaml
with: with:
commit-hash: ${{ env.COMMIT_HASH }}
push-to-registry: yes push-to-registry: yes
secrets: inherit secrets: inherit
build-assets-s390x: build-assets-s390x:
uses: ./.github/workflows/build-kata-static-tarball-s390x.yaml uses: ./.github/workflows/build-kata-static-tarball-s390x.yaml
with: with:
commit-hash: ${{ env.COMMIT_HASH }}
push-to-registry: yes push-to-registry: yes
secrets: inherit secrets: inherit
@@ -28,6 +34,7 @@ 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:
commit-hash: ${{ env.COMMIT_HASH }}
registry: quay.io registry: quay.io
repo: kata-containers/kata-deploy-ci repo: kata-containers/kata-deploy-ci
tag: kata-containers-amd64 tag: kata-containers-amd64
@@ -37,6 +44,7 @@ jobs:
needs: build-assets-arm64 needs: build-assets-arm64
uses: ./.github/workflows/publish-kata-deploy-payload-arm64.yaml uses: ./.github/workflows/publish-kata-deploy-payload-arm64.yaml
with: with:
commit-hash: ${{ env.COMMIT_HASH }}
registry: quay.io registry: quay.io
repo: kata-containers/kata-deploy-ci repo: kata-containers/kata-deploy-ci
tag: kata-containers-arm64 tag: kata-containers-arm64
@@ -46,6 +54,7 @@ jobs:
needs: build-assets-s390x needs: build-assets-s390x
uses: ./.github/workflows/publish-kata-deploy-payload-s390x.yaml uses: ./.github/workflows/publish-kata-deploy-payload-s390x.yaml
with: with:
commit-hash: ${{ env.COMMIT_HASH }}
registry: quay.io registry: quay.io
repo: kata-containers/kata-deploy-ci repo: kata-containers/kata-deploy-ci
tag: kata-containers-s390x tag: kata-containers-s390x

View File

@@ -14,6 +14,9 @@ on:
tag: tag:
required: true required: true
type: string type: string
commit-hash:
required: false
type: string
jobs: jobs:
kata-payload: kata-payload:
@@ -21,7 +24,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: get-kata-tarball - name: get-kata-tarball
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3

View File

@@ -14,6 +14,9 @@ on:
tag: tag:
required: true required: true
type: string type: string
commit-hash:
required: false
type: string
jobs: jobs:
kata-payload: kata-payload:
@@ -25,7 +28,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: get-kata-tarball - name: get-kata-tarball
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3

View File

@@ -14,6 +14,9 @@ on:
tag: tag:
required: true required: true
type: string type: string
commit-hash:
required: false
type: string
jobs: jobs:
kata-payload: kata-payload:
@@ -25,7 +28,7 @@ jobs:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: get-kata-tarball - name: get-kata-tarball
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3

View File

@@ -11,6 +11,12 @@ on:
tag: tag:
required: true required: true
type: string type: string
pr-number:
required: true
type: string
commit-hash:
required: false
type: string
jobs: jobs:
run-k8s-tests: run-k8s-tests:
@@ -31,13 +37,13 @@ jobs:
DOCKER_REGISTRY: ${{ inputs.registry }} DOCKER_REGISTRY: ${{ inputs.registry }}
DOCKER_REPO: ${{ inputs.repo }} DOCKER_REPO: ${{ inputs.repo }}
DOCKER_TAG: ${{ inputs.tag }} DOCKER_TAG: ${{ inputs.tag }}
GH_PR_NUMBER: ${{ github.event.pull_request.number }} GH_PR_NUMBER: ${{ inputs.pr-number }}
KATA_HOST_OS: ${{ matrix.host_os }} KATA_HOST_OS: ${{ matrix.host_os }}
KATA_HYPERVISOR: ${{ matrix.vmm }} KATA_HYPERVISOR: ${{ matrix.vmm }}
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: Download Azure CLI - name: Download Azure CLI
run: bash tests/integration/gha-run.sh install-azure-cli run: bash tests/integration/gha-run.sh install-azure-cli

View File

@@ -11,6 +11,9 @@ on:
tag: tag:
required: true required: true
type: string type: string
commit-hash:
required: false
type: string
jobs: jobs:
run-k8s-tests: run-k8s-tests:
@@ -29,7 +32,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: Run tests - name: Run tests
timeout-minutes: 30 timeout-minutes: 30

View File

@@ -11,6 +11,9 @@ on:
tag: tag:
required: true required: true
type: string type: string
commit-hash:
required: false
type: string
jobs: jobs:
run-k8s-tests: run-k8s-tests:
@@ -29,7 +32,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: Run tests - name: Run tests
timeout-minutes: 30 timeout-minutes: 30

View File

@@ -11,6 +11,9 @@ on:
tag: tag:
required: true required: true
type: string type: string
commit-hash:
required: false
type: string
jobs: jobs:
run-k8s-tests: run-k8s-tests:
@@ -29,7 +32,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: Run tests - name: Run tests
timeout-minutes: 30 timeout-minutes: 30

View File

@@ -5,6 +5,9 @@ on:
tarball-suffix: tarball-suffix:
required: false required: false
type: string type: string
commit-hash:
required: false
type: string
jobs: jobs:
run-metrics: run-metrics:
@@ -20,7 +23,7 @@ jobs:
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
ref: ${{ github.event.pull_request.head.sha }} ref: ${{ inputs.commit-hash }}
- name: get-kata-tarball - name: get-kata-tarball
uses: actions/download-artifact@v3 uses: actions/download-artifact@v3