From f6ee5bb27404500a8a53bb4ddc1519b2d93f9118 Mon Sep 17 00:00:00 2001 From: Markus Rudy Date: Fri, 15 Nov 2024 15:55:22 +0100 Subject: [PATCH] e2e: smoke test for peer pods Co-authored-by: Paul Meyer <49727155+katexochen@users.noreply.github.com> --- .github/workflows/e2e_peerpods.yml | 49 +++++++++++++++++++++++ packages/scripts.nix | 10 +++++ packages/test-peerpods.sh | 62 ++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 .github/workflows/e2e_peerpods.yml create mode 100644 packages/test-peerpods.sh diff --git a/.github/workflows/e2e_peerpods.yml b/.github/workflows/e2e_peerpods.yml new file mode 100644 index 000000000..bfac9aa6b --- /dev/null +++ b/.github/workflows/e2e_peerpods.yml @@ -0,0 +1,49 @@ +name: e2e peer-pods + +on: + workflow_dispatch: + inputs: + image-id: + description: "ID of the guest VM image to test (default: build a fresh image)" + required: false + pull_request: + paths: + - .github/workflows/e2e_peerpods.yml + - packages/test-peerpods.sh + - packages/by-name/cloud-api-adaptor/** + - packages/by-name/kata/** + - packages/by-name/image-podvm/** + - packages/nixos + +jobs: + test: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 + - uses: ./.github/actions/setup_nix + with: + githubToken: ${{ secrets.GITHUB_TOKEN }} + cachixToken: ${{ secrets.CACHIX_AUTH_TOKEN }} + - name: Login to Azure + uses: azure/login@a65d910e8af852a8061c627c456678983e180302 # v2.2.0 + with: + creds: ${{ secrets.CONTRAST_CI_INFRA_AZURE }} + - name: Test peer-pods + env: + azure_subscription_id: ${{ vars.AZURE_SUBSCRIPTION_ID }} + azure_image_id: ${{ inputs.image-id }} + azure_resource_group: contrast-ci + azure_location: germanywestcentral + CONTRAST_CACHE_DIR: "./workspace.cache" + run: | + ssh-keygen -t rsa -f ./infra/azure-peerpods/id_rsa -N "" + cat >infra/azure-peerpods/iam.auto.tfvars <infra/azure-peerpods/image_id.auto.tfvars +fi + +cat >infra/azure-peerpods/just.auto.tfvars <