-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
45 lines (39 loc) · 2.04 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
.maven_init: &maven_init |
function maven_init() {
git config user.email "${GITLAB_USER_EMAIL}"
git config user.name "${GITLAB_USER_NAME}"
cat ${gpg_private_key} | gpg --batch --import > /dev/null
echo ${gpg_passphrase} | gpg --batch --always-trust --yes --passphrase-fd 0 --pinentry-mode=loopback -s $(mktemp) > /dev/null
}
maven_init
variables:
MAVEN_OPTS: "-Dorg.slf4j.simpleLogger.showDateTime=true -Dorg.slf4j.simpleLogger.dateTimeFormat=HH:mm:ss,SSS"
maven_build:
image: maven:3-jdk-21
before_script:
- *maven_init
script: mvn -B clean deploy site-deploy -DfullBuild -s ci_settings.xml
only:
- /^(version\/[^/]+)$/
maven_release:
image: maven:3-jdk-11
before_script:
- *maven_init
script:
- git checkout -B "${CI_COMMIT_REF_NAME}"
- mvn -B clean release:prepare release:perform -DfullBuild -s ci_settings.xml -Dusername=${ci_git_user} -Dpassword=${ci_git_token} -DignoreSnapshots=true
only:
- /^(release)|(version\/release\/[^/]+)$/
# You can override the included template(s) by including variable overrides
# SAST customization: https://docs.gitlab.com/ee/user/application_security/sast/#customizing-the-sast-settings
# Secret Detection customization: https://docs.gitlab.com/ee/user/application_security/secret_detection/#customizing-settings
# Dependency Scanning customization: https://docs.gitlab.com/ee/user/application_security/dependency_scanning/#customizing-the-dependency-scanning-settings
# Container Scanning customization: https://docs.gitlab.com/ee/user/application_security/container_scanning/#customizing-the-container-scanning-settings
# Note that environment variables can be set in several places
# See https://docs.gitlab.com/ee/ci/variables/#cicd-variable-precedence
sast:
stage: test
variables:
SAST_JAVA_VERSION: 11
include:
- template: Security/SAST.gitlab-ci.yml