-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
43 lines (36 loc) · 1.51 KB
/
buildspec.yml
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
32
33
34
35
36
37
38
39
40
41
42
43
version: 0.2
phases:
install:
runtime-versions:
nodejs: latest
commands:
# Install dependencies needed for running tests
- npm install
# Upgrade AWS CLI to the latest version
# - pip install pip==23.2
- pip3 install --upgrade awscli
pre_build:
commands:
# Discover and run unit tests in the 'tests' directory
- npm run setBaseUrl
- npm test
post_build:
commands:
# Remove existing node_modules to clear dev dependencies
- rm -r node_modules
# Install runtime dependencies
- npm install --production
# NOT USING CODESTAR ANYMORE
# - aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template-file template-export.yml
# Do not remove this statement. This command is required for AWS CodeStar projects.
# Update the AWS Partition, AWS Region, account ID and project ID in the project ARN on template-configuration.json file so AWS CloudFormation can tag project resources.
# - sed -i.bak 's/\$PARTITION\$/'${PARTITION}'/g;s/\$AWS_REGION\$/'${AWS_REGION}'/g;s/\$ACCOUNT_ID\$/'${ACCOUNT_ID}'/g;s/\$PROJECT_ID\$/'${PROJECT_ID}'/g' template-configuration.json
# - sed -i.bak 's/\$PARTITION\$/'${PARTITION}'/g;s/\$AWS_REGION\$/'${AWS_REGION}'/g;s/\$ACCOUNT_ID\$/'${ACCOUNT_ID}'/g;s/\$PROJECT_ID\$/'${PROJECT_ID}'/g' template-export.yml
artifacts:
# type: zip
files:
- '**/*'
# artifacts:
# files:
# - template-export.yml
# - template-configuration.json