-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
58 lines (53 loc) · 1.06 KB
/
.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
image: gradle:7.4-jdk17-alpine
stages:
- build
- test
- deploy
before_script:
- GRADLE_USER_HOME="$(pwd)/.gradle"
- export GRADLE_USER_HOME
build:
stage: build
script:
- gradle build -x test
cache:
key: $CI_COMMIT_REF_SLUG
policy: pull
paths:
- .gradle
run-tests:
stage: test
script:
- gradle test
cache:
key: $CI_COMMIT_REF_SLUG
policy: pull
paths:
- .gradle
artifacts:
name: test-results
paths:
- ./api/build/test-results/test
- ./core/build/test-results/test
expire_in: 7 days
reports:
junit:
- ./api/build/test-results/test/*.xml
- ./core/build/test-results/test/*.xml
deploy:
stage: deploy
only:
- master
script:
- gradle build publish -x test -PnpclibAuthHeaderName=Job-Token -PnpclibAuthHeaderValue=${CI_JOB_TOKEN}
cache:
key: $CI_COMMIT_REF_SLUG
policy: pull
paths:
- .gradle
artifacts:
name: plugins-jar
paths:
- ./api/build/libs/*.jar
- ./core/build/libs/*.jar
expire_in: 7 days