-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitlab-ci.yml
68 lines (56 loc) · 947 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
61
62
63
64
65
66
67
68
image: maven:3-jdk-14
# SNAPSHOT versions will be installed, it's a library
variables:
MAVEN_OPTS: "-Dmaven.repo.local=/.m2"
MAVEN_CLI_OPTS: " --batch-mode -Ddont-test=integration "
cache:
paths:
- target/
stages:
- build
- test
- assemble
build:
stage: build
script:
- mvn $MAVEN_CLI_OPTS clean compile
tags:
- java
#owasp:
# stage: build
# script:
# - mvn $MAVEN_CLI_OPTS dependency-check:check
# tags:
# - java
test:
stage: test
script:
- mvn $MAVEN_CLI_OPTS test
tags:
- java
package:
stage: assemble
script:
- mvn $MAVEN_CLI_OPTS install
- mv **/target/*.jar .
artifacts:
paths:
- "*.jar"
expire_in: 3 days
only:
- branches
tags:
- java
install:
stage: assemble
script:
- mvn $MAVEN_CLI_OPTS install
- mv **/target/*.jar .
artifacts:
paths:
- "*.jar"
expire_in: 3 months
only:
- tags
tags:
- java