Skip to content

Commit

Permalink
chore: fix debug command
Browse files Browse the repository at this point in the history
The pemissions on the KUBECONFIG file in jenkins changed to 0600, so
just `sudo cat` it out instead of scp.
  • Loading branch information
smlx committed Aug 23, 2024
1 parent b53321a commit 400d955
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit 400d955

Please sign in to comment.