From 05df8f60aff1beb8d80318332908ae152c6c0a42 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 10 Mar 2021 10:47:39 +0530 Subject: [PATCH 1/6] Update awsconfiguration.sh --- awsconfiguration.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/awsconfiguration.sh b/awsconfiguration.sh index 6681569..8d32031 100755 --- a/awsconfiguration.sh +++ b/awsconfiguration.sh @@ -37,5 +37,11 @@ echo "export AWS_SECRET_ACCESS_KEY=\"$AWS_SECRET_ACCESS_KEY\"">>awsenvconf echo "export AWS_ENVIRONMENT=\"$AWS_ENVIRONMENT\"">>awsenvconf echo "export AWS_SESSION_TOKEN=\"$AWS_SESSION_TOKEN\"">>awsenvconf echo "export AWS_ACCOUNT_ID=\"$AWS_ACCOUNT_ID\"">>awsenvconf -echo awsenvconf >>.dockerignore + +if grep -Fxq "awsenvconf" .dockerignore +then + echo "awsenvconf exist in docker ignore file list" +else + echo "awsenvconf" >> .dockerignore +fi From ffc0e813109a4321b5ba9a6a1eb0dfa8dd707cb5 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 10 Mar 2021 10:48:10 +0530 Subject: [PATCH 2/6] Update buildenv.sh --- buildenv.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/buildenv.sh b/buildenv.sh index 9253d16..129000b 100755 --- a/buildenv.sh +++ b/buildenv.sh @@ -102,3 +102,10 @@ done ENV_CONFIG=`echo "$ENV" | tr '[:upper:]' '[:lower:]'` download_buildenvfile uploading_buildenvvar + +if grep -Fxq "buildenvvar" .dockerignore +then + log "buildenvvar exist in docker ignore file list" +else + echo "buildenvvar" >> .dockerignore +fi From fa32ee5f3ee974bb45bd3fafd62ef131e40edb5a Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Wed, 10 Mar 2021 18:06:35 +0530 Subject: [PATCH 3/6] UTF file issue UTF file issue --- master_deploy.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/master_deploy.sh b/master_deploy.sh index 0572bdd..1b39974 100755 --- a/master_deploy.sh +++ b/master_deploy.sh @@ -579,7 +579,7 @@ deploy_s3bucket() { uploadpath=$(echo $syncfilepath | cut -b ${lengthofsearchpath}-) echo $uploadpath getformatdetails=$(file ${syncfilepath}) - if [[ $getformatdetails == *"ASCII"* ]] || [[ $getformatdetails == *"empty"* ]]; + if [[ $getformatdetails == *"ASCII"* ]] || [[ $getformatdetails == *"UTF"* ]] || [[ $getformatdetails == *"empty"* ]]; then echo "file format is ASCII and skipping gzip option" S3_OPTIONS="" From 7b4155fc1004e291945b553be50162ef0385af30 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Thu, 11 Mar 2021 14:38:32 +0530 Subject: [PATCH 4/6] Update buildenv.sh json tracking --- buildenv.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/buildenv.sh b/buildenv.sh index 129000b..3d6b91f 100755 --- a/buildenv.sh +++ b/buildenv.sh @@ -33,6 +33,8 @@ download_buildenvfile() do aws s3 cp s3://tc-platform-${ENV_CONFIG}/securitymanager/$listname.json . track_error $? "Environment setting" + jq 'keys[]' $listname.json + track_error $? "$listname.json" done } uploading_buildenvvar() From 1e6acc75f6a6fde228d8928450a5658e6778d8ac Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Thu, 11 Mar 2021 14:41:48 +0530 Subject: [PATCH 5/6] tracking json error tracking json error --- master_deploy.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/master_deploy.sh b/master_deploy.sh index 1b39974..79d5f60 100755 --- a/master_deploy.sh +++ b/master_deploy.sh @@ -604,6 +604,9 @@ download_envfile() for listname in $Buffer_seclist; do aws s3 cp s3://tc-platform-${ENV_CONFIG}/securitymanager/$listname.json . + track_error $? "$listname.json download" + jq 'keys[]' $listname.json + track_error $? "$listname.json" #cp $HOME/buildscript/securitymanager/$listname.json.enc . #SECPASSWD=$(eval "echo \$${listname}") #openssl enc -aes-256-cbc -d -md MD5 -in $listname.json.enc -out $listname.json -k $SECPASSWD From c7f4c48f9a1900a0e97f52be4d86d9e9a2714d09 Mon Sep 17 00:00:00 2001 From: Gunasekar-K Date: Tue, 22 Jun 2021 13:15:14 +0530 Subject: [PATCH 6/6] Update master_deploy.sh --- master_deploy.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/master_deploy.sh b/master_deploy.sh index 79d5f60..c33d30c 100755 --- a/master_deploy.sh +++ b/master_deploy.sh @@ -200,8 +200,9 @@ envaddition() { envname=$1 envvalue=$2 #echo "env value before" $envvalue +set -f template=$(echo $template | jq --arg name "$envname" --arg value "$envvalue" --arg envcount $envcount '.containerDefinitions[0].environment[$envcount |tonumber] |= .+ { name: $name, value: $value }') - +set +f let envcount=envcount+1 #echo "envcount after ---------" $envcount #echo "envvalue after ---------" $envvalue