2022-12-14 16:51:42 +01:00
|
|
|
name: E2E QEMU test
|
|
|
|
description: "Test MiniConstellation functionality on Azure VM."
|
|
|
|
|
|
|
|
inputs:
|
|
|
|
azureClientID:
|
|
|
|
description: "Azure client to use for login with OIDC"
|
|
|
|
required: true
|
|
|
|
azureSubscriptionID:
|
|
|
|
description: "Azure subscription to use for login with OIDC"
|
|
|
|
required: true
|
|
|
|
azureTenantID:
|
|
|
|
description: "Azure tenant to use for login with OIDC"
|
|
|
|
required: true
|
2024-05-31 13:51:55 +02:00
|
|
|
azureIAMCredentials:
|
|
|
|
description: "Azure IAM credentials used for cleaning up resources"
|
|
|
|
required: true
|
2023-05-12 17:14:32 +02:00
|
|
|
registry:
|
|
|
|
description: "Container registry to use"
|
|
|
|
required: true
|
|
|
|
githubToken:
|
|
|
|
description: "GitHub authorization token"
|
|
|
|
required: true
|
2022-12-14 16:51:42 +01:00
|
|
|
|
|
|
|
runs:
|
|
|
|
using: "composite"
|
|
|
|
steps:
|
|
|
|
- name: Install terraform
|
2024-11-28 16:15:26 +01:00
|
|
|
uses: hashicorp/setup-terraform@b9cd54a3c349d3f38e8881555d616ced269862dd # v3.1.2
|
2022-12-14 16:51:42 +01:00
|
|
|
with:
|
|
|
|
terraform_wrapper: false
|
|
|
|
|
2023-03-20 16:05:08 +01:00
|
|
|
- name: Setup bazel
|
2023-10-04 13:55:38 +02:00
|
|
|
uses: ./.github/actions/setup_bazel_nix
|
2023-03-20 16:05:08 +01:00
|
|
|
|
2023-05-12 17:14:32 +02:00
|
|
|
- name: Log in to the Container registry
|
2023-06-06 12:20:09 +02:00
|
|
|
uses: ./.github/actions/container_registry_login
|
2023-05-12 17:14:32 +02:00
|
|
|
with:
|
|
|
|
registry: ${{ inputs.registry }}
|
|
|
|
username: ${{ github.actor }}
|
|
|
|
password: ${{ inputs.githubToken }}
|
|
|
|
|
2022-12-14 16:51:42 +01:00
|
|
|
- name: MiniConstellation E2E
|
|
|
|
shell: bash
|
2024-05-31 13:51:55 +02:00
|
|
|
id: e2e-test
|
2023-01-18 10:15:58 +01:00
|
|
|
env:
|
|
|
|
ARM_CLIENT_ID: ${{ inputs.azureClientID }}
|
|
|
|
ARM_SUBSCRIPTION_ID: ${{ inputs.azureSubscriptionID }}
|
|
|
|
ARM_TENANT_ID: ${{ inputs.azureTenantID }}
|
2022-12-14 16:51:42 +01:00
|
|
|
run: |
|
2024-05-14 11:46:52 +02:00
|
|
|
bazel run --test_timeout=14400 //e2e/miniconstellation:push_remote_test
|
2024-05-31 13:51:55 +02:00
|
|
|
|
|
|
|
- name: Log in to azure
|
|
|
|
# only log in if e2e test failed or if the run was cancelled
|
|
|
|
if: (failure() && steps.e2e-test.conclusion == 'failure') || cancelled()
|
|
|
|
uses: ./.github/actions/login_azure
|
|
|
|
with:
|
|
|
|
azure_credentials: ${{ inputs.azureIAMCredentials }}
|
|
|
|
|
|
|
|
- name: Clean up after failure
|
|
|
|
shell: bash
|
|
|
|
# clean up if e2e test failed or if the run was cancelled
|
|
|
|
if: (failure() && steps.e2e-test.conclusion == 'failure') || cancelled()
|
|
|
|
run: |
|
2024-09-25 08:37:27 +02:00
|
|
|
echo "[*] Deleting resource group ${{ steps.e2e-test.outputs.rgname }}"
|
|
|
|
az group delete -y --resource-group "${{ steps.e2e-test.outputs.rgname }}"
|