ci: run e2e test weekly on last release

Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
Paul Meyer 2023-03-21 11:46:06 +01:00
parent 24f974de66
commit 332c78da60

View File

@ -13,13 +13,18 @@ env:
jobs: jobs:
find-latest-image: find-latest-image:
name: Find latest debug image strategy:
fail-fast: false
matrix:
refStream: ["main-debug", "release-stable"]
name: Find latest image
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
contents: read contents: read
outputs: outputs:
image: ${{ steps.find-latest-image.outputs.output }} image-main-debug: ${{ steps.relabel-output.outputs.image-main-debug }}
image-release-stable: ${{ steps.relabel-output.outputs.image-release-stable }}
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0 uses: actions/checkout@24cb9080177205b6e8c946b17badbe402adc938f # v3.4.0
@ -32,13 +37,25 @@ jobs:
role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead role-to-assume: arn:aws:iam::795746500882:role/GithubConstellationVersionsAPIRead
aws-region: eu-central-1 aws-region: eu-central-1
- name: Separate ref and stream from matrix
id: separate-ref-stream
env:
REFSTREAM: ${{ matrix.refStream }}
run: |
echo "ref=${REFSTREAM%-*}" | tee "$GITHUB_OUTPUT"
echo "stream=${REFSTREAM#*-}" | tee "$GITHUB_OUTPUT"
- name: Find latest image - name: Find latest image
id: find-latest-image id: find-latest-image
uses: ./.github/actions/versionsapi uses: ./.github/actions/versionsapi
with: with:
command: latest command: latest
ref: main ref: ${{ steps.separate-ref-stream.outputs.ref == 'release' && '-' || steps.separate-ref-stream.outputs.ref }}
stream: debug stream: ${{ steps.separate-ref-stream.outputs.stream }}
- name: Relabel output
id: relabel-output
run: echo "image-${{ matrix.refStream }}=${{ steps.find-latest-image.outputs.output }}" | tee -a "$GITHUB_OUTPUT"
e2e-weekly: e2e-weekly:
strategy: strategy:
@ -56,43 +73,61 @@ jobs:
"iamcreate", "iamcreate",
] ]
provider: ["gcp", "azure", "aws"] provider: ["gcp", "azure", "aws"]
version: ["v1.24", "v1.25", "v1.26"] kubernetes-version: ["v1.24", "v1.25", "v1.26"]
refStream: ["main-debug", "release-stable"]
exclude: exclude:
# IAM create test runs only on latest version. # IAM create test runs only on latest kubernetes-version.
- test: "iamcreate" - test: "iamcreate"
version: "v1.24" kubernetes-version: "v1.24"
- test: "iamcreate" - test: "iamcreate"
version: "v1.25" kubernetes-version: "v1.25"
# Verify test runs only on latest version. # Verify test runs only on latest kubernetes-version.
- test: "verify" - test: "verify"
version: "v1.24" kubernetes-version: "v1.24"
- test: "verify" - test: "verify"
version: "v1.25" kubernetes-version: "v1.25"
# Recover test runs only on latest version. # Recover test runs only on latest kubernetes-version.
- test: "recover" - test: "recover"
version: "v1.24" kubernetes-version: "v1.24"
- test: "recover" - test: "recover"
version: "v1.25" kubernetes-version: "v1.25"
# Autoscaling test runs only on latest version. # Autoscaling test runs only on latest kubernetes-version.
- test: "autoscaling" - test: "autoscaling"
version: "v1.24" kubernetes-version: "v1.24"
- test: "autoscaling" - test: "autoscaling"
version: "v1.25" kubernetes-version: "v1.25"
# Perf-Bench test runs only on latest version. # Perf-Bench test runs only on latest kubernetes-version.
- test: "perf-bench" - test: "perf-bench"
version: "v1.24" kubernetes-version: "v1.24"
- test: "perf-bench" - test: "perf-bench"
version: "v1.25" kubernetes-version: "v1.25"
# lb test runs only on latest version. # lb test runs only on latest kubernetes-version.
- test: "lb" - test: "lb"
version: "v1.24" kubernetes-version: "v1.24"
- test: "lb" - test: "lb"
version: "v1.25" kubernetes-version: "v1.25"
# Currently not supported on AWS. # Currently not supported on AWS.
- test: "autoscaling" - test: "autoscaling"
provider: "aws" provider: "aws"
- test: "perf-bench" - test: "perf-bench"
provider: "aws" provider: "aws"
# Only iamcreate for K8s v1.25 on all providers.
- refStream: "release-stable"
kubernetes-version: "v1.24"
- refStream: "release-stable"
kubernetes-version: "v1.26"
- refStream: "release-stable"
test: "lb"
- refStream: "release-stable"
test: "perf-bench"
- refStream: "release-stable"
test: "autoscaling"
- refStream: "release-stable"
test: "sonobuoy full"
- refStream: "release-stable"
test: "verify"
- refStream: "release-stable"
test: "recover"
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
permissions: permissions:
id-token: write id-token: write
@ -134,8 +169,10 @@ jobs:
workerNodesCount: "2" workerNodesCount: "2"
controlNodesCount: "3" controlNodesCount: "3"
cloudProvider: ${{ matrix.provider }} cloudProvider: ${{ matrix.provider }}
osImage: ${{ needs.find-latest-image.outputs.image }} osImage: ${{ matrix.refStream == 'release-stable' && needs.find-latest-image.outputs.image-release-stable || needs.find-latest-image.outputs.image-main-debug }}
kubernetesVersion: ${{ matrix.version }} isDebugImage: ${{ matrix.refStream == 'main-debug' }}
cliVersion: ${{ matrix.refStream == 'release-stable' && needs.find-latest-image.outputs.image-release-stable || '' }}
kubernetesVersion: ${{ matrix.kubernetes-version }}
awsOpenSearchDomain: ${{ secrets.AWS_OPENSEARCH_DOMAIN }} awsOpenSearchDomain: ${{ secrets.AWS_OPENSEARCH_DOMAIN }}
awsOpenSearchUsers: ${{ secrets.AWS_OPENSEARCH_USER }} awsOpenSearchUsers: ${{ secrets.AWS_OPENSEARCH_USER }}
awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }} awsOpenSearchPwd: ${{ secrets.AWS_OPENSEARCH_PWD }}