mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-07-17 08:53:26 +00:00
Merge pull request #10561 from sprt/csi-driver-ci
coco: ci: Lay groundwork for compiling and publishing CSI driver image [1/x]
This commit is contained in:
commit
16a91fccbe
@ -37,6 +37,7 @@ jobs:
|
|||||||
- cloud-hypervisor
|
- cloud-hypervisor
|
||||||
- cloud-hypervisor-glibc
|
- cloud-hypervisor-glibc
|
||||||
- coco-guest-components
|
- coco-guest-components
|
||||||
|
- csi-kata-directvolume
|
||||||
- firecracker
|
- firecracker
|
||||||
- genpolicy
|
- genpolicy
|
||||||
- kata-ctl
|
- kata-ctl
|
||||||
|
11
.github/workflows/ci.yaml
vendored
11
.github/workflows/ci.yaml
vendored
@ -135,6 +135,17 @@ jobs:
|
|||||||
platforms: linux/amd64, linux/s390x
|
platforms: linux/amd64, linux/s390x
|
||||||
file: tests/integration/kubernetes/runtimeclass_workloads/confidential/unencrypted/Dockerfile
|
file: tests/integration/kubernetes/runtimeclass_workloads/confidential/unencrypted/Dockerfile
|
||||||
|
|
||||||
|
publish-csi-driver-amd64:
|
||||||
|
needs: publish-kata-deploy-payload-amd64
|
||||||
|
uses: ./.github/workflows/publish-csi-driver-amd64.yaml
|
||||||
|
with:
|
||||||
|
commit-hash: ${{ inputs.commit-hash }}
|
||||||
|
pr-number: ${{ inputs.pr-number }}
|
||||||
|
registry: ghcr.io
|
||||||
|
tarball-suffix: -${{ inputs.tag }}
|
||||||
|
target-branch: ${{ inputs.target-branch }}
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
run-kata-monitor-tests:
|
run-kata-monitor-tests:
|
||||||
if: ${{ inputs.skip-test != 'yes' }}
|
if: ${{ inputs.skip-test != 'yes' }}
|
||||||
needs: build-kata-static-tarball-amd64
|
needs: build-kata-static-tarball-amd64
|
||||||
|
66
.github/workflows/publish-csi-driver-amd64.yaml
vendored
Normal file
66
.github/workflows/publish-csi-driver-amd64.yaml
vendored
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
name: CI | Publish CSI driver for amd64
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
pr-number:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
tarball-suffix:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
registry:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
commit-hash:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
target-branch:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
|
default: ""
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
publish-csi-driver:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Checkout code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
ref: ${{ inputs.commit-hash }}
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Rebase atop of the latest target branch
|
||||||
|
run: |
|
||||||
|
./tests/git-helper.sh "rebase-atop-of-the-latest-target-branch"
|
||||||
|
env:
|
||||||
|
TARGET_BRANCH: ${{ inputs.target-branch }}
|
||||||
|
|
||||||
|
- name: get-kata-tarball
|
||||||
|
uses: actions/download-artifact@v4
|
||||||
|
with:
|
||||||
|
name: kata-static-tarball-amd64${{ inputs.tarball-suffix }}
|
||||||
|
path: kata-artifacts
|
||||||
|
|
||||||
|
- name: Install tools
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh install-kata-tools kata-artifacts
|
||||||
|
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
|
- name: Login to Kata Containers ghcr.io
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: ${{ inputs.registry }}
|
||||||
|
username: ${{ github.actor }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Docker build and push
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
tags: ghcr.io/kata-containers/csi-kata-directvolume:${{ inputs.pr-number }}
|
||||||
|
push: true
|
||||||
|
context: src/tools/csi-kata-directvolume/
|
||||||
|
platforms: linux/amd64
|
||||||
|
file: src/tools/csi-kata-directvolume/Dockerfile
|
||||||
|
build-args: |
|
||||||
|
binary=/opt/kata/bin/csi-kata-directvolume
|
28
.github/workflows/run-kata-coco-tests.yaml
vendored
28
.github/workflows/run-kata-coco-tests.yaml
vendored
@ -97,6 +97,10 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
||||||
|
|
||||||
|
- name: Deploy CSI driver
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-csi-driver
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
timeout-minutes: 100
|
timeout-minutes: 100
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
@ -113,6 +117,10 @@ jobs:
|
|||||||
if: ${{ always() && matrix.machine != 'tdx-no-attestation' }}
|
if: ${{ always() && matrix.machine != 'tdx-no-attestation' }}
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh delete-coco-kbs
|
run: bash tests/integration/kubernetes/gha-run.sh delete-coco-kbs
|
||||||
|
|
||||||
|
- name: Delete CSI driver
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh delete-csi-driver
|
||||||
|
|
||||||
run-k8s-tests-on-sev:
|
run-k8s-tests-on-sev:
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@ -159,10 +167,18 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-sev
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-kata-sev
|
||||||
|
|
||||||
|
- name: Deploy CSI driver
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-csi-driver
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
timeout-minutes: 50
|
timeout-minutes: 50
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
|
|
||||||
|
- name: Delete CSI driver
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh delete-csi-driver
|
||||||
|
|
||||||
- name: Delete kata-deploy
|
- name: Delete kata-deploy
|
||||||
if: always()
|
if: always()
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh cleanup-sev
|
run: bash tests/integration/kubernetes/gha-run.sh cleanup-sev
|
||||||
@ -231,6 +247,10 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
||||||
|
|
||||||
|
- name: Deploy CSI driver
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-csi-driver
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
timeout-minutes: 50
|
timeout-minutes: 50
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
@ -247,6 +267,10 @@ jobs:
|
|||||||
if: always()
|
if: always()
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh delete-coco-kbs
|
run: bash tests/integration/kubernetes/gha-run.sh delete-coco-kbs
|
||||||
|
|
||||||
|
- name: Delete CSI driver
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh delete-csi-driver
|
||||||
|
|
||||||
# Generate jobs for testing CoCo on non-TEE environments
|
# Generate jobs for testing CoCo on non-TEE environments
|
||||||
run-k8s-tests-coco-nontee:
|
run-k8s-tests-coco-nontee:
|
||||||
strategy:
|
strategy:
|
||||||
@ -338,6 +362,10 @@ jobs:
|
|||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
run: bash tests/integration/kubernetes/gha-run.sh install-kbs-client
|
||||||
|
|
||||||
|
- name: Deploy CSI driver
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: bash tests/integration/kubernetes/gha-run.sh deploy-csi-driver
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
timeout-minutes: 80
|
timeout-minutes: 80
|
||||||
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
run: bash tests/integration/kubernetes/gha-run.sh run-tests
|
||||||
|
@ -578,6 +578,7 @@ function main() {
|
|||||||
install-kbs-client) install_kbs_client ;;
|
install-kbs-client) install_kbs_client ;;
|
||||||
install-kubectl) install_kubectl ;;
|
install-kubectl) install_kubectl ;;
|
||||||
get-cluster-credentials) get_cluster_credentials ;;
|
get-cluster-credentials) get_cluster_credentials ;;
|
||||||
|
deploy-csi-driver) return 0 ;;
|
||||||
deploy-kata) deploy_kata ;;
|
deploy-kata) deploy_kata ;;
|
||||||
deploy-kata-aks) deploy_kata "aks" ;;
|
deploy-kata-aks) deploy_kata "aks" ;;
|
||||||
deploy-kata-kcli) deploy_kata "kcli" ;;
|
deploy-kata-kcli) deploy_kata "kcli" ;;
|
||||||
@ -599,6 +600,7 @@ function main() {
|
|||||||
cleanup-garm) cleanup "garm" ;;
|
cleanup-garm) cleanup "garm" ;;
|
||||||
cleanup-zvsi) cleanup "zvsi" ;;
|
cleanup-zvsi) cleanup "zvsi" ;;
|
||||||
cleanup-snapshotter) cleanup_snapshotter ;;
|
cleanup-snapshotter) cleanup_snapshotter ;;
|
||||||
|
delete-csi-driver) return 0 ;;
|
||||||
delete-coco-kbs) delete_coco_kbs ;;
|
delete-coco-kbs) delete_coco_kbs ;;
|
||||||
delete-cluster) cleanup "aks" ;;
|
delete-cluster) cleanup "aks" ;;
|
||||||
delete-cluster-kcli) delete_cluster_kcli ;;
|
delete-cluster-kcli) delete_cluster_kcli ;;
|
||||||
|
@ -93,6 +93,9 @@ cloud-hypervisor-tarball:
|
|||||||
cloud-hypervisor-glibc-tarball:
|
cloud-hypervisor-glibc-tarball:
|
||||||
${MAKE} $@-build
|
${MAKE} $@-build
|
||||||
|
|
||||||
|
csi-kata-directvolume-tarball: copy-scripts-for-the-tools-build
|
||||||
|
exit 0
|
||||||
|
|
||||||
firecracker-tarball:
|
firecracker-tarball:
|
||||||
${MAKE} $@-build
|
${MAKE} $@-build
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user