-
Notifications
You must be signed in to change notification settings - Fork 1
/
.gitlab-ci.yml
65 lines (54 loc) · 1.87 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
variables:
MAVEN_CLI_OPTS: "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository -Dmaven.compiler.showWarnings=false -Dmaven.compiler.debug=false -Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss:SSS"
image: maven:3-openjdk-17
include:
- template: Security/SAST.gitlab-ci.yml
cache:
paths:
- .m2/repository
- target
stages:
- build
- test
- package
- integration-test
build:
stage: build
script:
- ./mvnw $MAVEN_CLI_OPTS clean compile
sast:
stage: test
spotbugs-sast:
variables:
MAVEN_REPO_PATH: '.m2/repository'
SAST_JAVA_VERSION: 17
package:
stage: package
script:
- ./mvnw $MAVEN_CLI_OPTS -DskipTests package
http-test-with-maven-plugin:
stage: integration-test
script:
- microdnf install unzip
- curl -f -s -L -o ijhttp.zip https://jb.gg/ijhttp/latest
- unzip -nq ijhttp.zip -d target
- rm ijhttp.zip
- ./mvnw $MAVEN_CLI_OPTS verify -ntp -DskipTests -Pspring-boot,maven-plugin
artifacts:
reports:
junit:
- reports/report.xml
http-test-on-docker-image:
image:
name: jetbrains/intellij-http-client:233.11799.241
entrypoint: [""]
stage: integration-test
before_script:
- java -jar target/ijhttp-demo.jar &
- while ! nc -z localhost 8080 </dev/null; do sleep 5; done
script:
- java -cp "/intellij-http-client/*" com.intellij.httpClient.cli.HttpClientMain --env=demo --env-variables "another-variable=you can see it too" -V "third-variable=you can see me too" -V localport=8080 --env-file=public-env.json --private-env-file=private-env.json "--private-env-variables=hidden-variable2=you cannot see it too" -P "last-variable=you cannot see me too" --report --log-level=VERBOSE echo.http
artifacts:
reports:
junit:
- reports/report.xml