forked from brentley/ecsdemo-platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
./up.sh | ||
./down.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
cd ~/environment/ecsdemo-crystal | ||
mu pipeline term | ||
|
||
cd ~/environment/ecsdemo-nodejs | ||
mu pipeline term | ||
|
||
echo "================================" | ||
echo "Beginning frontend pipeline term at $(date)" | ||
cd ~/environment/ecsdemo-frontend | ||
mu pipeline term | ||
|
||
echo "================================" | ||
echo "Beginning acceptance platform term at $(date)" | ||
cd ~/environment/ecsdemo-platform | ||
mu env term acceptance | ||
echo "================================" | ||
echo "Beginning production platform term at $(date)" | ||
mu env term production | ||
|
||
echo "================================" | ||
echo "Beginning ecr repo delete at $(date)" | ||
aws ecr delete-repository --repository-nam ${MU_NAMESPACE}-ecsdemo-frontend --force | ||
aws ecr delete-repository --repository-nam ${MU_NAMESPACE}-ecsdemo-nodejs --force | ||
aws ecr delete-repository --repository-nam ${MU_NAMESPACE}-ecsdemo-crystal --force | ||
|
||
echo "================================" | ||
echo "Beginning s3 bucket delete at $(date)" | ||
export REGION=$(curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone | sed 's/\(.*\)[a-z]/\1/' | ||
) | ||
export ACCOUNT_ID=$(aws sts get-caller-identity --query Account --output text) | ||
aws s3 rm --recursive s3://${MU_NAMESPACE}-codedeploy-${REGION}-${ACCOUNT_ID} | ||
aws s3 rm --recursive s3://${MU_NAMESPACE}-codepipeline-${REGION}-${ACCOUNT_ID} | ||
|
||
echo "================================" | ||
echo "Beginning cf stack delete at $(date)" | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-iam-service-ecsdemo-frontend-acceptance | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-iam-service-ecsdemo-frontend-production | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-iam-service-ecsdemo-nodejs-acceptance | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-iam-service-ecsdemo-nodejs-production | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-iam-service-ecsdemo-crystal-acceptance | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-iam-service-ecsdemo-crystal-production | ||
|
||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-repo-ecsdemo-frontend | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-repo-ecsdemo-nodejs | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-repo-ecsdemo-crystal | ||
|
||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-bucket-codedeploy | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-bucket-codepipeline | ||
|
||
echo "================================" | ||
echo "Beginning sleep 300 at $(date)" | ||
sleep 300 # delay waiting for all the other CF stacks to be deleted -- replace with a count of stacks or something | ||
|
||
echo "================================" | ||
echo "Beginning iam-common stack delete at $(date)" | ||
aws cloudformation delete-stack --stack-name ${MU_NAMESPACE}-iam-common | ||
echo "================================" | ||
echo "Teardown complete at $(date)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
count=1 | ||
|
||
while true; do | ||
echo "================================" | ||
echo "Beginning test ${count} build at $(date)" | ||
./cycle.sh | ||
echo "Ending test ${count} build at $(date)" | ||
echo "================================" | ||
((count++)) | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
echo "================================" | ||
echo "Beginning acceptance platform build at $(date)" | ||
cd ~/environment/ecsdemo-platform | ||
mu env up acceptance | ||
echo "================================" | ||
echo "Beginning production platform build at $(date)" | ||
mu env up production | ||
|
||
echo "================================" | ||
echo "Beginning frontend pipeline build at $(date)" | ||
cd ~/environment/ecsdemo-frontend | ||
mu pipeline up -t $GITHUB_TOKEN | ||
|
||
echo "================================" | ||
echo "Beginning nodejs pipeline build at $(date)" | ||
cd ~/environment/ecsdemo-nodejs | ||
mu pipeline up -t $GITHUB_TOKEN | ||
|
||
echo "================================" | ||
echo "Beginning crystal pipeline build at $(date)" | ||
cd ~/environment/ecsdemo-crystal | ||
mu pipeline up -t $GITHUB_TOKEN |