forked from xilution/xilution-selenium-grid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmakefile
31 lines (25 loc) · 1.39 KB
/
makefile
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
deprovision:
aws cloudformation delete-stack --stack-name selenium-grid
estimate-cost: secrets-devops-decrypt
aws cloudformation estimate-template-cost \
--template-body file://./aws/cloud-formation/template.yml \
--parameters file://./aws/cloud-formation/secrets.decrypted.json
make secrets-devops-clean-up
provision: secrets-devops-decrypt
aws cloudformation create-stack --stack-name selenium-grid \
--capabilities CAPABILITY_IAM \
--template-body file://./aws/cloud-formation/template.yml \
--parameters file://./aws/cloud-formation/secrets.decrypted.json
make secrets-devops-clean-up
reprovision: secrets-devops-decrypt
aws cloudformation update-stack --stack-name selenium-grid \
--capabilities CAPABILITY_IAM \
--template-body file://./aws/cloud-formation/template.yml \
--parameters file://./aws/cloud-formation/secrets.decrypted.json
make secrets-devops-clean-up
secrets-devops-clean-up:
rm -rf ./aws/cloud-formation/secrets.decrypted.json
secrets-devops-decrypt:
aws kms decrypt --ciphertext-blob fileb://./aws/cloud-formation/secrets.encrypted.txt --output text --query Plaintext | base64 --decode > ./aws/cloud-formation/secrets.decrypted.json
secrets-devops-encrypt:
aws kms encrypt --key-id $(AWS_DEV_OPS_KEY_TOKEN) --plaintext fileb://./aws/cloud-formation/secrets.decrypted.json --output text --query CiphertextBlob | base64 --decode > ./aws/cloud-formation/secrets.encrypted.txt