Skip to content

Commit

Permalink
Merge pull request #60 from SSU-Plector/issue/52-bug-ci-cd
Browse files Browse the repository at this point in the history
♻️ [Refactor] after_install.sh 기능 추가
  • Loading branch information
chanmin-00 authored May 4, 2024
2 parents 75606c7 + aff35d1 commit 6ec362c
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
8 changes: 7 additions & 1 deletion appspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ hooks:
runas: ec2-user
- location: scripts/switch.sh
timeout: 180
runas: ec2-user
runas: ec2-user

hooks:
AfterInstall:
- location: scripts/after_install.sh
timeout: 2400
runas: ec2-user
6 changes: 6 additions & 0 deletions scripts/after_install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export AWS_ACCESS_KEY_ID=$(aws ssm get-parameters --region ap-northeast-2 --names AWS_ACCESS_KEY_ID --query Parameters[0].Value | sed 's/"//g')
export AWS_SECRET_ACCESS_KEY=$(aws ssm get-parameters --region ap-northeast-2 --names AWS_SECRET_ACCESS_KEY --query Parameters[0].Value | sed 's/"//g')
export DATASOURCE_PASSWORD=$(aws ssm get-parameters --region ap-northeast-2 --names DATASOURCE_PASSWORD --query Parameters[0].Value | sed 's/"//g')
export DATASOURCE_USERNAME=$(aws ssm get-parameters --region ap-northeast-2 --names DATASOURCE_USERNAME --query Parameters[0].Value | sed 's/"//g')
export DATASOURCE_URL=$(aws ssm get-parameters --region ap-northeast-2 --names DATASOURCE_URL --query Parameters[0].Value | sed 's/"//g')

0 comments on commit 6ec362c

Please sign in to comment.