Skip to content

syncing master and dev #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion awsconfiguration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

9 changes: 9 additions & 0 deletions buildenv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -102,3 +104,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
8 changes: 6 additions & 2 deletions master_deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -579,7 +580,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=""
Expand All @@ -604,6 +605,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
Expand Down