From 9fb37fd9a4140008eef80be55ea4c0a4cdc9f2da Mon Sep 17 00:00:00 2001 From: Ryan Tan Date: Thu, 14 Nov 2024 13:19:25 +0800 Subject: [PATCH] setting kubeconfig as env manually --- .github/workflows/otel-integration-e2e-test.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/otel-integration-e2e-test.yml b/.github/workflows/otel-integration-e2e-test.yml index db73b5c3..b9e13206 100644 --- a/.github/workflows/otel-integration-e2e-test.yml +++ b/.github/workflows/otel-integration-e2e-test.yml @@ -22,14 +22,16 @@ jobs: with: create-kind-cluster: "true" cluster-name: "otel-integration-agent-e2e" - - name: Display KUBECONFIG config + - name: Save kubeconfig to file run: | - kubectl config view --raw - ls $HOME/.kube - cat $HOME/.kube/config + mkdir -p $HOME/.kube + kubectl config view --raw > $HOME/.kube/config + echo "KUBECONFIG=$HOME/.kube/config" >> $GITHUB_ENV - name: Setup Secret run: kubectl create secret generic coralogix-keys --from-literal=PRIVATE_KEY=123 - name: Install chart & telemetrygen for testing + env: + KUBECONFIG: ${{ env.KUBECONFIG }} run: | cd ./otel-integration/k8s-helm helm dependency build @@ -41,7 +43,7 @@ jobs: kubectl wait --all --for=condition=ready --timeout=300s pod -l component=agent-collector - name: Run E2E test env: - KUBECONFIG_PATH: /tmp/kind-config-otel-integration-agent-e2e + KUBECONFIG: ${{ env.KUBECONFIG }} run: | cd ./otel-integration/k8s-helm/e2e-test/ go test -v -run=TestE2E_Agent ./...