Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop snapshot publishing backport to 7.0 #4437

Merged
merged 1 commit into from
Dec 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 3 additions & 34 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
*
* ### Integrations
*
* #### Nexus deployment
*
* This job is only able to deploy snapshot artifacts,
* for every non-PR build on "primary" branches (main and maintenance branches),
* but the name of a Maven settings file must be provided in the job configuration file
* (see below).
*
* For actual releases, see jenkins/release.groovy.
*
* #### AWS
*
* This job will trigger integration tests against an Elasticsearch service hosted on AWS.
Expand Down Expand Up @@ -126,11 +117,6 @@ import org.hibernate.jenkins.pipeline.helpers.alternative.AlternativeMultiMap
* # Expects username/password credentials where the username is the organization ID on sonarcloud.io
* # and the password is a sonarcloud.io access token with sufficient rights for that organization.
* credentials: ...
* deployment:
* maven:
* # String containing the ID of a Maven settings file registered using the config-file-provider Jenkins plugin.
* # The settings must provide credentials to the server with ID 'ossrh'.
* settingsId: ...
*/

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

@Field boolean enableDefaultBuild = false
@Field boolean enableDefaultBuildIT = false
@Field boolean deploySnapshot = false
@Field boolean incrementalBuild = false

this.helper = new JobHelper(this)
Expand Down Expand Up @@ -337,15 +322,6 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse', 'postgresql', 'elast
])
])

if (helper.scmSource.branch.primary && !helper.scmSource.pullRequest) {
if (helper.configuration.file?.deployment?.maven?.settingsId) {
deploySnapshot = true
}
else {
echo "Missing deployment configuration in job configuration file - snapshot deployment will be skipped."
}
}

if (params.ENVIRONMENT_FILTER) {
keepOnlyEnvironmentsMatchingFilter(params.ENVIRONMENT_FILTER)
}
Expand All @@ -364,8 +340,7 @@ Some useful filters: 'default', 'jdk', 'jdk-10', 'eclipse', 'postgresql', 'elast

enableDefaultBuild =
enableDefaultBuildIT ||
environments.content.any { key, envSet -> envSet.enabled.any { buildEnv -> buildEnv.requiresDefaultBuildArtifacts() } } ||
deploySnapshot
environments.content.any { key, envSet -> envSet.enabled.any { buildEnv -> buildEnv.requiresDefaultBuildArtifacts() } }

if (helper.scmSource.pullRequest) {
incrementalBuild = true
Expand All @@ -380,7 +355,6 @@ Resulting execution plan:
enableDefaultBuild=$enableDefaultBuild
enableDefaultBuildIT=$enableDefaultBuildIT
environments=${environments.enabledAsString}
deploySnapshot=$deploySnapshot
incrementalBuild=$incrementalBuild
"""
}
Expand All @@ -392,7 +366,7 @@ stage('Default build') {
return
}
runBuildOnNode( NODE_PATTERN_BASE, [time: 2, unit: 'HOURS'] ) {
withMavenWorkspace(mavenSettingsConfig: deploySnapshot ? helper.configuration.file.deployment.maven.settingsId : null) {
withMavenWorkspace {
String commonMavenArgs = """ \
--fail-at-end \
-Pcoverage \
Expand All @@ -406,12 +380,7 @@ stage('Default build') {
-Pdist \
-Pjqassistant -Pci-sources-check \
-DskipITs \
clean \
${deploySnapshot ? "\
deploy \
" : "\
install \
"} \
clean install \
"""
dir(helper.configuration.maven.localRepositoryPath) {
stash name:'default-build-result', includes:"org/hibernate/search/**"
Expand Down
Loading