Newer
Older
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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
{
"name": "Maven",
"description": "Build and test with [Maven](https://maven.apache.org/)",
"template_path": "templates/gitlab-ci-maven.yml",
"kind": "build",
"variables": [
{
"name": "MAVEN_IMAGE",
"description": "The Docker image used to run Maven - **it is highly recommended to set the specific version your project needs**",
"default": "maven:latest"
},
{
"name": "MAVEN_CFG_DIR",
"description": "The Maven configuration directory",
"default": ".m2",
"advanced": true
},
{
"name": "MAVEN_OPTS",
"description": "[Global Maven options](http://maven.apache.org/configure.html#maven_opts-environment-variable)",
"default": "-Dhttps.protocols=TLSv1.2 -Dmaven.repo.local=${MAVEN_CFG_DIR}/repository -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN -Dorg.slf4j.simpleLogger.showDateTime=true -Djava.awt.headless=true",
"advanced": true
},
{
"name": "MAVEN_CLI_OPTS",
"description": "Additional [Maven options](https://maven.apache.org/ref/3-LATEST/maven-embedder/cli.html) used on the command line",
"default": "--batch-mode --errors --fail-at-end --show-version -DinstallAtEnd=true -DdeployAtEnd=true -s ${MAVEN_CFG_DIR}/settings.xml",
"advanced": true
},
{
"name": "MAVEN_BUILD_ARGS",
"description": "Maven arguments for the build & test job",
"default": "org.jacoco:jacoco-maven-plugin:prepare-agent verify org.jacoco:jacoco-maven-plugin:report",
"advanced": true
}
],
"features": [
{
"id": "sonar",
"name": "SONAR",
"description": "Code quality and security analysis with [SONARQube](https://www.sonarqube.org/)",
"variables": [
{
"name": "SONAR_URL",
"type": "url",
"description": "SonarQube server url",
"mandatory": true
},
{
"name": "SONAR_AUTH_TOKEN",
"description": "SonarQube authentication [token](https://docs.sonarqube.org/latest/user-guide/user-token/) (depends on your authentication method)",
"secret": true
},
{
"name": "SONAR_LOGIN",
"description": "SonarQube login (depends on your authentication method)",
"secret": true
},
{
"name": "SONAR_PASSWORD",
"description": "SonarQube password (depends on your authentication method)",
"secret": true
},
{
"name": "SONAR_BASE_ARGS",
"description": "SonarQube [analysis arguments](https://docs.sonarqube.org/latest/analysis/analysis-parameters/)",
"default": "sonar:sonar -Dsonar.host.url=${SONAR_URL} -Dsonar.links.homepage=${CI_PROJECT_URL} -Dsonar.links.ci=${CI_PROJECT_URL}/-/pipelines -Dsonar.links.issue=${CI_PROJECT_URL}/-/issues -Dsonar.branch.name=${CI_COMMIT_REF_NAME}",
"advanced": true
},
{
"name": "SONAR_GITLAB_TOKEN",
"description": "GitLab API access token. When set, activates the [Sonar GitLab plugin](https://github.com/gabrie-allaigre/sonar-gitlab-plugin/#plugins-properties) integration",
"secret": true
},
{
"name": "SONAR_GITLAB_ARGS",
"description": "Extra arguments to use with [Sonar GitLab plugin](https://github.com/gabrie-allaigre/sonar-gitlab-plugin/#plugins-properties)",
"default": "-Dsonar.gitlab.url=${CI_SERVER_URL} -Dsonar.gitlab.user_token=${SONAR_GITLAB_TOKEN} -Dsonar.gitlab.project_id=${CI_PROJECT_ID} -Dsonar.gitlab.commit_sha=${CI_COMMIT_SHA} -Dsonar.gitlab.ref_name=${CI_COMMIT_REF_NAME}",
"advanced": true
},
{
"name": "SONAR_AUTO_ON_DEV_DISABLED",
"description": "When set, SonarQube analysis becomes **manual** on development branches (automatic otherwise)",
"type": "boolean"
},
{
"name": "SONAR_QUALITY_GATE_ENABLED",
"description": "Enable blocking check of SonarQube [Quality Gate](https://docs.sonarqube.org/latest/user-guide/quality-gates/) (for `master` branch)",
"type": "boolean"
}
]
},
{
"id": "dependency-check",
"name": "Dependency-Check",
"description": "[Dependency-Check](https://jeremylong.github.io/DependencyCheck/dependency-check-maven/configuration.html) analysis",
"variables": [
{
"name": "MAVEN_DEPENDENCY_CHECK_ARGS",
"description": "Maven arguments for Dependency Check job",
"default": "org.owasp:dependency-check-maven:check -DretireJsAnalyzerEnabled=false -DassemblyAnalyzerEnabled=false -Dformats=HTML,JSON,XML",
"advanced": true
}
]
},
{
"id": "publish",
"name": "Publish",
"description": "Publish [Snapshot](https://maven.apache.org/plugins/maven-deploy-plugin/) & [Releases](http://maven.apache.org/maven-release/maven-release-plugin) to a Nexus repository",
"enable_with": "MAVEN_DEPLOY_ENABLED",
"variables": [
{
"name": "MAVEN_DEPLOY_ARGS",
"description": "Maven arguments for the Snapshot job",
"default": "deploy -DskipTests",
"advanced": true
},
{
"name": "MAVEN_DEPLOY_FROM_UNPROTECTED_DISABLED",
"description": "Set to limit snapshot publication to protected branches",
"type": "boolean",
"advanced": true
},
{
"name": "MAVEN_RELEASE_ARGS",
"description": "Maven arguments for the Release job",
"default": "release:prepare release:perform -DskipTests",
"advanced": true
},
{
"name": "MAVEN_RELEASE_SCM_COMMENT_PREFIX",
"description": "Maven release plugin [scmCommentPrefix](https://maven.apache.org/maven-release/maven-release-plugin/prepare-mojo.html#scmCommentPrefix) parameter",
"default": "[ci skip][maven-release-plugin]",
"advanced": true
},
{
"name": "GIT_USERNAME",
"description": "Git username (if you wish to release using Git credentials)",
"secret": true
},
{
"name": "GIT_PASSWORD",
"description": "Git password (if you wish to release using Git credentials)",
"secret": true
},
{
"name": "GIT_PRIVATE_KEY",
"description": "Git private SSH key (if you wish to release using SSH key or GitLab Deploy Key)",
"secret": true
},
{
"name": "MAVEN_REPOSITORY_USERNAME",
"description": "Maven repository username (inject in your settings.xml as ${env.MAVEN_REPOSITORY_USERNAME})",
"secret": true
},
{
"name": "MAVEN_REPOSITORY_PASSWORD",
"description": "Maven repository password (inject in your settings.xml as ${env.MAVEN_REPOSITORY_PASSWORD})",
"secret": true
}
]
}
]
}