mirror of
https://github.com/edgelesssys/constellation.git
synced 2024-12-11 08:54:21 -05:00
c3c0940adb
* bazel: add configuration for remote caching * ci: enable bazel remote caching for building binaries * ci: use bazel directly when building go binaries * ci: enable cache for most build steps * dev-docs: document remote caching
76 lines
2.3 KiB
YAML
76 lines
2.3 KiB
YAML
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
|
|
buildBuddyApiKey:
|
|
description: "BuildBuddy API key for caching Bazel artifacts"
|
|
required: true
|
|
|
|
runs:
|
|
using: "composite"
|
|
steps:
|
|
- name: Install terraform
|
|
uses: hashicorp/setup-terraform@633666f66e0061ca3b725c73b2ec20cd13a8fdd1 # v2.0.3
|
|
with:
|
|
terraform_wrapper: false
|
|
|
|
- name: Setup Go environment
|
|
uses: actions/setup-go@6edd4406fa81c3da01a34fa6f6343087c207a568 # v3.5.0
|
|
with:
|
|
go-version: "1.20.2"
|
|
|
|
- name: Setup bazel
|
|
uses: ./.github/actions/setup_bazel
|
|
with:
|
|
useCache: "true"
|
|
buildBuddyApiKey: ${{ inputs.buildBuddyApiKey }}
|
|
|
|
- name: Build Constellation CLI
|
|
uses: ./.github/actions/build_cli
|
|
with:
|
|
enterpriseCLI: true
|
|
outputPath: build/constellation
|
|
|
|
- name: MiniConstellation E2E
|
|
shell: bash
|
|
env:
|
|
ARM_CLIENT_ID: ${{ inputs.azureClientID }}
|
|
ARM_SUBSCRIPTION_ID: ${{ inputs.azureSubscriptionID }}
|
|
ARM_TENANT_ID: ${{ inputs.azureTenantID }}
|
|
run: |
|
|
echo "::group::Terraform"
|
|
cd .github/actions/e2e_mini
|
|
terraform init
|
|
terraform apply -auto-approve
|
|
terraform output -raw ssh_private_key > id_rsa
|
|
chmod 600 id_rsa
|
|
export AZURE_VM_IP=$(terraform output -raw public_ip)
|
|
echo "::endgroup::"
|
|
|
|
./wait-for-ssh.sh
|
|
# Copy locally build Constellation CLI and run e2e script.
|
|
scp -i id_rsa ../../../build/constellation adminuser@${AZURE_VM_IP}:.
|
|
ssh -i id_rsa adminuser@${AZURE_VM_IP} 'bash -s' < run-e2e.sh
|
|
|
|
- name: Delete deployment
|
|
if: always()
|
|
shell: bash
|
|
env:
|
|
ARM_CLIENT_ID: ${{ inputs.azureClientID }}
|
|
ARM_SUBSCRIPTION_ID: ${{ inputs.azureSubscriptionID }}
|
|
ARM_TENANT_ID: ${{ inputs.azureTenantID }}
|
|
run: |
|
|
echo "::group::Terminate"
|
|
cd .github/actions/e2e_mini
|
|
terraform destroy -auto-approve
|
|
echo "::endgroup::"
|