Skip to content

Commit ece07d5

Browse files
authored
Merge pull request #12 from topcoder-platform/master
syncing master and dev
2 parents 9ab17f2 + c7f4c48 commit ece07d5

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

awsconfiguration.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,5 +37,11 @@ echo "export AWS_SECRET_ACCESS_KEY=\"$AWS_SECRET_ACCESS_KEY\"">>awsenvconf
3737
echo "export AWS_ENVIRONMENT=\"$AWS_ENVIRONMENT\"">>awsenvconf
3838
echo "export AWS_SESSION_TOKEN=\"$AWS_SESSION_TOKEN\"">>awsenvconf
3939
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
4147

buildenv.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}
3840
uploading_buildenvvar()
@@ -102,3 +104,10 @@ done
102104
ENV_CONFIG=`echo "$ENV" | tr '[:upper:]' '[:lower:]'`
103105
download_buildenvfile
104106
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

master_deploy.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,9 @@ envaddition() {
200200
envname=$1
201201
envvalue=$2
202202
#echo "env value before" $envvalue
203+
set -f
203204
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
205206
let 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

0 commit comments

Comments
 (0)