File tree 3 files changed +22
-3
lines changed
3 files changed +22
-3
lines changed Original file line number Diff line number Diff line change @@ -37,5 +37,11 @@ echo "export AWS_SECRET_ACCESS_KEY=\"$AWS_SECRET_ACCESS_KEY\"">>awsenvconf
37
37
echo " export AWS_ENVIRONMENT=\" $AWS_ENVIRONMENT \" " >> awsenvconf
38
38
echo " export AWS_SESSION_TOKEN=\" $AWS_SESSION_TOKEN \" " >> awsenvconf
39
39
echo " export AWS_ACCOUNT_ID=\" $AWS_ACCOUNT_ID \" " >> awsenvconf
40
- echo awsenvconf >> .dockerignore
40
+
41
+ if grep -Fxq " awsenvconf" .dockerignore
42
+ then
43
+ echo " awsenvconf exist in docker ignore file list"
44
+ else
45
+ echo " awsenvconf" >> .dockerignore
46
+ fi
41
47
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ download_buildenvfile()
33
33
do
34
34
aws s3 cp s3://tc-platform-${ENV_CONFIG} /securitymanager/$listname .json .
35
35
track_error $? " Environment setting"
36
+ jq ' keys[]' $listname .json
37
+ track_error $? " $listname .json"
36
38
done
37
39
}
38
40
uploading_buildenvvar ()
@@ -102,3 +104,10 @@ done
102
104
ENV_CONFIG=` echo " $ENV " | tr ' [:upper:]' ' [:lower:]' `
103
105
download_buildenvfile
104
106
uploading_buildenvvar
107
+
108
+ if grep -Fxq " buildenvvar" .dockerignore
109
+ then
110
+ log " buildenvvar exist in docker ignore file list"
111
+ else
112
+ echo " buildenvvar" >> .dockerignore
113
+ fi
Original file line number Diff line number Diff line change @@ -200,8 +200,9 @@ envaddition() {
200
200
envname=$1
201
201
envvalue=$2
202
202
# echo "env value before" $envvalue
203
+ set -f
203
204
template=$( echo $template | jq --arg name " $envname " --arg value " $envvalue " --arg envcount $envcount ' .containerDefinitions[0].environment[$envcount |tonumber] |= .+ { name: $name, value: $value }' )
204
-
205
+ set +f
205
206
let envcount=envcount+1
206
207
# echo "envcount after ---------" $envcount
207
208
# echo "envvalue after ---------" $envvalue
@@ -579,7 +580,7 @@ deploy_s3bucket() {
579
580
uploadpath=$( echo $syncfilepath | cut -b ${lengthofsearchpath} -)
580
581
echo $uploadpath
581
582
getformatdetails=$( file ${syncfilepath} )
582
- if [[ $getformatdetails == * " ASCII" * ]] || [[ $getformatdetails == * " empty" * ]];
583
+ if [[ $getformatdetails == * " ASCII" * ]] || [[ $getformatdetails == * " UTF " * ]] || [[ $getformatdetails == * " empty" * ]];
583
584
then
584
585
echo " file format is ASCII and skipping gzip option"
585
586
S3_OPTIONS=" "
@@ -604,6 +605,9 @@ download_envfile()
604
605
for listname in $Buffer_seclist ;
605
606
do
606
607
aws s3 cp s3://tc-platform-${ENV_CONFIG} /securitymanager/$listname .json .
608
+ track_error $? " $listname .json download"
609
+ jq ' keys[]' $listname .json
610
+ track_error $? " $listname .json"
607
611
# cp $HOME/buildscript/securitymanager/$listname.json.enc .
608
612
# SECPASSWD=$(eval "echo \$${listname}")
609
613
# openssl enc -aes-256-cbc -d -md MD5 -in $listname.json.enc -out $listname.json -k $SECPASSWD
You can’t perform that action at this time.
0 commit comments