Skip to content

Commit

Permalink
back to github run id for cluster names
Browse files Browse the repository at this point in the history
  • Loading branch information
johannes94 committed Jan 29, 2025
1 parent 5704c8b commit 42399dc
Showing 1 changed file with 6 additions and 13 deletions.
19 changes: 6 additions & 13 deletions .github/workflows/multicluster-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,14 @@ jobs:
environment: development
strategy:
matrix:
name: [mctest1, mctest2]
name: [acscs1, acscs2]
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 }}
name: ${{ matrix.name }}-${{ env.GITHUB_RUN_ID }}
lifespan: 3h
args: nodes=3,machine-type=m5.2xlarge
wait: true
Expand Down Expand Up @@ -74,11 +70,11 @@ jobs:
set -eo pipefail
mkdir kube
cluster1Conf="$(pwd)/kube/cluster1"
url=$(infractl artifacts "acscs-mctest1-$GIT_SHORT_REF" --json | jq '.Artifacts[] | select(.Name=="kubeconfig") | .URL' -r)
url=$(infractl artifacts "acscs1-$GITHUB_RUN_ID" --json | jq '.Artifacts[] | select(.Name=="kubeconfig") | .URL' -r)
wget -O "$cluster1Conf" "$url"
cluster2Conf="$(pwd)/kube/cluster2"
url=$(infractl artifacts "acscs-mctest2-$GIT_SHORT_REF" --json | jq '.Artifacts[] | select(.Name=="kubeconfig") | .URL' -r)
url=$(infractl artifacts "acscs2-$GITHUB_RUN_ID" --json | jq '.Artifacts[] | select(.Name=="kubeconfig") | .URL' -r)
wget -O "$cluster2Conf" "$url"
echo "CLUSTER_1_KUBECONFIG=$cluster1Conf" >> "$GITHUB_ENV"
Expand All @@ -102,11 +98,8 @@ jobs:
# steps:
# - name: Install infractl
# uses: stackrox/actions/infra/install-infractl@v1
# - 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"
# - name: Delete test clusters
# run: |
# set -o pipefail
# infractl delete "acscs-mctest1-$GIT_SHORT_REF"
# infractl delete "acscs-mctest2-$GIT_SHORT_REF"
# infractl delete "acscs1-$GITHUB_RUN_ID"
# infractl delete "acscs2-$GITHUB_RUN_ID"

0 comments on commit 42399dc

Please sign in to comment.