Skip to content

Commit

Permalink
dont use test payload
Browse files Browse the repository at this point in the history
Signed-off-by: Moritz Sanft <[email protected]>
  • Loading branch information
msanft committed Oct 26, 2023
1 parent df02f59 commit a6df2f1
Show file tree
Hide file tree
Showing 9 changed files with 56 additions and 21 deletions.
7 changes: 5 additions & 2 deletions .github/actions/constellation_create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ inputs:
internalLoadBalancer:
description: "Whether to use an internal load balancer for the control plane"
required: false
selfManagedInfra:
description: "Use self-managed infrastructure instead of infrastructure created by the Constellation CLI."
required: true

outputs:
kubeconfig:
Expand Down Expand Up @@ -132,13 +135,13 @@ runs:
sudo sh -c 'echo "127.0.0.1 license.confidential.cloud" >> /etc/hosts' || true
- name: Constellation create (CLI)
if : inputs.test != 'self-managed infra'
if : inputs.selfManagedInfra != 'true'
shell: bash
run: |
constellation create -y --debug --tf-log=DEBUG
- name: Constellation create (self-managed)
if : inputs.test == 'self-managed infra'
if : inputs.selfManagedInfra == 'true'
uses: ./.github/actions/self_managed_create
with:
cloudProvider: ${{ inputs.cloudProvider }}
Expand Down
8 changes: 4 additions & 4 deletions .github/actions/constellation_destroy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ inputs:
kubeconfig:
description: "The kubeconfig for the cluster."
required: true
test:
description: "The e2e test payload."
selfManagedInfra:
description: "Use self-managed infrastructure instead of infrastructure created by the Constellation CLI."
required: true

runs:
Expand Down Expand Up @@ -42,13 +42,13 @@ runs:
echo "::endgroup::"
- name: Constellation terminate
if: inputs.test != 'self-managed infra'
if: inputs.selfManagedInfra != 'true'
shell: bash
run: |
constellation terminate --yes --tf-log=DEBUG
- name: Constellation terminate (self-managed)
if: inputs.test == 'self-managed infra'
if: inputs.selfManagedInfra == 'true'
shell: bash
working-directory: ${{ github.workspace }}/e2e-infra
run: |
Expand Down
8 changes: 6 additions & 2 deletions .github/actions/e2e_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ inputs:
description: "Azure credentials authorized to create an IAM configuration."
required: true
test:
description: "The test to run. Can currently be one of [sonobuoy full, sonobuoy quick, autoscaling, lb, perf-bench, verify, recover, malicious join, self-managed infra, nop, upgrade]."
description: "The test to run. Can currently be one of [sonobuoy full, sonobuoy quick, autoscaling, lb, perf-bench, verify, recover, malicious join, nop, upgrade]."
required: true
sonobuoyTestSuiteCmd:
description: "The sonobuoy test suite to run."
Expand All @@ -76,6 +76,9 @@ inputs:
description: "Enable security policy for the cluster."
internalLoadBalancer:
description: "Enable internal load balancer for the cluster."
selfManagedInfra:
description: "Use self-managed infrastructure instead of infrastructure created by the Constellation CLI."
default: "false"

outputs:
kubeconfig:
Expand All @@ -89,7 +92,7 @@ runs:
using: "composite"
steps:
- name: Check input
if: (!contains(fromJson('["sonobuoy full", "sonobuoy quick", "autoscaling", "perf-bench", "verify", "lb", "recover", "malicious join", "self-managed infra", "nop", "upgrade"]'), inputs.test))
if: (!contains(fromJson('["sonobuoy full", "sonobuoy quick", "autoscaling", "perf-bench", "verify", "lb", "recover", "malicious join", "nop", "upgrade"]'), inputs.test))
shell: bash
run: |
echo "::error::Invalid input for test field: ${{ inputs.test }}"
Expand Down Expand Up @@ -261,6 +264,7 @@ runs:
refStream: ${{ inputs.refStream }}
internalLoadBalancer: ${{ inputs.internalLoadBalancer }}
test: ${{ inputs.test }}
selfManagedInfra: ${{ inputs.selfManagedInfra }}

- name: Deploy log- and metrics-collection (Kubernetes)
id: deploy-logcollection
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-test-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,14 @@ jobs:
awsOpenSearchDomain: ${{ secrets.AWS_OPENSEARCH_DOMAIN }}
awsOpenSearchUsers: ${{ secrets.AWS_OPENSEARCH_USER }}
awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }}
selfManagedInfra: "false"

- name: Always terminate cluster
if: always()
uses: ./.github/actions/constellation_destroy
with:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
test: ${{ matrix.test }}
selfManagedInfra: "false"

- name: Always delete IAM configuration
if: always()
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-test-manual-internal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,14 @@ jobs:
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
fetchMeasurements: ${{ contains(needs.find-latest-image.outputs.image, '/stream/stable/') }}
internalLoadBalancer: true
selfManagedInfra: "false"

- name: Always terminate cluster
if: always()
uses: ./.github/actions/constellation_destroy
with:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
test: ${{ inputs.test }}
selfManagedInfra: "false"

- name: Always delete IAM configuration
if: always()
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/e2e-test-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ on:
- "verify"
- "recover"
- "malicious join"
- "self-managed infra"
- "nop"
required: true
kubernetesVersion:
Expand Down Expand Up @@ -261,14 +260,15 @@ jobs:
cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
fetchMeasurements: ${{ contains(needs.find-latest-image.outputs.image, '/stream/stable/') }}
selfManagedInfra: "false"

- name: Always terminate cluster
if: always()
uses: ./.github/actions/constellation_destroy
with:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
test: ${{ inputs.test }}
selfManagedInfra: "false"

- name: Always delete IAM configuration
if: always()
uses: ./.github/actions/constellation_iam_destroy
Expand Down
23 changes: 21 additions & 2 deletions .github/workflows/e2e-test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,24 @@ jobs:
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"

# self-managed infra test on latest k8s version
# runs Sonobuoy full test
- test: "sonobuoy full"
provider: "gcp"
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"
selfManagedInfra: "true"
- test: "sonobuoy full"
provider: "azure"
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"
selfManagedInfra: "true"
- test: "sonobuoy full"
provider: "aws"
kubernetes-version: "v1.28"
runner: "ubuntu-22.04"
selfManagedInfra: "true"

#
# Tests on macOS runner
#
Expand Down Expand Up @@ -213,14 +231,15 @@ jobs:
cosignPassword: ${{ secrets.COSIGN_PASSWORD }}
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
githubToken: ${{ secrets.GITHUB_TOKEN }}
selfManagedInfra: ${{ matrix.selfManagedInfra == 'true' }}

- name: Always terminate cluster
if: always()
uses: ./.github/actions/constellation_destroy
with:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
test: ${{ matrix.test }}
selfManagedInfra: ${{ matrix.selfManagedInfra == 'true' }}

- name: Always delete IAM configuration
if: always()
uses: ./.github/actions/constellation_iam_destroy
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/e2e-test-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,18 +172,22 @@ jobs:
kubernetes-version: "v1.28"

# self-managed infra test on latest k8s version
- test: "self-managed infra"
# with Sonobuoy full
- test: "sonobuoy full"
refStream: "ref/main/stream/debug/?"
provider: "gcp"
kubernetes-version: "v1.28"
- test: "self-managed infra"
selfManagedInfra: "true"
- test: "sonobuoy full"
refStream: "ref/main/stream/debug/?"
provider: "azure"
kubernetes-version: "v1.28"
- test: "self-managed infra"
selfManagedInfra: "true"
- test: "sonobuoy full"
provider: "aws"
refStream: "ref/main/stream/debug/?"
kubernetes-version: "v1.28"
selfManagedInfra: "true"

#
# Tests on release-stable refStream
Expand All @@ -202,6 +206,7 @@ jobs:
refStream: "ref/release/stream/stable/?"
provider: "aws"
kubernetes-version: "v1.27"

runs-on: ubuntu-22.04
permissions:
id-token: write
Expand Down Expand Up @@ -245,14 +250,15 @@ jobs:
cosignPrivateKey: ${{ secrets.COSIGN_PRIVATE_KEY }}
fetchMeasurements: ${{ matrix.refStream != 'ref/release/stream/stable/?' }}
azureSNPEnforcementPolicy: ${{ matrix.azureSNPEnforcementPolicy }}
selfManagedInfra: ${{ matrix.selfManagedInfra == 'true' }}

- name: Always terminate cluster
if: always()
uses: ./.github/actions/constellation_destroy
with:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
test: ${{ matrix.test }}
selfManagedInfra: ${{ matrix.selfManagedInfra == 'true' }}

- name: Always delete IAM configuration
if: always()
uses: ./.github/actions/constellation_iam_destroy
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/e2e-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ jobs:
awsOpenSearchDomain: ${{ secrets.AWS_OPENSEARCH_DOMAIN }}
awsOpenSearchUsers: ${{ secrets.AWS_OPENSEARCH_USER }}
awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }}
selfManagedInfra: "false"

- name: Build CLI
uses: ./.github/actions/build_cli
Expand Down Expand Up @@ -287,7 +288,7 @@ jobs:
uses: ./.github/actions/constellation_destroy
with:
kubeconfig: ${{ steps.e2e_test.outputs.kubeconfig }}
test: "upgrade"
selfManagedInfra: "false"

- name: Always delete IAM configuration
if: always()
Expand Down

0 comments on commit a6df2f1

Please sign in to comment.