-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
60 lines (54 loc) · 927 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
image: openjdk:11-jdk-slim
stages:
- build
- test
- publish
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
variables:
GIT_STRATEGY: clone
GIT_SUBMODULE_STRATEGY: recursive
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
build:
stage: build
script:
- ./gradlew build
artifacts:
paths:
- build/libs/*.jar
expire_in: 1 week
tags:
- coinmetrics-build-runner
cache:
key: "$CI_COMMIT_SHORT_SHA"
policy: push
paths:
- build
- .gradle
test:
tags:
- coinmetrics-build-runner
stage: test
script:
- ./gradlew test
cache:
key: "$CI_COMMIT_SHORT_SHA"
policy: pull
paths:
- build
- .gradle
publish:
tags:
- coinmetrics-build-runner
stage: publish
script:
- ./gradlew publish
cache:
key: "$CI_COMMIT_SHORT_SHA"
policy: pull
paths:
- build
- .gradle
only:
- master
when: manual