-
Notifications
You must be signed in to change notification settings - Fork 17
/
.gitlab-ci.yml
55 lines (48 loc) · 1.26 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
image: ${DEVOPS_REGISTRY}usgs/centos:8
stages:
- build
- javadoc
.check_code:
after_script:
# runs before cache is saved (copying from .travis.yml)
- rm -f "${CI_PROJECT_DIR}/.gradle/caches/modules-2/modules-2.lock"
- rm -fr "${CI_PROJECT_DIR}/.gradle/caches/*/plugin-resolution/"
artifacts:
paths:
- ProductClient.jar
- ProductClient.zip
reports:
cobertura: build/reports/cobertura/cobertura.xml
junit: build/test-results/test/TEST-*.xml
cache:
paths:
- .gradle/caches
- .gradle/wrapper
image: ${DEVOPS_REGISTRY}usgs/java:11-jdk
script:
# run gradle and javadoc
- export GRADLE_USER_HOME="${CI_PROJECT_DIR}/.gradle"
- ./gradlew build createZip
# set up artifact paths
- cp build/libs/ProductClient.jar ProductClient.jar
- cp build/distributions/ProductClient.zip ProductClient.zip
stage: build
tags:
- development
Java 8:
extends:
- .check_code
image: ${DEVOPS_REGISTRY}usgs/java:8-jdk
Java 11:
extends:
- .check_code
image: ${DEVOPS_REGISTRY}usgs/java:11-jdk
Java Latest:
extends:
- .check_code
image: ${DEVOPS_REGISTRY}usgs/java:latest-jdk
Javadoc:
image: ${DEVOPS_REGISTRY}usgs/java:latest-jdk
script:
- ./gradlew javadoc
stage: javadoc