From 53e73cff5d668cc340822abe9e5250a28e54480d Mon Sep 17 00:00:00 2001 From: Gerd Oberlechner Date: Wed, 30 Oct 2024 00:29:09 +0100 Subject: [PATCH] script lint Signed-off-by: Gerd Oberlechner --- .../workflows/{dev-infrastructure.yml => bicep-lint.yml} | 2 +- dev-infrastructure/create-config.sh | 2 +- svc-deploy.sh | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename .github/workflows/{dev-infrastructure.yml => bicep-lint.yml} (95%) diff --git a/.github/workflows/dev-infrastructure.yml b/.github/workflows/bicep-lint.yml similarity index 95% rename from .github/workflows/dev-infrastructure.yml rename to .github/workflows/bicep-lint.yml index 54afc01c1..c92904370 100644 --- a/.github/workflows/dev-infrastructure.yml +++ b/.github/workflows/bicep-lint.yml @@ -1,5 +1,5 @@ --- -name: Validate dev-infrastructure +name: Bicep Lint on: pull_request: diff --git a/dev-infrastructure/create-config.sh b/dev-infrastructure/create-config.sh index 056fd4026..3f86fa2fa 100755 --- a/dev-infrastructure/create-config.sh +++ b/dev-infrastructure/create-config.sh @@ -3,7 +3,7 @@ set -e DEPLOY_ENV=$1 -cd $(dirname "$(realpath "${BASH_SOURCE[0]}")") +cd $(dirname "$(realpath "${BASH_SOURCE[0]}")") || exit ../templatize.sh "$DEPLOY_ENV" config.tmpl.mk config.mk for tmpl_file in configurations/*.tmpl.*; do output_file="${tmpl_file/.tmpl/}" diff --git a/svc-deploy.sh b/svc-deploy.sh index 43816176f..fb916f628 100755 --- a/svc-deploy.sh +++ b/svc-deploy.sh @@ -5,7 +5,7 @@ # this script expects the to contain a Makefile that takes care # of processing any config.mk template on its own -cd $(dirname "$(realpath "${BASH_SOURCE[0]}")") +cd $(dirname "$(realpath "${BASH_SOURCE[0]}")") || exit export DEPLOY_ENV=$1 export DIR=$2 @@ -16,7 +16,7 @@ if [[ "$CLUSTER" != "svc" && "$CLUSTER" != "mgmt" ]]; then exit 1 fi -export KUBECONFIG=$(cd dev-infrastructure ; make --no-print-directory $CLUSTER.aks.kubeconfigfile) +export KUBECONFIG=$(cd dev-infrastructure || exit ; make --no-print-directory $CLUSTER.aks.kubeconfigfile) -cd $DIR +cd $DIR || exit make deploy