Skip to content

Commit b25c950

Browse files
committed
Set cluster name as env var
1 parent 329887f commit b25c950

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/e2e-ci.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ env:
3737
DEFAULT_SLEEP_TIMEOUT_SECONDS: 10
3838
KUBECTL_WAIT_TIMEOUT: 300s
3939
DEBUG: ${{ github.event.inputs.debug || false }}
40+
CLUSTER_NAME: 'e2e-ci-prometheus-federator'
4041

4142
permissions:
4243
contents: write
@@ -75,15 +76,15 @@ jobs:
7576
run : ./.github/workflows/e2e/scripts/install-k3d.sh
7677
-
7778
name : Setup k3d cluster
78-
run : CLUSTER_NAME=e2e-ci-prometheus-federator K3S_VERSION=${{ matrix.k3s_version }} ./.github/workflows/e2e/scripts/setup-cluster.sh
79+
run : K3S_VERSION=${{ matrix.k3s_version }} ./.github/workflows/e2e/scripts/setup-cluster.sh
7980
-
8081
name: Import Images Into k3d
8182
run: |
82-
k3d image import ${REPO}/prometheus-federator:${TAG} -c e2e-ci-prometheus-federator;
83+
k3d image import ${REPO}/prometheus-federator:${TAG} -c $CLUSTER_NAME;
8384
-
8485
name: Setup kubectl context
8586
run: |
86-
kubectl config use-context k3d-e2e-ci-prometheus-federator;
87+
kubectl config use-context "k3d-$CLUSTER_NAME";
8788
-
8889
name: Set Up Tmate Debug Session
8990
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.enable_tmate == 'true' }}

0 commit comments

Comments
 (0)