@@ -51,15 +51,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
51
51
*
52
52
* ### Integrations
53
53
*
54
- * #### Nexus deployment
55
- *
56
- * This job is only able to deploy snapshot artifacts,
57
- * for every non-PR build on "primary" branches (main and maintenance branches),
58
- * but the name of a Maven settings file must be provided in the job configuration file
59
- * (see below).
60
- *
61
- * For actual releases, see jenkins/release.groovy.
62
- *
63
54
* ### Job configuration
64
55
*
65
56
* This Jenkinsfile gets its configuration from four sources:
@@ -83,11 +74,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
83
74
*
84
75
* Below is the additional structure specific to this Jenkinsfile:
85
76
*
86
- * deployment:
87
- * maven:
88
- * # String containing the ID of a Maven settings file registered using the config-file-provider Jenkins plugin.
89
- * # The settings must provide credentials to the server with ID 'ossrh'.
90
- * settingsId: ...
91
77
*/
92
78
93
79
@Field final String DEFAULT_JDK_TOOL = ' OpenJDK 17 Latest'
@@ -105,7 +91,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
105
91
106
92
@Field boolean enableDefaultBuild = false
107
93
@Field boolean enableDefaultBuildIT = false
108
- @Field boolean deploySnapshot = false
109
94
110
95
this . helper = new JobHelper (this )
111
96
@@ -191,15 +176,6 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse'.
191
176
])
192
177
])
193
178
194
- if (helper. scmSource. branch. primary && ! helper. scmSource. pullRequest) {
195
- if (helper. configuration. file?. deployment?. maven?. settingsId) {
196
- deploySnapshot = true
197
- }
198
- else {
199
- echo " Missing deployment configuration in job configuration file - snapshot deployment will be skipped."
200
- }
201
- }
202
-
203
179
if (params. ENVIRONMENT_FILTER ) {
204
180
keepOnlyEnvironmentsMatchingFilter(params. ENVIRONMENT_FILTER )
205
181
}
@@ -223,8 +199,7 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse'.
223
199
224
200
enableDefaultBuild =
225
201
enableDefaultBuildIT ||
226
- environments. content. any { key , envSet -> envSet. enabled. any { buildEnv -> buildEnv. requiresDefaultBuildArtifacts() } } ||
227
- deploySnapshot
202
+ environments. content. any { key , envSet -> envSet. enabled. any { buildEnv -> buildEnv. requiresDefaultBuildArtifacts() } }
228
203
229
204
echo """ Branch: ${ helper.scmSource.branch.name}
230
205
PR: ${ helper.scmSource.pullRequest?.id}
@@ -235,7 +210,6 @@ Resulting execution plan:
235
210
enableDefaultBuild=$enableDefaultBuild
236
211
enableDefaultBuildIT=$enableDefaultBuildIT
237
212
environments=${ environments.enabledAsString}
238
- deploySnapshot=$deploySnapshot
239
213
"""
240
214
}
241
215
@@ -246,15 +220,10 @@ stage('Default build') {
246
220
return
247
221
}
248
222
runBuildOnNode {
249
- helper. withMavenWorkspace( mavenSettingsConfig : deploySnapshot ? helper . configuration . file . deployment . maven . settingsId : null ) {
223
+ helper. withMavenWorkspace {
250
224
sh """ \
251
- mvn clean \
225
+ mvn clean install \
252
226
--fail-at-end \
253
- ${ deploySnapshot ? "\
254
- deploy -DdeployAtEnd=true \
255
- " : "\
256
- install \
257
- "} \
258
227
-Pdist \
259
228
-Pjqassistant \
260
229
${ enableDefaultBuildIT ? '' : '-DskipITs'} \
@@ -507,4 +476,4 @@ String toTestJdkArg(BuildEnvironment buildEnv) {
507
476
}
508
477
509
478
return args
510
- }
479
+ }
0 commit comments