-
Notifications
You must be signed in to change notification settings - Fork 4
/
.gitlab-ci.yml
68 lines (61 loc) · 1.7 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
59
60
61
62
63
64
65
66
67
68
stages:
- SCA
- build
- greenlight
- scan
Software Composition Analysis:
stage: SCA
script:
- curl -sSL https://download.sourceclear.com/ci.sh | bash
build_job:
image: maven:3.6.0-jdk-8
stage: build
script:
- mvn clean package
artifacts:
name: verademo_julian_10_build
paths:
- target/
expire_in: 1 week
cache:
paths:
- target/
- .m2/repository
greenlight_job:
stage: greenlight
image: openjdk:8-jre
dependencies:
- build_job
artifacts:
name: verademo_julian_10_greenlight-results
paths:
- results.json
- results.txt
script:
- curl -O https://downloads.veracode.com/securityscan/gl-scanner-java-LATEST.zip
- unzip gl-scanner-java-LATEST.zip gl-scanner-java.jar
- java -jar gl-scanner-java.jar
-i ${VERACODE_API_ID}
-k ${VERACODE_API_KEY}
-b "target/classes/"
-s "src/main/java/"
-id true
-so true
artifacts:
name: verademo_julian_10_greenlight-results
paths:
- results.json
- results.txt
when: always
veracode-policy-scan:
stage: scan
image: openjdk:10
only:
- schedules
- master
before_script:
- wget -q -O veracode-wrapper.jar https://repo1.maven.org/maven2/com/veracode/vosp/api/wrappers/vosp-api-wrappers-java/${VERACODE_WRAPPER_VERSION}/vosp-api-wrappers-java-${VERACODE_WRAPPER_VERSION}.jar
script:
- java -jar --add-modules java.se.ee veracode-wrapper.jar -vid ${VERACODE_API_ID} -vkey ${VERACODE_API_KEY}
-action UploadAndScan -appname "${CI_PROJECT_NAME}" -createprofile true -autoscan true
-filepath target/verademo.war -version "job ${CI_JOB_ID} in pipeline ${CI_PIPELINE_ID}"