Skip to content

Commit a778ef6

Browse files
fix: CICD
1 parent c10b152 commit a778ef6

File tree

3 files changed

+12
-2
lines changed

3 files changed

+12
-2
lines changed

package-lock.json

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

test/cdk-basic/.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,7 @@ node_modules
66
.cdk.staging
77
cdk.out
88

9-
cdk-outputs.json
9+
cdk-outputs.json
10+
11+
CdkbasicStack.yaml
12+
cdk-synth.log

test/cdk-basic/deploy-yaml.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# This script is used to deploy the CDK stack using a YAML template.
22
npx cdk synth -c environment=test CdkbasicStack > CdkbasicStack.yaml
3+
34
# Add a dummy resource to the template to force a change in the stack
45
awk '
56
/^Resources:/ && !injected {
@@ -11,5 +12,10 @@ awk '
1112
next
1213
}
1314
{ print }
14-
' CdkbasicStack.yaml > template.patched.yaml && mv template.patched.yaml CdkbasicStack.yaml
15+
' CdkbasicStack.yaml > template.patched.yaml
16+
17+
# Cdk synth sometimes generates a dummy notification line at the top of the file.
18+
# Remove the first part of the template up to and including the Resources section
19+
awk 'f{print} /^Resources:/ {f=1; print}' template.patched.yaml > CdkbasicStack.yaml
20+
1521
aws cloudformation deploy --template-file CdkbasicStack.yaml --stack-name test-lld-cdk-basic --capabilities CAPABILITY_NAMED_IAM

0 commit comments

Comments
 (0)