File tree Expand file tree Collapse file tree 6 files changed +23
-424
lines changed Expand file tree Collapse file tree 6 files changed +23
-424
lines changed Original file line number Diff line number Diff line change @@ -38,15 +38,13 @@ jobs:
38
38
id : deploy
39
39
env :
40
40
AWS_REGION : " ${{ secrets.AWS_REGION }}"
41
+ CLUSTER_ID : " ${{ env.CLUSTER_ID }}"
41
42
run : |
42
- aws cloudformation deploy --stack-name cfn-test-${CLUSTER_ID}-${TEST_BRANCH} \
43
- --template-file ./lab/cfn/eks-workshop-ide-cfn.yaml \
44
- --parameter-overrides RepositoryRef=${TEST_BRANCH} \
45
- --capabilities CAPABILITY_NAMED_IAM
43
+ make deploy-ide environment="${CLUSTER_ID}"
46
44
- name : Cleanup
47
45
if : always()
48
46
env :
49
47
AWS_REGION : " ${{ secrets.AWS_REGION }}"
48
+ CLUSTER_ID : " ${{ env.CLUSTER_ID }}"
50
49
run : |
51
- aws cloudformation delete-stack --stack-name cfn-test-${CLUSTER_ID}-${TEST_BRANCH}
52
- aws cloudformation wait stack-delete-complete --stack-name cfn-test-${CLUSTER_ID}-${TEST_BRANCH}
50
+ make destroy-ide environment="${CLUSTER_ID}"
Original file line number Diff line number Diff line change @@ -41,6 +41,14 @@ create-infrastructure:
41
41
destroy-infrastructure :
42
42
bash hack/destroy-infrastructure.sh $(environment )
43
43
44
+ .PHONY : deploy-ide
45
+ deploy-ide :
46
+ bash hack/deploy-ide-cfn.sh $(environment )
47
+
48
+ .PHONY : destroy-ide
49
+ destroy-ide :
50
+ bash hack/destroy-ide-cfn.sh $(environment )
51
+
44
52
.PHONY : lint
45
53
lint :
46
54
yarn lint
Original file line number Diff line number Diff line change @@ -10,5 +10,5 @@ outfile=$(mktemp)
10
10
11
11
bash $SCRIPT_DIR /build-ide-cfn.sh $outfile
12
12
13
- aws cloudformation deploy --stack-name eks-workshop-ide1 \
13
+ aws cloudformation deploy --stack-name " $EKS_CLUSTER_NAME -ide " \
14
14
--capabilities CAPABILITY_NAMED_IAM --disable-rollback --template-file $outfile
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ set -e
4
+
5
+ SCRIPT_DIR=$( cd -- " $( dirname -- " ${BASH_SOURCE[0]} " ) " & > /dev/null && pwd )
6
+
7
+ source $SCRIPT_DIR /lib/common-env.sh
8
+
9
+ aws cloudformation delete-stack --stack-name " $EKS_CLUSTER_NAME -ide"
10
+ aws cloudformation wait stack-delete-complete --stack-name " $EKS_CLUSTER_NAME -ide"
You can’t perform that action at this time.
0 commit comments