-
Notifications
You must be signed in to change notification settings - Fork 75
/
update.sh
executable file
·31 lines (17 loc) · 1.4 KB
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/usr/bin/env bash
# Copy Nested Templates for Deployment
cd pipeline
TEMPLATES_BUCKET=$(aws cloudformation describe-stacks --stack-name batch-genomics-zone --query 'Stacks[].Outputs[?OutputKey==`TemplatesBucket`].OutputValue' --output text)
aws s3 cp nested_templates s3://${TEMPLATES_BUCKET} --recursive
cd ..
# Update Zone Stack
aws cloudformation update-stack --stack-name batch-genomics-zone --template-body file://zone_template_cfn.yml --capabilities CAPABILITY_NAMED_IAM --output text;aws cloudformation wait stack-create-complete --stack-name batch-genomics-zone
cd tools
# Update Tools Stack
aws cloudformation update-stack --stack-name batch-genomics-tools --template-body file://template_cfn.yml --capabilities CAPABILITY_NAMED_IAM --output text;aws cloudformation wait stack-create-complete --stack-name batch-genomics-zone
cd ..
cd pipeline
# Update Pipeline Stack
IMAGE_ID=$(aws cloudformation describe-stacks --stack-name batch-genomics-pipeline --query 'Stacks[].Outputs[?OutputKey==`ImageId`].OutputValue' --output text)
aws cloudformation update-stack --stack-name batch-genomics-pipeline --template-body file://pipeline/template_cfn.yml --capabilities CAPABILITY_NAMED_IAM --output text --parameters ParameterKey=TemplatesBucket,ParameterValue=${TEMPLATES_BUCKET} ParameterKey=ImageId,ParameterValue=${IMAGE_ID};aws cloudformation wait stack-update-complete --stack-name batch-genomics-pipeline
cd ..