File tree Expand file tree Collapse file tree 3 files changed +22
-3
lines changed
Expand file tree Collapse file tree 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
3737echo " export AWS_ENVIRONMENT=\" $AWS_ENVIRONMENT \" " >> awsenvconf
3838echo " export AWS_SESSION_TOKEN=\" $AWS_SESSION_TOKEN \" " >> awsenvconf
3939echo " 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
4147
Original file line number Diff line number Diff line change @@ -33,6 +33,8 @@ download_buildenvfile()
3333 do
3434 aws s3 cp s3://tc-platform-${ENV_CONFIG} /securitymanager/$listname .json .
3535 track_error $? " Environment setting"
36+ jq ' keys[]' $listname .json
37+ track_error $? " $listname .json"
3638 done
3739}
3840uploading_buildenvvar ()
@@ -102,3 +104,10 @@ done
102104ENV_CONFIG=` echo " $ENV " | tr ' [:upper:]' ' [:lower:]' `
103105download_buildenvfile
104106uploading_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() {
200200envname=$1
201201envvalue=$2
202202# echo "env value before" $envvalue
203+ set -f
203204template=$( 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
205206let envcount=envcount+1
206207# echo "envcount after ---------" $envcount
207208# echo "envvalue after ---------" $envvalue
@@ -579,7 +580,7 @@ deploy_s3bucket() {
579580 uploadpath=$( echo $syncfilepath | cut -b ${lengthofsearchpath} -)
580581 echo $uploadpath
581582 getformatdetails=$( file ${syncfilepath} )
582- if [[ $getformatdetails == * " ASCII" * ]] || [[ $getformatdetails == * " empty" * ]];
583+ if [[ $getformatdetails == * " ASCII" * ]] || [[ $getformatdetails == * " UTF " * ]] || [[ $getformatdetails == * " empty" * ]];
583584 then
584585 echo " file format is ASCII and skipping gzip option"
585586 S3_OPTIONS=" "
@@ -604,6 +605,9 @@ download_envfile()
604605 for listname in $Buffer_seclist ;
605606 do
606607 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"
607611 # cp $HOME/buildscript/securitymanager/$listname.json.enc .
608612 # SECPASSWD=$(eval "echo \$${listname}")
609613 # 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