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>
This commit is contained in:
Moritz Sanft 2023-10-30 14:33:58 +01:00 committed by GitHub
parent 5f05810ad7
commit 8d08ace0b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 3 deletions

View File

@ -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

View File

@ -156,6 +156,7 @@ runs:
azureIAMCreateCredentials: ${{ inputs.azureIAMCreateCredentials }}
refStream: ${{ inputs.refStream }}
kubernetesVersion: ${{ inputs.kubernetesVersion }}
selfManagedInfra: ${{ inputs.selfManagedInfra }}
- name: Constellation init
id: constellation-init

View File

@ -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

View File

@ -279,6 +279,7 @@ runs:
isDebugImage: ${{ inputs.isDebugImage }}
kubernetesVersion: ${{ inputs.kubernetesVersion }}
refStream: ${{ inputs.refStream }}
selfManagedInfra: ${{ inputs.selfManagedInfra }}
#
# Test payloads

View File

@ -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
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=$(

View File

@ -128,6 +128,7 @@ jobs:
test: ${{ matrix.test }}
kubernetesVersion: ${{ matrix.kubernetesVersion }}
provider: ${{ matrix.provider }}
selfManagedInfra: "false"
e2e-mini:
name: Run miniconstellation E2E test

View File

@ -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()