forked from geoadmin/mf-geoadmin3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buildspec.yml
67 lines (62 loc) · 2.14 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
version: 0.2
env:
variables:
AWS_DEFAULT_REGION: eu-central-1
phases:
install:
runtime-versions:
python: 3.7
commands:
- echo "Installing python 2.7"
- apt-get update && apt-get install -y python2.7 python2.7-dev virtualenv build-essential
pre_build:
commands:
- echo "Configuring stuff..."
- aws --version
- COMMIT_HASH=$(echo $CODEBUILD_RESOLVED_SOURCE_VERSION | cut -c 1-7)
- GITHUB_BRANCH=${CODEBUILD_WEBHOOK_HEAD_REF#refs/heads/*}
- TODAY=$(date '+%Y%m%d')
- |-
if [ "${CODEBUILD_WEBHOOK_TRIGGER}" = pr/* ]; then
PULL_REQUEST=${CODEBUILD_WEBHOOK_TRIGGER#pr/*}
fi
- |-
if [ "${GIT_BRANCH}" != master ]; then
LATEST=${GITHUB_BRANCH:-staging}
else
LATEST=latest
fi
- echo "=========== VERSIONS ============="
- python --version
- python2 --version
- bash --version
- echo "=========== VARIABLES ============="
- echo CODEBUILD_RESOLVED_SOURCE_VERSION=${CODEBUILD_RESOLVED_SOURCE_VERSION}
- echo CODEBUILD_SOURCE_VERSION=${CODEBUILD_SOURCE_VERSION}
- echo CODEBUILD_WEBHOOK_BASE_REF=${CODEBUILD_WEBHOOK_BASE_REF}
- echo CODEBUILD_WEBHOOK_HEAD_REF=${CODEBUILD_WEBHOOK_HEAD_REF=}
- echo CODEBUILD_WEBHOOK_TRIGGER=${CODEBUILD_WEBHOOK_TRIGGER}
- echo CODEBUILD_SOURCE_VERSION=${CODEBUILD_SOURCE_VERSION}
- echo CODEBUILD_BUILD_ID=${CODEBUILD_BUILD_ID}
- echo CODEBUILD_SOURCE_REPO_URL=${CODEBUILD_SOURCE_REPO_URL}
- echo COMMIT_HASH=${COMMIT_HASH}
- echo PULL_REQUEST=${PULL_REQUEST}
- echo GITHUB_BRANCH=${GITHUB_BRANCH}
- echo "==================================="
- make env
- npm install
build:
commands:
- echo Build started on `date`
- make cleanall ci
# Suppress status outputs
- make testdebug | grep -vE 'Executed [0-9]* of [0-9]*'
- make testrelease | grep -vE 'Executed [0-9]* of [0-9]*'
post_build:
commands:
- echo Build completed on `date`
reports:
reportGroupJunit:
files:
- 'junit-reports/**/*'
file-format: JunitXml # default is JunitXml