Skip to content

Commit

Permalink
ci: mark self-managed infrastructure tests (#2537)
Browse files Browse the repository at this point in the history
* mark self-managed infrastructure tests

Signed-off-by: Moritz Sanft <[email protected]>

* add TODO

---------

Signed-off-by: Moritz Sanft <[email protected]>
  • Loading branch information
msanft authored Oct 30, 2023
1 parent 5f05810 commit 8d08ace
Show file tree
Hide file tree
Showing 7 changed files with 24 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .github/actions/cdbg_deploy/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/constellation_create/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions .github/actions/deploy_logcollection/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .github/actions/e2e_test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,8 @@ runs:
isDebugImage: ${{ inputs.isDebugImage }}
kubernetesVersion: ${{ inputs.kubernetesVersion }}
refStream: ${{ inputs.refStream }}

selfManagedInfra: ${{ inputs.selfManagedInfra }}

#
# Test payloads
#
Expand Down
11 changes: 10 additions & 1 deletion .github/actions/notify_failure/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
Expand All @@ -52,14 +56,19 @@ 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
fi
if [[ -n "${{ inputs.refStream }}" ]]; then
yq -iP '.fields.refStream = "${{ inputs.refStream }}"' metadata.json
fi
cat metadata.json
issueURL=$(
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-test-daily.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ jobs:
test: ${{ matrix.test }}
kubernetesVersion: ${{ matrix.kubernetesVersion }}
provider: ${{ matrix.provider }}
selfManagedInfra: "false"

e2e-mini:
name: Run miniconstellation E2E test
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/e2e-test-weekly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 8d08ace

Please sign in to comment.