-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
38 lines (33 loc) · 1.55 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
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
commands:
- pip3 install --upgrade pip # upgrade pip
- pip3 install --upgrade awscli # upgrade AWS CLI
- pip3 install boto3 # install boto3
- pip3 install botocore
- pip3 install aws-xray-sdk # install x-ray
#- pip3 install awscurl # install awscurl
#- pip3 install hashlib
#- pip3 install hmac
#- pip3 install pprint
- pip3 install requests
pre_build:
commands:
# Discover and run unit tests in the 'tests' directory. For more information, see <https://docs.python.org/3/library/unittest.html#test-discovery>
- python3 -m unittest discover tests
build:
commands:
#- pip install boto3 # install boto3
#- pip install aws-xray-sdk # install x-ray
# Use AWS SAM to package the application by using AWS CloudFormation
- aws cloudformation package --template template.yml --s3-bucket $S3_BUCKET --output-template 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
artifacts:
files:
- template-export.yml
- template-configuration.json