mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-01-23 22:01:14 -05:00
ci: refactor artifact and resource naming
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
1f82b4d266
commit
76979136de
@ -23,6 +23,9 @@ inputs:
|
|||||||
kubernetesVersion:
|
kubernetesVersion:
|
||||||
description: "Kubernetes version to create the cluster from."
|
description: "Kubernetes version to create the cluster from."
|
||||||
required: false
|
required: false
|
||||||
|
artifactNameSuffix:
|
||||||
|
description: "Suffix for artifact naming."
|
||||||
|
required: true
|
||||||
keepMeasurements:
|
keepMeasurements:
|
||||||
default: "false"
|
default: "false"
|
||||||
description: "Keep measurements embedded in the CLI."
|
description: "Keep measurements embedded in the CLI."
|
||||||
@ -267,5 +270,5 @@ runs:
|
|||||||
if: always() && !env.ACT
|
if: always() && !env.ACT
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||||
with:
|
with:
|
||||||
name: serial-logs-${{ inputs.cloudProvider }}
|
name: serial-logs-${{ inputs.artifactNameSuffix }}
|
||||||
path: "*.log"
|
path: "*.log"
|
||||||
|
@ -3,29 +3,23 @@ description: Create IAM configuration for a Constellation cluster.
|
|||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
cloudProvider:
|
cloudProvider:
|
||||||
description: "Either 'aws', 'azure' or 'gcp'."
|
description: "Either 'aws', 'azure' or 'gcp'."
|
||||||
required: true
|
required: true
|
||||||
|
namePrefix:
|
||||||
|
description: "Name prefix to use for resources."
|
||||||
|
required: true
|
||||||
#
|
#
|
||||||
# AWS specific inputs
|
# AWS specific inputs
|
||||||
#
|
#
|
||||||
awsZone:
|
awsZone:
|
||||||
description: "AWS zone to deploy Constellation in."
|
description: "AWS zone to deploy Constellation in."
|
||||||
required: false
|
required: false
|
||||||
awsPrefix:
|
|
||||||
description: "name prefix to use for the AWS resources."
|
|
||||||
required: false
|
|
||||||
#
|
#
|
||||||
# Azure specific inputs
|
# Azure specific inputs
|
||||||
#
|
#
|
||||||
azureRegion:
|
azureRegion:
|
||||||
description: "Azure region to deploy Constellation in."
|
description: "Azure region to deploy Constellation in."
|
||||||
required: false
|
required: false
|
||||||
azureResourceGroup:
|
|
||||||
description: "Name of the Azure resource group being created."
|
|
||||||
required: false
|
|
||||||
azureServicePrincipal:
|
|
||||||
description: "Name of the Azure service principal being created."
|
|
||||||
required: false
|
|
||||||
#
|
#
|
||||||
# GCP specific inputs
|
# GCP specific inputs
|
||||||
#
|
#
|
||||||
@ -35,9 +29,6 @@ inputs:
|
|||||||
gcpZone:
|
gcpZone:
|
||||||
description: "The GCP zone to deploy Constellation in."
|
description: "The GCP zone to deploy Constellation in."
|
||||||
required: false
|
required: false
|
||||||
gcpServiceAccountID:
|
|
||||||
description: "ID of the GCP service account being created."
|
|
||||||
required: false
|
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
existingConfig:
|
existingConfig:
|
||||||
@ -53,7 +44,7 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
constellation iam create aws \
|
constellation iam create aws \
|
||||||
--zone=${{ inputs.awsZone }} \
|
--zone=${{ inputs.awsZone }} \
|
||||||
--prefix=${{ inputs.awsPrefix }} \
|
--prefix=${{ inputs.namePrefix }} \
|
||||||
--generate-config --yes
|
--generate-config --yes
|
||||||
|
|
||||||
- name: Constellation iam create azure
|
- name: Constellation iam create azure
|
||||||
@ -62,8 +53,8 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
constellation iam create azure \
|
constellation iam create azure \
|
||||||
--region=${{ inputs.azureRegion }} \
|
--region=${{ inputs.azureRegion }} \
|
||||||
--resourceGroup=${{ inputs.azureResourceGroup }} \
|
--resourceGroup="${{ inputs.namePrefix }}-rg" \
|
||||||
--servicePrincipal=${{ inputs.azureServicePrincipal }} \
|
--servicePrincipal="${{ inputs.namePrefix }}-sp" \
|
||||||
--generate-config --yes
|
--generate-config --yes
|
||||||
|
|
||||||
- name: Constellation iam create gcp
|
- name: Constellation iam create gcp
|
||||||
@ -73,7 +64,7 @@ runs:
|
|||||||
constellation iam create gcp \
|
constellation iam create gcp \
|
||||||
--projectID=${{ inputs.gcpProjectID }} \
|
--projectID=${{ inputs.gcpProjectID }} \
|
||||||
--zone=${{ inputs.gcpZone }} \
|
--zone=${{ inputs.gcpZone }} \
|
||||||
--serviceAccountID=${{ inputs.gcpServiceAccountID }} \
|
--serviceAccountID="${{ inputs.namePrefix }}-sa" \
|
||||||
--generate-config --yes
|
--generate-config --yes
|
||||||
|
|
||||||
- name: Set existing config
|
- name: Set existing config
|
||||||
|
11
.github/actions/e2e_sonobuoy/action.yml
vendored
11
.github/actions/e2e_sonobuoy/action.yml
vendored
@ -2,11 +2,12 @@ name: sonobuoy
|
|||||||
description: "Execute the e2e test framework sonobuoy."
|
description: "Execute the e2e test framework sonobuoy."
|
||||||
|
|
||||||
inputs:
|
inputs:
|
||||||
cloudProvider:
|
artifactNameSuffix:
|
||||||
description: "CSP name necessary for artifact naming."
|
description: "Suffix for artifact naming."
|
||||||
required: true
|
required: true
|
||||||
sonobuoyTestSuiteCmd:
|
sonobuoyTestSuiteCmd:
|
||||||
description: "Which tests should be run?"
|
description: "Which tests should be run?"
|
||||||
|
required: true
|
||||||
kubeconfig:
|
kubeconfig:
|
||||||
description: "The kubeconfig of the cluster to test."
|
description: "The kubeconfig of the cluster to test."
|
||||||
required: true
|
required: true
|
||||||
@ -45,14 +46,14 @@ runs:
|
|||||||
if: always() && !env.ACT
|
if: always() && !env.ACT
|
||||||
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
|
||||||
with:
|
with:
|
||||||
name: "sonobuoy_logs_${{ inputs.cloudProvider}}.tar.gz"
|
name: "sonobuoy-logs-${{ inputs.artifactNameSuffix }}.tar.gz"
|
||||||
path: "*_sonobuoy_*.tar.gz"
|
path: "*-sonobuoy-*.tar.gz"
|
||||||
|
|
||||||
# Only works on "sonobuoy full" tests (e2e plugin)
|
# Only works on "sonobuoy full" tests (e2e plugin)
|
||||||
- name: Extract test results
|
- name: Extract test results
|
||||||
if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e')
|
if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e')
|
||||||
shell: bash
|
shell: bash
|
||||||
run: tar -xf *_sonobuoy_*.tar.gz
|
run: tar -xf *-sonobuoy-*.tar.gz
|
||||||
|
|
||||||
- name: Publish test results
|
- name: Publish test results
|
||||||
if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e')
|
if: (!env.ACT) && contains(inputs.sonobuoyTestSuiteCmd, '--plugin e2e')
|
||||||
|
16
.github/actions/e2e_test/action.yml
vendored
16
.github/actions/e2e_test/action.yml
vendored
@ -167,26 +167,24 @@ runs:
|
|||||||
with:
|
with:
|
||||||
azure_credentials: ${{ inputs.azureIAMCreateCredentials }}
|
azure_credentials: ${{ inputs.azureIAMCreateCredentials }}
|
||||||
|
|
||||||
- name: Create UUID
|
- name: Create prefix
|
||||||
id: create-uuid
|
id: create-prefix
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
uuid=$(uuidgen)
|
uuid=$(uuidgen)
|
||||||
echo "uuid=${uuid%%-*}" >> $GITHUB_OUTPUT
|
echo "uuid=${uuid%%-*}" | tee -a $GITHUB_OUTPUT
|
||||||
|
echo "prefix=e2e-${{ github.run_id }}-${{ github.run_attempt }}-${uuid}" | tee -a $GITHUB_OUTPUT
|
||||||
|
|
||||||
- name: Create IAM configuration
|
- name: Create IAM configuration
|
||||||
id: constellation-iam-create
|
id: constellation-iam-create
|
||||||
uses: ./.github/actions/constellation_iam_create
|
uses: ./.github/actions/constellation_iam_create
|
||||||
with:
|
with:
|
||||||
cloudProvider: ${{ inputs.cloudProvider }}
|
cloudProvider: ${{ inputs.cloudProvider }}
|
||||||
|
namePrefix: ${{ steps.create-prefix.outputs.prefix }}
|
||||||
awsZone: eu-central-1c
|
awsZone: eu-central-1c
|
||||||
awsPrefix: e2e_${{ github.run_id }}_${{ github.run_attempt }}_${{ steps.create-uuid.outputs.uuid }}
|
|
||||||
azureRegion: northeurope
|
azureRegion: northeurope
|
||||||
azureResourceGroup: e2e_${{ github.run_id }}_${{ github.run_attempt }}_${{ steps.create-uuid.outputs.uuid }}_rg
|
|
||||||
azureServicePrincipal: e2e_${{ github.run_id }}_${{ github.run_attempt }}_${{ steps.create-uuid.outputs.uuid }}_sp
|
|
||||||
gcpProjectID: ${{ inputs.gcpProject }}
|
gcpProjectID: ${{ inputs.gcpProject }}
|
||||||
gcpZone: europe-west3-b
|
gcpZone: europe-west3-b
|
||||||
gcpServiceAccountID: e2e-${{ github.run_id }}-${{ github.run_attempt }}-${{ steps.create-uuid.outputs.uuid }}-sa
|
|
||||||
|
|
||||||
- name: Login to GCP (Cluster service account)
|
- name: Login to GCP (Cluster service account)
|
||||||
if: inputs.cloudProvider == 'gcp'
|
if: inputs.cloudProvider == 'gcp'
|
||||||
@ -223,6 +221,7 @@ runs:
|
|||||||
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
kubernetesVersion: ${{ inputs.kubernetesVersion }}
|
||||||
keepMeasurements: ${{ inputs.keepMeasurements }}
|
keepMeasurements: ${{ inputs.keepMeasurements }}
|
||||||
existingConfig: ${{ steps.constellation-iam-create.outputs.existingConfig }}
|
existingConfig: ${{ steps.constellation-iam-create.outputs.existingConfig }}
|
||||||
|
artifactNameSuffix: ${{ steps.create-prefix.outputs.prefix }}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Test payloads
|
# Test payloads
|
||||||
@ -239,7 +238,7 @@ runs:
|
|||||||
with:
|
with:
|
||||||
sonobuoyTestSuiteCmd: "--mode quick"
|
sonobuoyTestSuiteCmd: "--mode quick"
|
||||||
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
|
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
|
||||||
cloudProvider: ${{ inputs.cloudProvider }}
|
artifactNameSuffix: ${{ steps.create-prefix.outputs.prefix }}
|
||||||
|
|
||||||
- name: Run sonobuoy full test
|
- name: Run sonobuoy full test
|
||||||
if: inputs.test == 'sonobuoy full'
|
if: inputs.test == 'sonobuoy full'
|
||||||
@ -249,6 +248,7 @@ runs:
|
|||||||
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
sonobuoyTestSuiteCmd: '--plugin e2e --plugin-env e2e.E2E_FOCUS="\[Conformance\]" --plugin-env e2e.E2E_SKIP="for service with type clusterIP|HostPort validates that there is no conflict between pods with same hostPort but different hostIP and protocol" --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-plugin.yaml --plugin https://raw.githubusercontent.com/vmware-tanzu/sonobuoy-plugins/master/cis-benchmarks/kube-bench-master-plugin.yaml'
|
||||||
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
|
kubeconfig: ${{ steps.constellation-create.outputs.kubeconfig }}
|
||||||
cloudProvider: ${{ inputs.cloudProvider }}
|
cloudProvider: ${{ inputs.cloudProvider }}
|
||||||
|
artifactNameSuffix: ${{ steps.create-prefix.outputs.prefix }}
|
||||||
|
|
||||||
- name: Run autoscaling test
|
- name: Run autoscaling test
|
||||||
if: inputs.test == 'autoscaling'
|
if: inputs.test == 'autoscaling'
|
||||||
|
Loading…
Reference in New Issue
Block a user