Skip to content

Commit a3cb74a

Browse files
yrodieremarko-bekhta
authored andcommitted
Stop snapshot publishing
(cherry picked from commit 59d7b31)
1 parent f056dce commit a3cb74a

File tree

1 file changed

+3
-34
lines changed

1 file changed

+3
-34
lines changed

Jenkinsfile

Lines changed: 3 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
5353
*
5454
* ### Integrations
5555
*
56-
* #### Nexus deployment
57-
*
58-
* This job is only able to deploy snapshot artifacts,
59-
* for every non-PR build on "primary" branches (main and maintenance branches),
60-
* but the name of a Maven settings file must be provided in the job configuration file
61-
* (see below).
62-
*
63-
* For actual releases, see jenkins/release.groovy.
64-
*
6556
* #### AWS
6657
*
6758
* This job will trigger integration tests against an Elasticsearch service hosted on AWS.
@@ -126,11 +117,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
126117
* # Expects username/password credentials where the username is the organization ID on sonarcloud.io
127118
* # and the password is a sonarcloud.io access token with sufficient rights for that organization.
128119
* credentials: ...
129-
* deployment:
130-
* maven:
131-
* # String containing the ID of a Maven settings file registered using the config-file-provider Jenkins plugin.
132-
* # The settings must provide credentials to the server with ID 'ossrh'.
133-
* settingsId: ...
134120
*/
135121

136122
@Field final String DEFAULT_JDK_TOOL = 'OpenJDK 17 Latest'
@@ -148,7 +134,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
148134

149135
@Field boolean enableDefaultBuild = false
150136
@Field boolean enableDefaultBuildIT = false
151-
@Field boolean deploySnapshot = false
152137
@Field boolean incrementalBuild = false
153138

154139
this.helper = new JobHelper(this)
@@ -347,15 +332,6 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse', 'postgresql', 'elast
347332
])
348333
])
349334

350-
if (helper.scmSource.branch.primary && !helper.scmSource.pullRequest) {
351-
if (helper.configuration.file?.deployment?.maven?.settingsId) {
352-
deploySnapshot = true
353-
}
354-
else {
355-
echo "Missing deployment configuration in job configuration file - snapshot deployment will be skipped."
356-
}
357-
}
358-
359335
if (params.ENVIRONMENT_FILTER) {
360336
keepOnlyEnvironmentsMatchingFilter(params.ENVIRONMENT_FILTER)
361337
}
@@ -374,8 +350,7 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse', 'postgresql', 'elast
374350

375351
enableDefaultBuild =
376352
enableDefaultBuildIT ||
377-
environments.content.any { key, envSet -> envSet.enabled.any { buildEnv -> buildEnv.requiresDefaultBuildArtifacts() } } ||
378-
deploySnapshot
353+
environments.content.any { key, envSet -> envSet.enabled.any { buildEnv -> buildEnv.requiresDefaultBuildArtifacts() } }
379354

380355
if (helper.scmSource.pullRequest) {
381356
incrementalBuild = true
@@ -390,7 +365,6 @@ Resulting execution plan:
390365
enableDefaultBuild=$enableDefaultBuild
391366
enableDefaultBuildIT=$enableDefaultBuildIT
392367
environments=${environments.enabledAsString}
393-
deploySnapshot=$deploySnapshot
394368
incrementalBuild=$incrementalBuild
395369
"""
396370
}
@@ -402,7 +376,7 @@ stage('Default build') {
402376
return
403377
}
404378
runBuildOnNode( NODE_PATTERN_BASE, [time: 2, unit: 'HOURS'] ) {
405-
withMavenWorkspace(mavenSettingsConfig: deploySnapshot ? helper.configuration.file.deployment.maven.settingsId : null) {
379+
withMavenWorkspace {
406380
String commonMavenArgs = """ \
407381
--fail-at-end \
408382
-Pcoverage \
@@ -416,12 +390,7 @@ stage('Default build') {
416390
-Pdist \
417391
-Pjqassistant -Pci-sources-check \
418392
-DskipITs \
419-
clean \
420-
${deploySnapshot ? "\
421-
deploy \
422-
" : "\
423-
install \
424-
"} \
393+
clean install \
425394
"""
426395
dir(helper.configuration.maven.localRepositoryPath) {
427396
stash name:'default-build-result', includes:"org/hibernate/search/**"

0 commit comments

Comments
 (0)