From 6fe60b9e572f698034dba98b5e872b97b46011fd Mon Sep 17 00:00:00 2001 From: ange Date: Sun, 22 Dec 2024 07:05:23 +0000 Subject: [PATCH] fix: pipefail to catch errors --- manifests/bin/createadmin.sh | 3 +-- manifests/bin/devel.sh | 1 + manifests/bin/prod.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/manifests/bin/createadmin.sh b/manifests/bin/createadmin.sh index 69b33b8..dcefe09 100755 --- a/manifests/bin/createadmin.sh +++ b/manifests/bin/createadmin.sh @@ -1,4 +1,5 @@ #!/bin/bash -e +set -o pipefail function get_token() { kubectl exec statefulset/app -- gitea admin user generate-access-token \ @@ -23,8 +24,6 @@ if [ -z "$passwd" ]; then --password "$passwd" fi -set -x - opts=() [ -n "$scopes" ] && opts+=( --from-literal=token="$(kgseckey "$secret" token || get_token)" diff --git a/manifests/bin/devel.sh b/manifests/bin/devel.sh index 464c4d0..65675aa 100755 --- a/manifests/bin/devel.sh +++ b/manifests/bin/devel.sh @@ -1,4 +1,5 @@ #!/bin/bash -e +set -o pipefail export NB_REPLICAS=1 diff --git a/manifests/bin/prod.sh b/manifests/bin/prod.sh index ea8a78f..142f57f 100755 --- a/manifests/bin/prod.sh +++ b/manifests/bin/prod.sh @@ -1,4 +1,5 @@ #!/bin/bash -e +set -o pipefail # TODO: 3 export NB_REPLICAS=1