-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.gitlab-ci.yml
56 lines (44 loc) · 939 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
image: gradle:jdk14
variables:
GRADLE_OPTS: "-Dorg.gradle.daemon=false"
VERSION: "0.9.3"
before_script:
- export GRADLE_USER_HOME=`pwd`/.gradle
build:
stage: build
script: gradle --build-cache --no-daemon bootJar
artifacts:
expire_in: '14 day'
paths:
- build/libs/*.jar
cache:
key: "$CI_COMMIT_REF_NAME"
policy: push
paths:
- build
- .gradle
test:
stage: test
script: gradle check --no-daemon
cache:
key: "$CI_COMMIT_REF_NAME"
policy: pull
paths:
- build
- .gradle
except:
variables:
- $CONFIG_FILE
run:
stage: deploy
script:
- java -jar ./build/libs/spottit-${VERSION}.jar -c "${CONFIG_FILE}"
only:
variables:
- $CONFIG_FILE
verify:
stage: deploy
script: java -jar ./build/libs/spottit-${VERSION}.jar --help
except:
variables:
- $CONFIG_FILE