8000 Stop publishing snapshots · hibernate/hibernate-validator@2cdaa9d · GitHub
[go: up one dir, main page]

Skip to content

Commit 2cdaa9d

Browse files
yrodieremarko-bekhta
authored andcommitted
Stop publishing snapshots
1 parent 5100698 commit 2cdaa9d

File tree

1 file changed

+4
-35
lines changed

1 file changed

+4
-35
lines changed

Jenkinsfile

Lines changed: 4 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -51,15 +51,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
5151
*
5252
* ### Integrations
5353
*
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-
*
6354
* ### Job configuration
6455
*
6556
* This Jenkinsfile gets its configuration from four sources:
@@ -83,11 +74,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
8374
*
8475
* Below is the additional structure specific to this Jenkinsfile:
8576
*
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: ...
9177
*/
9278

9379
@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 17 Latest'
@@ -105,7 +91,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
10591

10692
@Field boolean enableDefaultBuild = false
10793
@Field boolean enableDefaultBuildIT = false
108-
@Field boolean deploySnapshot = false
10994

11095
this.helper = new JobHelper(this)
11196

@@ -191,15 +176,6 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse'.
191176
])
192177
])
193178

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-
203179
if (params.ENVIRONMENT_FILTER) {
204180
keepOnlyEnvironmentsMatchingFilter(params.ENVIRONMENT_FILTER)
205181
}
@@ -223,8 +199,7 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse'.
223199

224200
enableDefaultBuild =
225201
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() } }
228203

229204
echo """Branch: ${helper.scmSource.branch.name}
230205
PR: ${helper.scmSource.pullRequest?.id}
@@ -235,7 +210,6 @@ Resulting execution plan:
235210
enableDefaultBuild=$enableDefaultBuild
236211
enableDefaultBuildIT=$enableDefaultBuildIT
237212
environments=${environments.enabledAsString}
238-
deploySnapshot=$deploySnapshot
239213
"""
240214
}
241215

@@ -246,15 +220,10 @@ stage('Default build') {
246220
return
247221
}
248222
runBuildOnNode {
249-
helper.withMavenWorkspace(mavenSettingsConfig: deploySnapshot ? helper.configuration.file.deployment.maven.settingsId : null) {
223+
helper.withMavenWorkspace {
250224
sh """ \
251-
mvn clean \
225+
mvn clean install \
252226
--fail-at-end \
253-
${deploySnapshot ? "\
254-
deploy -DdeployAtEnd=true \
255-
" : "\
256-
install \
257-
"} \
258227
-Pdist \
259228
-Pjqassistant \
260229
${enableDefaultBuildIT ? '' : '-DskipITs'} \
@@ -507,4 +476,4 @@ String toTestJdkArg(BuildEnvironment buildEnv) {
507476
}
508477

509478
return args
510-
}
479+
}

0 commit comments

Comments
 (0)
0