-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
46 lines (41 loc) · 975 Bytes
/
.gitlab-ci.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
image: pikalab/ci:ubuntu-jdk14-git-gradle-graphviz
variables:
GOPTS: "--no-daemon --console=plain"
CI: "true"
BEFORE_TASK: ""
AFTER_TASK: ""
GCMD: "./gradlew"
CHECK_TASK: "ktlintCheck detekt"
BUILD_TASK: "assemble"
TEST_TASK: "test"
SIGN_TASK: "signAllPublications --parallel"
BINTRAY_TASK: "publishAllToBintray --parallel"
CENTRAL_TASK: "publishAllPublicationsToMavenRepository --parallel"
before_script:
- chmod +x gradlew
- source $HOME/.sdkman/bin/sdkman-init.sh
cache:
paths:
- $HOME/.gradle/
- $HOME/.m2/
- gradle/
- .gradle/
- build/
Compile:
stage: build
script:
- $GCMD $BEFORE_TASK $CHECK_TASK $AFTER_TASK $GOPTS
- $GCMD $BEFORE_TASK $BUILD_TASK $AFTER_TASK $GOPTS
only:
- branches
needs: [ ]
Test:
stage: test
script: $GCMD $BEFORE_TASK $TEST_TASK $AFTER_TASK $GOPTS
artifacts:
reports:
junit: "**/build/test-results/*.xml"
only:
- branches
needs:
- job: Compile