From a2573592f4935d75d9994299787b8b4bc56a7ad8 Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Mon, 17 Aug 2020 20:57:04 -0500 Subject: [PATCH] Try debugging rabbitmq secret copy --- ci_geosphere/gitlab-ci.yaml | 2 +- helpers/shell_aliases.sh | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ci_geosphere/gitlab-ci.yaml b/ci_geosphere/gitlab-ci.yaml index 4b1b726..1e688f2 100644 --- a/ci_geosphere/gitlab-ci.yaml +++ b/ci_geosphere/gitlab-ci.yaml @@ -60,7 +60,7 @@ gs deploy rabbit: - cp ${kubekorner_k3s_config} . - kubeconfig=$(basename ${kubekorner_k3s_config}) - |- - kubectl get secret --kubeconfig "${kubeconfig}" geosphere-rabbit-rabbitmq --namespace=geosphere -oyaml | grep -v '^\s*namespace:\s' | grep -v "[Hh]elm" | grep -v "[tT]ime" | grep -v "selfLink" | grep -v "uid" | grep -v "resourceVersion" | sed 's/ name: .*/ name: geosphere-rabbit-rabbitmq-production/' | kubectl apply --kubeconfig "${kubeconfig}" --namespace=geosphere-test -f - + kubectl_noattach get secret --kubeconfig "${kubeconfig}" geosphere-rabbit-rabbitmq --namespace=geosphere -oyaml | grep -v '^\s*namespace:\s' | grep -v "[Hh]elm" | grep -v "[tT]ime" | grep -v "selfLink" | grep -v "uid" | grep -v "resourceVersion" | sed 's/ name: .*/ name: geosphere-rabbit-rabbitmq-production/' | kubectl_noattach apply --kubeconfig "${kubeconfig}" --namespace=geosphere-test -f - # this job doesn't actually need any artifacts from previous jobs dependencies: [] rules: diff --git a/helpers/shell_aliases.sh b/helpers/shell_aliases.sh index 70fabf3..23b5d95 100644 --- a/helpers/shell_aliases.sh +++ b/helpers/shell_aliases.sh @@ -11,3 +11,8 @@ kubectl() { docker run -a stdout --rm -v $(pwd):/apps -w /apps alpine/k8s:1.18.2 kubectl "$@" } export -f kubectl + +kubectl_noattach() { + docker run --rm -v $(pwd):/apps -w /apps alpine/k8s:1.18.2 kubectl "$@" +} +export -f kubectl_noattach -- GitLab