-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
37 lines (36 loc) · 1.81 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
version: 0.2
phases:
install:
runtime-versions:
docker: 2.2
commands:
- nohup dockerd --host=unix:///var/run/docker.sock &
- timeout 15 sh -c "until docker info; do echo .; sleep 1; done"
- . ci/build-env
pre_build:
commands:
- echo Starting build.
- echo "CODEBUILD_INITIATOR:${CODEBUILD_INITIATOR}" | tee -a sns-message.txt
- echo "CODEBUILD_BUILD_ID:${CODEBUILD_BUILD_ID}" | tee -a sns-message.txt
- echo "CODEBUILD_SOURCE_REPO_URL:${CODEBUILD_SOURCE_REPO_URL}" | tee -a sns-message.txt
- echo "CODEBUILD_SOURCE_VERSION:${CODEBUILD_SOURCE_VERSION}" | tee -a sns-message.txt
- echo "CODEBUILD_RESOLVED_SOURCE_VERSION:${CODEBUILD_RESOLVED_SOURCE_VERSION}" | tee -a sns-message.txt
- echo "CODEBUILD_WEBHOOK_EVENT:${CODEBUILD_WEBHOOK_EVENT}" | tee -a sns-message.txt
- echo "CODEBUILD_WEBHOOK_HEAD_REF:${CODEBUILD_WEBHOOK_HEAD_REF}" | tee -a sns-message.txt
- echo "WUST_VERSION:${WUST_VERSION}" | tee -a sns-message.txt
# - echo Sending notification ...
# - aws sns publish --topic-arn "${SNS_TOPIC_ARN}" --subject "Hi, AWS CodeBuild Started - Woost ${WUST_VERSION}" --message file://sns-message.txt
build:
commands:
- echo Build started.
- ci/build-unit-test
- ci/build-artifacts
- ci/test-postgres
# - ci/test-integration
- ci/publish-artifacts
post_build:
commands:
- echo Build completed.
- echo "CODEBUILD_BUILD_SUCCEEDING:${CODEBUILD_BUILD_SUCCEEDING}" | tee -a sns-message.txt
- echo Sending notification ...
- aws sns publish --topic-arn "${SNS_TOPIC_ARN}" --subject "$([[ \"$CODEBUILD_BUILD_SUCCEEDING\" == \"1\" ]] && echo Howdy, AWS CodeBuild completed successfully || echo Damn, AWS CodeBuild failed) - Woost ${WUST_VERSION}" --message file://sns-message.txt