constellation/.github/actions/e2e_test/action.yml

124 lines
4.3 KiB
YAML
Raw Normal View History

name: E2E test
description: "Run Constellation e2e test."
inputs:
workerNodesCount:
description: "Number of worker nodes to spawn."
required: true
controlNodesCount:
description: "Number of control-plane nodes to spawn."
required: true
autoscale:
description: "Autoscale?"
required: true
cloudProvider:
description: "Which cloud provider to use."
required: true
machineType:
description: "VM machine type. Make sure it matches selected cloud provider!"
required: true
coreosImage:
description: "CoreOS image to run. The default value 'debug-latest' will select the latest available debug image."
default: "debug-latest"
required: true
isDebugImage:
description: "Is CoreOS img a debug img?"
default: "true"
required: true
gcp_service_account_json:
description: "Service account with permissions to create Constellation on GCP."
required: false
2022-08-29 06:55:36 +00:00
gcpClusterServiceAccountKey:
description: "Service account to use inside the created Constellation cluster on GCP."
required: false
azure_credentials:
description: "Credentials authorized to create Constellation on Azure."
required: false
sonobuoyTestSuiteCmd:
description: "Which tests should be run? Check README for guidance!"
required: true
kubernetesVersion:
description: "Kubernetes version to create the cluster from."
required: false
cosignPublicKey:
description: "Cosign public key to sign measurements."
required: false
cosignPrivateKey:
description: "Cosign private key to sign measurements."
required: false
cosignPassword:
description: "Cosign password for private key."
required: false
awsAccessKeyID:
description: "AWS access key ID to upload measurements."
required: false
awsSecretAccessKey:
description: "AWS secrets access key to upload measurements."
required: false
awsDefaultRegion:
description: "AWS region of S3 bucket. to upload measurements."
required: false
awsBucketName:
description: "AWS S3 bucket name to upload measurements."
required: false
2022-08-30 11:42:14 +00:00
azureClientSecret:
description: "The client secret value of the used secret"
required: false
runs:
using: "composite"
steps:
- name: Build CLI
uses: ./.github/actions/build_cli
- name: Build the bootstrapper
id: build-bootstrapper
uses: ./.github/actions/build_bootstrapper
if: ${{ inputs.isDebugImage == 'true' }}
- name: Build debugd
id: build-debugd
uses: ./.github/actions/build_debugd
if: ${{ inputs.isDebugImage == 'true' }}
- name: Login to GCP
uses: ./.github/actions/gcp_login
with:
gcp_service_account_json: ${{ inputs.gcp_service_account_json }}
if: ${{ inputs.cloudProvider == 'gcp' }}
- name: Login to Azure
uses: ./.github/actions/azure_login
with:
azure_credentials: ${{ inputs.azure_credentials }}
if: ${{ inputs.cloudProvider == 'azure' }}
2022-08-30 12:35:27 +00:00
- name: Clean resource group on Azure
uses: ./.github/actions/e2e_cleanup
if: ${{ inputs.cloudProvider == 'azure' }}
- name: Create cluster
uses: ./.github/actions/constellation_create
with:
cloudProvider: ${{ inputs.cloudProvider }}
2022-08-29 06:55:36 +00:00
gcpClusterServiceAccountKey: ${{ inputs.gcpClusterServiceAccountKey }}
autoscale: ${{ inputs.autoscale }}
workerNodesCount: ${{ inputs.workerNodesCount }}
controlNodesCount: ${{ inputs.controlNodesCount }}
machineType: ${{ inputs.machineType }}
coreosImage: ${{ inputs.coreosImage }}
isDebugImage: ${{ inputs.isDebugImage }}
kubernetesVersion: ${{ inputs.kubernetesVersion }}
2022-08-30 11:42:14 +00:00
azureClientSecret: ${{ inputs.azureClientSecret }}
- name: Measure cluster
uses: ./.github/actions/constellation_measure
with:
cloudProvider: ${{ inputs.cloudProvider }}
cosignPublicKey: ${{ inputs.cosignPublicKey }}
cosignPrivateKey: ${{ inputs.cosignPrivateKey }}
cosignPassword: ${{ inputs.cosignPassword }}
awsAccessKeyID: ${{ inputs.awsAccessKeyID }}
awsSecretAccessKey: ${{ inputs.awsSecretAccessKey }}
awsDefaultRegion: ${{ inputs.awsDefaultRegion }}
awsBucketName: ${{ inputs.awsBucketName }}
- name: Run e2e tests
uses: ./.github/actions/sonobuoy
with:
sonobuoyTestSuiteCmd: ${{ inputs.sonobuoyTestSuiteCmd }}