From bda9034903df342315e58d8dba5076e377f12fc9 Mon Sep 17 00:00:00 2001 From: Bartek Grzybowski Date: Wed, 4 Nov 2020 15:35:19 +0100 Subject: Abort if helm process failed to spawn Change-Id: I930d3ca4c3d9ab49286a38c0ea298abe807ac781 Issue-ID: OOM-2623 Signed-off-by: Bartek Grzybowski --- build/creating_data/docker-images-collector.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/creating_data/docker-images-collector.sh b/build/creating_data/docker-images-collector.sh index db085618..73c19bc4 100755 --- a/build/creating_data/docker-images-collector.sh +++ b/build/creating_data/docker-images-collector.sh @@ -90,6 +90,15 @@ validate_port() { fi } +check_helm() { + sleep 2 # let the helm process settle + if [ $(pgrep -f "helm serve --address ${HELM_REPO}" -c) -eq 0 ]; + then + echo "Fatal: Helm chart repository server failed to start" + exit 1 + fi +} + # Proccess input options if [ $# -lt 1 ]; then usage @@ -154,6 +163,7 @@ mkdir -p "${PROJECT_DIR}/../${HELM_REPO_PATH}" helm init -c --local-repo-url "http://${HELM_REPO}" helm serve --address ${HELM_REPO} --repo-path "${PROJECT_DIR}/../${HELM_REPO_PATH}" & helm repo remove stable 2>/dev/null || true +check_helm # Make all pushd "${PROJECT_DIR}/.." -- cgit 1.2.3-korg