forked from aws-amplify/amplify-android
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuildspec.yml
51 lines (51 loc) · 1.72 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
version: 0.2
# This file is used as part of the build process implemented using AWS CodeBuild [1].
# The CodeBuild documentation [2] provides an introduction of the service and its capabilities. In general
# terms, it allows us to configure the actions executed when a build is triggered by a commit to the
# amplify-android GitHub repository.
#
# For the purposes of this repo, we're simply running a build by using "./gradlew build"
# command and in the post-build phase, we consolidate the JUnit report files in one location.
# In the reports section, we're instructing CodeBuild to publish those reports which can be
# viewed in the AWS CodeBuild console (Future work will be to publish those to Github for easier access).
#
# [1] - https://docs.aws.amazon.com/codebuild/latest/userguide/build-spec-ref.html
# [2] - https://docs.aws.amazon.com/codebuild/latest/userguide/planning.html
env:
shell: /bin/sh
phases:
install:
commands:
- echo 'Install phase starting'
finally:
- echo 'Install phase completed.'
pre_build:
commands:
- echo 'Pre-build phase starting'
finally:
- echo 'Pre-build phase completed.'
build:
commands:
- echo 'Build phase starting'
- JAVA_HOME=$JDK_8_HOME ./gradlew build
finally:
- echo 'Build phase completed.'
post_build:
commands:
- echo 'Post-build phase starting'
- pwd
- mkdir -p allTests
- cp -f ./*/build/test-results/testReleaseUnitTest/*.xml ./allTests
finally:
- echo 'Post-build phase completed.'
reports:
amplify-android-unit-tests:
files:
- allTests/*
discard-paths: yes
file-format: JUNITXML
#artifacts:
# files:
# - '**/*.apk'
# name: amplify-android-cat-apks
# discard-paths: yes