From 400d955cc9553aba714d345a20336324f230c90d Mon Sep 17 00:00:00 2001 From: Scott Leggett Date: Fri, 23 Aug 2024 15:45:37 +0800 Subject: [PATCH] chore: fix debug command The pemissions on the KUBECONFIG file in jenkins changed to 0600, so just `sudo cat` it out instead of scp. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index b064c4b077..73114bdfd3 100644 --- a/Makefile +++ b/Makefile @@ -490,7 +490,7 @@ k3d/cluster: local-dev/k3d local-dev/jq local-dev/helm local-dev/kubectl && $(K3D) cluster create $(CI_BUILD_TAG) --image $(K3D_IMAGE) --wait --timeout 120s --config=$$K3DCONFIG --kubeconfig-update-default --kubeconfig-switch-context \ && cp $$KUBECONFIG "kubeconfig.k3d.$(CI_BUILD_TAG)" \ && echo -e 'Interact with the cluster during the test run in Jenkins like so:\n' \ - && echo "export KUBECONFIG=\$$(mktemp) && scp $$NODE_NAME:$$KUBECONFIG \$$KUBECONFIG && K3D_PORT=\$$(sed -nE 's/.+server:.+:([0-9]+)/\1/p' \$$KUBECONFIG) && ssh -fNL \$$K3D_PORT:127.0.0.1:\$$K3D_PORT $$NODE_NAME" \ + && echo "export KUBECONFIG=\$$(mktemp) && ssh $$NODE_NAME sudo cat $$KUBECONFIG > \$$KUBECONFIG && K3D_PORT=\$$(sed -nE 's/.+server:.+:([0-9]+)/\1/p' \$$KUBECONFIG) && ssh -fNL \$$K3D_PORT:127.0.0.1:\$$K3D_PORT $$NODE_NAME" \ && echo -e '\nOr running locally:\n' \ && echo -e 'export KUBECONFIG=$$($(K3D) kubeconfig write $(CI_BUILD_TAG))\n' \ && echo -e 'kubectl ...\n'