-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
29 lines (29 loc) · 903 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
28
29
version: 0.2
cache:
paths:
- '~/.gradle/caches'
- '.gradle/'
- 'build/'
- '/root/.gradle/'
phases:
install:
commands:
- echo "install step running on..."
- echo "running commit $CODEBUILD_SOURCE_VERSION"
- apt-get install build-essential
- echo "install step done!"
pre_build:
commands:
- echo "pre_build step"
- chmod +x gradlew
build:
commands:
- ./gradlew packageLambda --debug --info --stacktrace
- ls -lah build/dist
- aws s3 sync build/dist ${S3_BUCKET_URL}
- aws lambda update-function-code --function-name $FUNCTION_NAME --s3-bucket $S3_BUCKET --s3-key $S3_KEY
post_build:
commands:
- echo "post_build step"
- |-
curl -d "{\"text\": \"Just Build ${CODEBUILD_SOURCE_VERSION} triggered by ${CODEBUILD_INITIATOR} with Status: ${CODEBUILD_BUILD_SUCCEEDING}\"}" ${SLACK_WEBHOOK}