From 458f93d2e14f01e11d6ef44fbe2a9e65711897ef Mon Sep 17 00:00:00 2001 From: David Hoese <david.hoese@ssec.wisc.edu> Date: Fri, 14 Aug 2020 07:04:53 -0500 Subject: [PATCH] Add extra kubectl command that doesn't hide stdout --- .gitlab-ci.yml | 3 +++ helpers/deploy_rabbitmq.sh | 2 +- helpers/shell_aliases.sh | 5 +++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 54a5b67..c08fe74 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -58,6 +58,9 @@ build sidecar rabbit init: # no need to build if another project triggered us - if: $CI_PIPELINE_SOURCE == "pipeline" when: never + # no need to build with tags or non-master...probably + - if: '$CI_COMMIT_BRANCH != "master"' + when: never - changes: - sidecars/cspp-geo-rabbit-init/Dockerfile - sidecars/cspp-geo-rabbit-init/declare_exchange.py diff --git a/helpers/deploy_rabbitmq.sh b/helpers/deploy_rabbitmq.sh index 7ed6abc..47b16dc 100755 --- a/helpers/deploy_rabbitmq.sh +++ b/helpers/deploy_rabbitmq.sh @@ -31,7 +31,7 @@ helm upgrade -v 2 --install --kubeconfig $kubeconfig -f ${values_base}/values-ge # do a little waiting for the rabbitmq pod to be ready so future stages # don't fail to communicate with it echo "Start waiting for rabbitmq: $(date +%Y%m%dT%H%M%S)" -kubectl wait -n $ns pod/geosphere-rabbit-rabbitmq-0 --timeout 120s --for=condition=Ready +kubectl2 wait -n $ns pod/geosphere-rabbit-rabbitmq-0 --timeout 120s --for=condition=Ready status=$? echo "Done waiting for rabbitmq: $(date +%Y%m%dT%H%M%S) : $status" exit $status diff --git a/helpers/shell_aliases.sh b/helpers/shell_aliases.sh index 70fabf3..0079eb4 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 + +kubectl2() { + docker run --rm -v $(pwd):/apps -w /apps alpine/k8s:1.18.2 kubectl "$@" +} +export -f kubectl2 -- GitLab