-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
27 lines (26 loc) · 881 Bytes
/
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
version: 0.2
phases:
install:
commands:
- jq --version
- echo $CODEBUILD_SOURCE_VERSION
- echo installing serverless
- npm install -g serverless
pre_build:
commands:
- echo installing NPM dependecies...
- npm install
- cd ${SERVICE_PATH} && npm install && cd -
build:
commands:
- echo deployment started `date`....
- cd ${SERVICE_PATH} && serverless deploy -s $ENV_NAME && cd -;
- api_gw_url=`aws cloudformation describe-stacks \--stack-name Develope2-dev \--query "Stacks[0].Outputs[*].{OutputKey:OutputKey,OutputValue:OutputValue}" | jq -r '.[] | select(.OutputKey=="HelloLambdaFunctionQualifiedArn") | .OutputValue'`
post_build:
commands:
- echo $api_gw_url
- echo serverless deployment completed successfully.
cache:
paths:
- node_modules
- ${SERVICE_PATH}/node_modules