-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildspec.yaml
More file actions
17 lines (15 loc) · 781 Bytes
/
buildspec.yaml
File metadata and controls
17 lines (15 loc) · 781 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
version: 0.2
phases:
pre_build:
run-as: root
commands:
# Install Serverless Framework CLI and plugins
- curl -L -o /usr/local/bin/yq https://github.com/mikefarah/yq/releases/download/v4.9.6/yq_linux_amd64 && chmod +x /usr/local/bin/yq
- npm install -g serverless@2.72.2 $(yq eval '.plugins | join(" ")' serverless.yml)
- export IAC_VERSION="serverless-$(serverless --version | grep -i framework | cut -d ' ' -f 3)"
- yq eval '.provider.stackTags.Iac = strenv(IAC_VERSION) | .custom.cloudWatchLogsTags.Iac = strenv(IAC_VERSION)' --inplace serverless.yml
build:
commands:
- pip install --upgrade pip
- pip install -r requirements.txt -t ./src/layer/python
- serverless deploy --verbose --stage $ENVIRONMENT_NAME