-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
46 lines (40 loc) · 1.15 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
image: maven:3-amazoncorretto-11
stages:
- staticTest
- build
variables:
VERSION: 0.0.${CI_PIPELINE_ID}
# Jobs
build:
stage: build
script:
- mvn clean package -Dproject.version=${VERSION}
artifacts:
name: "busylight_client.jar"
reports:
junit:
- "./target/surefire-reports/TEST-*.xml"
paths:
- ./target/busylight_client.jar
expire_in: 1 week
sonar:
stage: staticTest
extends: .loadDSTruststore
script:
- mvn clean package sonar:sonar -DskipTests -Dproject.version=${VERSION} -Dsonar.host.url=https://sonarqube.pt2.doubleslash.org/ -Dsonar.login="$SONAR_KEY" -Dsonar.projectName=busylight_client/${CI_COMMIT_REF_NAME}
dependencyCheck:
stage: staticTest
extends: .loadDSTruststore
script:
- mvn -Pdependency-check org.owasp:dependency-check-maven:check -Dproject.version=${VERSION}
artifacts:
when: always
name: "dependency-check-report"
paths:
- ./target/dependency-check-report.html
expire_in: 1 week
# Helper jobs
.loadDSTruststore:
before_script:
- echo installing custom truststore. COCT-1111
- curl $DS_JAVA_TRUSTSTORE_URL -o $JAVA_HOME/lib/security/jssecacerts