Skip to content

Commit

Permalink
shorten feedbackcycling by reusing cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes94 committed Jan 24, 2025
1 parent 59549a9 commit e72e27e
Showing 1 changed file with 25 additions and 25 deletions.
50 changes: 25 additions & 25 deletions .github/workflows/multicluster-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,34 +25,34 @@ on:
- 'internal/dinosaur/pkg/services/dinosaur.go'

jobs:
create-cluster:
name: "Create Test Infra Clusters"
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.head.repo.fork && !github.event.pull_request.draft }} # do not run for PRs from forks and drafts
environment: development
strategy:
matrix:
name: [mctest1, mctest2]
steps:
- name: Set commit short ref
id: commit-ref
# did not use git rev-parse here because it requires a checkout before
run: echo "GIT_SHORT_REF=$(echo ${{ github.sha }} | cut -c 1-7)" >> "$GITHUB_OUTPUT"
- name: Create cluster
uses: stackrox/actions/infra/create-cluster@v1
with:
token: ${{ secrets.INFRA_TOKEN }}
flavor: osd-on-aws
name: acscs-${{ matrix.name }}-${{ steps.commit-ref.outputs.GIT_SHORT_REF }}
lifespan: 3h
args: nodes=3,machine-type=m5.2xlarge
wait: true
# create-cluster:
# name: "Create Test Infra Clusters"
# runs-on: ubuntu-latest
# if: ${{ !github.event.pull_request.head.repo.fork && !github.event.pull_request.draft }} # do not run for PRs from forks and drafts
# environment: development
# strategy:
# matrix:
# name: [mctest1, mctest2]
# steps:
# - name: Set commit short ref
# id: commit-ref
# # did not use git rev-parse here because it requires a checkout before
# run: echo "GIT_SHORT_REF=$(echo ${{ github.sha }} | cut -c 1-7)" >> "$GITHUB_OUTPUT"
# - name: Create cluster
# uses: stackrox/actions/infra/create-cluster@v1
# with:
# token: ${{ secrets.INFRA_TOKEN }}
# flavor: osd-on-aws
# name: acscs-${{ matrix.name }}-${{ steps.commit-ref.outputs.GIT_SHORT_REF }}
# lifespan: 3h
# args: nodes=3,machine-type=m5.2xlarge
# wait: true

e2e-test:
name: "Multicluster e2e tests"
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.head.repo.fork && !github.event.pull_request.draft }} # do not run for PRs from forks and drafts
needs: [create-cluster]
# needs: [create-cluster]
environment: development
permissions:
id-token: write
Expand All @@ -64,8 +64,8 @@ jobs:
uses: actions/checkout@v4
- name: Set commit short ref
# did not use git rev-parse here because it requires a checkout before
run: echo "GIT_SHORT_REF=$(echo ${{ github.sha }} | cut -c 1-7)" >> "$GITHUB_ENV"
# run: echo "GIT_SHORT_REF=83842f4" >> "$GITHUB_ENV"
# run: echo "GIT_SHORT_REF=$(echo ${{ github.sha }} | cut -c 1-7)" >> "$GITHUB_ENV"
run: echo "GIT_SHORT_REF=a2431d5" >> "$GITHUB_ENV"
- name: Set cluster credentials
env:
INFRA_TOKEN: ${{ secrets.INFRA_TOKEN }}
Expand Down

0 comments on commit e72e27e

Please sign in to comment.