Skip to content

Commit 4ec2f68

Browse files
committed
update buildspec to use latest aws-sam-cli
fail post_build when build fails
1 parent 94fd211 commit 4ec2f68

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

buildspec.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ phases:
1010
install:
1111
runtime-versions:
1212
nodejs: 14
13+
commands:
14+
- pip3 install aws-sam-cli --upgrade --user
1315
pre_build:
1416
commands:
1517
- NODE_ENV=development npm ci
@@ -20,6 +22,7 @@ phases:
2022
- npm run build
2123
post_build:
2224
commands:
25+
- bash -c "if [ /"$CODEBUILD_BUILD_SUCCEEDING/" == /"0/" ]; then exit 1; fi" # check if build was successful. exit otherwise.
2326
- npm run deploy
2427
artifacts:
2528
files:

0 commit comments

Comments
 (0)