feat: running the jobs in series

Signed-off-by: RinkiyaKeDad <arshsharma461@gmail.com>
This commit is contained in:
RinkiyaKeDad
2021-03-30 16:03:19 +05:30
parent 45f1507a76
commit 79ee98bb56
+7 -21
View File
@@ -37,36 +37,22 @@ echo "Installing cert-manager into the cluster..."
check_bazel
bazel build --platforms=@io_bazel_rules_go//go/toolchain:linux_amd64 //devel/addon/...
EXIT=0
echo "Installing sample-webhook into the cluster..."
"${SCRIPT_ROOT}/addon/samplewebhook/install.sh" &
"${SCRIPT_ROOT}/addon/samplewebhook/install.sh"
echo "Installing bind into the cluster..."
"${SCRIPT_ROOT}/addon/bind/install.sh" &
"${SCRIPT_ROOT}/addon/bind/install.sh"
echo "Installing pebble into the cluster..."
"${SCRIPT_ROOT}/addon/pebble/install.sh" &
"${SCRIPT_ROOT}/addon/pebble/install.sh"
echo "Installing ingress-nginx into the cluster..."
"${SCRIPT_ROOT}/addon/ingressnginx/install.sh" &
"${SCRIPT_ROOT}/addon/ingressnginx/install.sh"
echo "Loading vault into the cluster..."
"${SCRIPT_ROOT}/addon/vault/install.sh" &
"${SCRIPT_ROOT}/addon/vault/install.sh"
echo "Installing sample-external-issuer into the cluster..."
"${SCRIPT_ROOT}/addon/sample-external-issuer/install.sh" &
"${SCRIPT_ROOT}/addon/sample-external-issuer/install.sh"
# Wait for all background jobs to finish and exit with non-zero if any of them fail
# See https://stackoverflow.com/a/515170/919436
for job in $(jobs -p); do
if wait $job > 0; then
job > /temp/job.txt
fi
done
for filename in /temp/*.txt; do
cat filename
done
exit $EXIT
exit 0