Skip to content

Commit

Permalink
reverse runid-attempt for cluster id
Browse files Browse the repository at this point in the history
  • Loading branch information
k15r committed Aug 7, 2024
1 parent 417cf43 commit 45e2477
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .github/workflows/pr-loadtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,11 @@ jobs:
uses: "./.github/template/setup-golang"

- name: Setup gardener cluster name
run: echo "GARDENER_CLUSTER_NAME=$(echo ${{ matrix.name }}-${{ github.run_id }}${{ github.run_attempt }} | tr -cd '[:alnum:]' | cut -c 1-14)" >> $GITHUB_ENV
run: |
ID=$(echo ${{ github.run_id }}${{ github.run_attempt }} | rev )
SHORT_NAME=$(echo ${{ matrix.name }} | awk -F- '{for(i=1;i<=NF;i++) printf "%s",substr($i,1,1);print "";}')
GARDENER_CLUSTER_NAME=$(echo lt-${SHORT_NAME}-${ID} | cut -c 1-14)
echo "GARDENER_CLUSTER_NAME=$GARDENER_CLUSTER_NAME" >> $GITHUB_ENV
# save gardener kubeconfig to a temp file in order to pass it to the command
- name: Save service account to file
Expand Down

0 comments on commit 45e2477

Please sign in to comment.