-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.gitlab-ci.yml
117 lines (104 loc) · 2.69 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
---
# Copyright 2016-present Thomas Leplus
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
include:
- template: Security/Secret-Detection.gitlab-ci.yml
- template: Security/SAST.gitlab-ci.yml
stages:
- check
- test
variables:
MAVEN_OPTS: >
-Dhttps.protocols=TLSv1.2
-Dmaven.repo.local=.m2/repository
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
-Dorg.slf4j.simpleLogger.showDateTime=true
-Djava.awt.headless=true
MAVEN_CLI_OPTS: >
--batch-mode
--errors
--fail-at-end
--show-version
-DinstallAtEnd=true
-DdeployAtEnd=true
cache:
paths:
- .m2/repository
sast:
stage: check
secret_detection:
stage: check
OSV scanner:
image:
name: golang:latest
stage: check
before_script:
- "go install github.com/google/osv-scanner/cmd/osv-scanner@v1"
script:
- 'PATH="${PATH}:$(go env GOPATH)/bin" osv-scanner -r .'
timeout: 10 minutes
super linter:
image:
name: ghcr.io/super-linter/super-linter:latest
entrypoint:
- ""
stage: check
variables:
RUN_LOCAL: "true"
DEFAULT_BRANCH: "main"
USE_FIND_ALGORITHM: "true"
VALIDATE_ALL_CODEBASE: "true"
LINTER_RULES_PATH: "."
FILTER_REGEX_EXCLUDE: "(gradlew|gradlew.bat|gradle/*|mvnw|mvnw.cmd|.m2/*|.mvn/**)"
JAVA_FILE_NAME: "google_checks.xml"
before_script:
- 'ln -s "$(pwd)" /tmp/lint'
script:
- "/action/lib/linter.sh"
timeout: 10 minutes
versions:
image:
name: leplusorg/maven-check-versions:1.0.0@sha256:e8f760bb1faf3d3c333d75810e82289fdd275688421cc8bad04cdbbc757ae5a5
script:
- "/opt/maven-check-versions.sh"
stage: check
timeout: 10 minutes
verify:jdk8:
stage: test
image: maven:3-eclipse-temurin-8-alpine
script:
- "./mvnw $MAVEN_CLI_OPTS verify"
only:
- master
verify:jdk11:
stage: test
image: maven:3-eclipse-temurin-11-alpine
script:
- "./mvnw $MAVEN_CLI_OPTS verify"
only:
- master
verify:jdk17:
stage: test
image: maven:3-eclipse-temurin-17-alpine
script:
- "./mvnw $MAVEN_CLI_OPTS verify"
only:
- master
verify:jdk19:
stage: test
image: maven:3-eclipse-temurin-19-alpine
script:
- "./mvnw $MAVEN_CLI_OPTS verify"
only:
- master