From 9c33b2508077202704634bd30344cf909883b0df Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Tue, 7 Nov 2023 21:57:39 +0100 Subject: [PATCH 1/2] Capture both stdout and stderr in deployment output variable --- cloud-infrastructure/deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cloud-infrastructure/deploy.sh b/cloud-infrastructure/deploy.sh index 481da3288..89b9d34fc 100755 --- a/cloud-infrastructure/deploy.sh +++ b/cloud-infrastructure/deploy.sh @@ -19,5 +19,5 @@ fi if [[ "$*" == *"--apply"* ]] then echo "$(date +"%Y-%m-%dT%H:%M:%S") Applying changes..." - export output=$($DEPLOYMENT_COMMAND $DEPLOYMENT_PARAMETERS | tee /dev/tty) + export output=$($DEPLOYMENT_COMMAND $DEPLOYMENT_PARAMETERS 2>&1) fi From ffdc26d4264b280e549f84ced7607e1a8219d96f Mon Sep 17 00:00:00 2001 From: Thomas Jespersen Date: Tue, 7 Nov 2023 22:55:13 +0100 Subject: [PATCH 2/2] Add shebang to bash scripts to force script to use Bash interpreter --- cloud-infrastructure/cluster/config/development-west-europe.sh | 2 ++ cloud-infrastructure/cluster/config/production-west-europe.sh | 2 ++ cloud-infrastructure/cluster/config/staging-west-europe.sh | 2 ++ cloud-infrastructure/environment/config/development.sh | 2 ++ cloud-infrastructure/environment/config/production.sh | 2 ++ cloud-infrastructure/environment/config/staging.sh | 2 ++ cloud-infrastructure/shared/config/shared-development.sh | 1 + cloud-infrastructure/shared/config/shared.sh | 2 ++ 8 files changed, 15 insertions(+) diff --git a/cloud-infrastructure/cluster/config/development-west-europe.sh b/cloud-infrastructure/cluster/config/development-west-europe.sh index 01c3072ce..a0876aa54 100755 --- a/cloud-infrastructure/cluster/config/development-west-europe.sh +++ b/cloud-infrastructure/cluster/config/development-west-europe.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ENVIRONMENT="development" LOCATION="WestEurope" LOCATION_PREFIX="west-europe" diff --git a/cloud-infrastructure/cluster/config/production-west-europe.sh b/cloud-infrastructure/cluster/config/production-west-europe.sh index 256de268f..48c2fa950 100755 --- a/cloud-infrastructure/cluster/config/production-west-europe.sh +++ b/cloud-infrastructure/cluster/config/production-west-europe.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ENVIRONMENT="production" LOCATION="WestEurope" LOCATION_PREFIX="west-europe" diff --git a/cloud-infrastructure/cluster/config/staging-west-europe.sh b/cloud-infrastructure/cluster/config/staging-west-europe.sh index 0cc7cd175..ceb00f35f 100755 --- a/cloud-infrastructure/cluster/config/staging-west-europe.sh +++ b/cloud-infrastructure/cluster/config/staging-west-europe.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ENVIRONMENT="staging" LOCATION="WestEurope" LOCATION_PREFIX="west-europe" diff --git a/cloud-infrastructure/environment/config/development.sh b/cloud-infrastructure/environment/config/development.sh index 64cc9ec65..2d1cbfa62 100755 --- a/cloud-infrastructure/environment/config/development.sh +++ b/cloud-infrastructure/environment/config/development.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ENVIRONMENT="development" LOCATION="WestEurope" diff --git a/cloud-infrastructure/environment/config/production.sh b/cloud-infrastructure/environment/config/production.sh index 35c8f6421..130eac038 100644 --- a/cloud-infrastructure/environment/config/production.sh +++ b/cloud-infrastructure/environment/config/production.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ENVIRONMENT="production" LOCATION="WestEurope" diff --git a/cloud-infrastructure/environment/config/staging.sh b/cloud-infrastructure/environment/config/staging.sh index fa47910f1..6f30c4dbb 100755 --- a/cloud-infrastructure/environment/config/staging.sh +++ b/cloud-infrastructure/environment/config/staging.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ENVIRONMENT="staging" LOCATION="WestEurope" diff --git a/cloud-infrastructure/shared/config/shared-development.sh b/cloud-infrastructure/shared/config/shared-development.sh index d4508f138..995dada0d 100755 --- a/cloud-infrastructure/shared/config/shared-development.sh +++ b/cloud-infrastructure/shared/config/shared-development.sh @@ -1,3 +1,4 @@ +#!/bin/bash ENVIRONMENT="development" LOCATION="WestEurope" diff --git a/cloud-infrastructure/shared/config/shared.sh b/cloud-infrastructure/shared/config/shared.sh index 09d1b449f..eb10d11f8 100755 --- a/cloud-infrastructure/shared/config/shared.sh +++ b/cloud-infrastructure/shared/config/shared.sh @@ -1,3 +1,5 @@ +#!/bin/bash + ENVIRONMENT="production" LOCATION="WestEurope"