From 8d08ace0b5089e94dcb85cec051a71040c81eef9 Mon Sep 17 00:00:00 2001 From: Moritz Sanft <58110325+msanft@users.noreply.github.com> Date: Mon, 30 Oct 2023 14:33:58 +0100 Subject: [PATCH] ci: mark self-managed infrastructure tests (#2537) * mark self-managed infrastructure tests Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> * add TODO --------- Signed-off-by: Moritz Sanft <58110325+msanft@users.noreply.github.com> --- .github/actions/cdbg_deploy/action.yml | 4 ++++ .github/actions/constellation_create/action.yml | 3 ++- .github/actions/deploy_logcollection/action.yml | 4 ++++ .github/actions/e2e_test/action.yml | 3 ++- .github/actions/notify_failure/action.yml | 11 ++++++++++- .github/workflows/e2e-test-daily.yml | 1 + .github/workflows/e2e-test-weekly.yml | 1 + 7 files changed, 24 insertions(+), 3 deletions(-) diff --git a/.github/actions/cdbg_deploy/action.yml b/.github/actions/cdbg_deploy/action.yml index 5a555554f..ca894407f 100644 --- a/.github/actions/cdbg_deploy/action.yml +++ b/.github/actions/cdbg_deploy/action.yml @@ -20,6 +20,9 @@ inputs: refStream: description: "The refStream of the image the test runs on." required: true + selfManagedInfra: + description: "Use self-managed infrastructure instead of infrastructure created by the Constellation CLI." + default: "false" runs: using: "composite" @@ -94,6 +97,7 @@ runs: --info logcollect.github.is-debug-cluster=false \ --info logcollect.github.ref-stream="${{ inputs.refStream }}" \ --info logcollect.github.kubernetes-version="${{ inputs.kubernetesVersion }}" \ + --info logcollect.github.self-managed-infra="${{ inputs.selfManagedInfra }}" \ --info logcollect.deployment-type="debugd" \ --verbosity=-1 \ --force diff --git a/.github/actions/constellation_create/action.yml b/.github/actions/constellation_create/action.yml index 05ae8cb45..c484de1eb 100644 --- a/.github/actions/constellation_create/action.yml +++ b/.github/actions/constellation_create/action.yml @@ -156,7 +156,8 @@ runs: azureIAMCreateCredentials: ${{ inputs.azureIAMCreateCredentials }} refStream: ${{ inputs.refStream }} kubernetesVersion: ${{ inputs.kubernetesVersion }} - + selfManagedInfra: ${{ inputs.selfManagedInfra }} + - name: Constellation init id: constellation-init shell: bash diff --git a/.github/actions/deploy_logcollection/action.yml b/.github/actions/deploy_logcollection/action.yml index 7f68f82f4..b90912261 100644 --- a/.github/actions/deploy_logcollection/action.yml +++ b/.github/actions/deploy_logcollection/action.yml @@ -29,6 +29,9 @@ inputs: kubernetesVersion: description: "Kubernetes version of the cluster" required: false + selfManagedInfra: + description: "Use self-managed infrastructure instead of infrastructure created by the Constellation CLI." + default: "false" runs: using: "composite" @@ -54,6 +57,7 @@ runs: --fields github.e2e-test-provider="${{ inputs.provider }}" \ --fields github.ref-stream="${{ inputs.refStream }}" \ --fields github.kubernetes-version="${{ inputs.kubernetesVersion }}" \ + --fields github.self-managed-infra="${{ inputs.selfManagedInfra }}" \ --fields deployment-type="k8s" # Make sure that helm is installed diff --git a/.github/actions/e2e_test/action.yml b/.github/actions/e2e_test/action.yml index 00de05ab8..8639c450e 100644 --- a/.github/actions/e2e_test/action.yml +++ b/.github/actions/e2e_test/action.yml @@ -279,7 +279,8 @@ runs: isDebugImage: ${{ inputs.isDebugImage }} kubernetesVersion: ${{ inputs.kubernetesVersion }} refStream: ${{ inputs.refStream }} - + selfManagedInfra: ${{ inputs.selfManagedInfra }} + # # Test payloads # diff --git a/.github/actions/notify_failure/action.yml b/.github/actions/notify_failure/action.yml index ec9672eb3..de1c87af6 100644 --- a/.github/actions/notify_failure/action.yml +++ b/.github/actions/notify_failure/action.yml @@ -20,6 +20,9 @@ inputs: kubernetesVersion: description: "Kubernetes version" required: false + selfManagedInfra: + description: "Use self-managed infrastructure instead of infrastructure created by the Constellation CLI." + default: "false" runs: using: "composite" @@ -37,6 +40,7 @@ runs: run: | # TODO(katexochen): add job number when possible jobURL="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" + # TODO(msanft): Add Self-managed param once logcollection is fixed. opensearchURL="https://search-e2e-logs-y46renozy42lcojbvrt3qq7csm.eu-central-1.es.amazonaws.com/_dashboards/app/discover#/?_g=(filters:!(),refreshInterval:(pause:!t,value:0),time:(from:now-7d,to:now))&_a=(columns:!(metadata.name,systemd.unit,kubernetes.pod_name,message),filters:!(('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.e2e-test-provider,negate:!f,params:(query:${{ inputs.provider }}),type:phrase),query:(match_phrase:(metadata.github.e2e-test-provider:${{ inputs.provider }}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.run-id,negate:!f,params:(query:${{ github.run_id }}),type:phrase),query:(match_phrase:(metadata.github.run-id:${{ github.run_id }}))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.ref-stream.keyword,negate:!f,params:(query:'${{ inputs.refStream }}'),type:phrase),query:(match_phrase:(metadata.github.ref-stream.keyword:'${{ inputs.refStream }}'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.kubernetes-version.keyword,negate:!f,params:(query:'${{ inputs.kubernetesVersion }}'),type:phrase),query:(match_phrase:(metadata.github.kubernetes-version.keyword:'${{ inputs.kubernetesVersion }}'))),('$state':(store:appState),meta:(alias:!n,disabled:!f,index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',key:metadata.github.e2e-test-payload,negate:!f,params:(query:'${{ inputs.test }}'),type:phrase),query:(match_phrase:(metadata.github.e2e-test-payload:'${{ inputs.test }}')))),index:'74517cf0-6442-11ed-acf1-47dda8fdfbbb',interval:auto,query:(language:kuery,query:''),sort:!())" cat << EOF > header.md @@ -52,7 +56,11 @@ runs: DATE=$(date '+%F %a %T %Z') yq -iP '.issueTitle = env(DATE)' metadata.json yq -iP '.assignees += [ "${{ steps.pick-assignee.outputs.assignee }}" ]' metadata.json yq -iP '.fields.cloudProvider = "${{ inputs.provider }}"' metadata.json - yq -iP '.fields.test = "${{ inputs.test }}"' metadata.json + if [[ ${{ inputs.selfManagedInfra }} == 'true' ]]; then + yq -iP '.fields.test = "${{ inputs.test }} (Self-managed infrastructure)"' metadata.json + else + yq -iP '.fields.test = "${{ inputs.test }}"' metadata.json + fi yq -iP '.fields.workflow = "${{ github.workflow }}"' metadata.json if [[ -n "${{ inputs.kubernetesVersion }}" ]]; then yq -iP '.fields.kubernetesVersion = "${{ inputs.kubernetesVersion }}"' metadata.json @@ -60,6 +68,7 @@ runs: if [[ -n "${{ inputs.refStream }}" ]]; then yq -iP '.fields.refStream = "${{ inputs.refStream }}"' metadata.json fi + cat metadata.json issueURL=$( diff --git a/.github/workflows/e2e-test-daily.yml b/.github/workflows/e2e-test-daily.yml index 803ddd435..14c7f6a42 100644 --- a/.github/workflows/e2e-test-daily.yml +++ b/.github/workflows/e2e-test-daily.yml @@ -128,6 +128,7 @@ jobs: test: ${{ matrix.test }} kubernetesVersion: ${{ matrix.kubernetesVersion }} provider: ${{ matrix.provider }} + selfManagedInfra: "false" e2e-mini: name: Run miniconstellation E2E test diff --git a/.github/workflows/e2e-test-weekly.yml b/.github/workflows/e2e-test-weekly.yml index 27d104207..af756db0d 100644 --- a/.github/workflows/e2e-test-weekly.yml +++ b/.github/workflows/e2e-test-weekly.yml @@ -281,6 +281,7 @@ jobs: test: ${{ matrix.test }} kubernetesVersion: ${{ matrix.kubernetes-version }} provider: ${{ matrix.provider }} + selfManagedInfra: ${{ matrix.selfManagedInfra == 'true' }} - name: Always upload Terraform logs if: always()