diff --git a/.github/workflows/ci-on-push.yaml b/.github/workflows/ci-on-push.yaml index 8a7aa96732..1b10f40f65 100644 --- a/.github/workflows/ci-on-push.yaml +++ b/.github/workflows/ci-on-push.yaml @@ -17,71 +17,10 @@ env: PR_NUMBER: ${{ github.event.pull_requesst.number }} jobs: - build-kata-static-tarball-amd64: + kata-containers-ci-on-push: 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: - tarball-suffix: -${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }} commit-hash: ${{ env.COMMIT_HASH }} - - publish-kata-deploy-payload-amd64: - 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: -${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }} - registry: ghcr.io - repo: ${{ github.repository_owner }}/kata-deploy-ci - tag: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}-amd64 - commit-hash: ${{ env.COMMIT_HASH }} - 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: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}-amd64 - commit-hash: ${{ env.COMMIT_HASH }} - 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: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}-amd64 - commit-hash: ${{ env.COMMIT_HASH }} - - 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: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}-amd64 pr-number: ${{ env.PR_NUMBER }} - commit-hash: ${{ env.COMMIT_HASH }} - - 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: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}-amd64 - commit-hash: ${{ env.COMMIT_HASH }} - - 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: -${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }}-amd64 - commit-hash: ${{ env.COMMIT_HASH }} + tag: ${{ env.PR_NUMBER }}-${{ env.COMMIT_HASH }} diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000000..7eb1491a50 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,81 @@ +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: + 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: ${{ inputs.tag }}-amd64 + commit-hash: ${{ inputs.commit-hash }} + 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: ${{ inputs.tag }}-amd64 + commit-hash: ${{ inputs.commit-hash }} + + 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: ${{ inputs.tag }}-amd64 + pr-number: ${{ inputs.pr-number }} + commit-hash: ${{ inputs.commit-hash }} + + 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: ${{ inputs.tag }}-amd64 + commit-hash: ${{ inputs.commit-hash }} + + 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: -${{ inputs.tag }}-amd64 + commit-hash: ${{ inputs.commit-hash }}