Skip to content

Commit 66dbb7a

Browse files
committed
HHH-17981 Automate maintenance releases for 6.4
1 parent 7401c19 commit 66dbb7a

8 files changed

+88
-483
lines changed

Diff for: .github/workflows/atlas.yml

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
name: Hibernate ORM build-Atlas
88

99
on:
10-
push:
11-
branches:
12-
- '6.4'
1310
pull_request:
1411
branches:
1512
- '6.4'

Diff for: .github/workflows/contributor-build.yml

-3
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,6 @@
77
name: Hibernate ORM build
88

99
on:
10-
push:
11-
branches:
12-
- '6.4'
1310
pull_request:
1411
branches:
1512
- '6.4'

Diff for: Jenkinsfile

+12-34
Original file line numberDiff line numberDiff line change
@@ -26,28 +26,13 @@ this.helper = new JobHelper(this)
2626
helper.runWithNotification {
2727
stage('Configure') {
2828
this.environments = [
29-
// new BuildEnvironment( dbName: 'h2' ),
30-
// new BuildEnvironment( dbName: 'hsqldb' ),
31-
// new BuildEnvironment( dbName: 'derby' ),
32-
// new BuildEnvironment( dbName: 'mysql' ),
33-
// new BuildEnvironment( dbName: 'mariadb' ),
34-
// new BuildEnvironment( dbName: 'postgresql' ),
35-
// new BuildEnvironment( dbName: 'edb' ),
36-
// new BuildEnvironment( dbName: 'oracle' ),
37-
// new BuildEnvironment( dbName: 'db2' ),
38-
// new BuildEnvironment( dbName: 'mssql' ),
39-
// new BuildEnvironment( dbName: 'sybase' ),
40-
// Don't build with HANA by default, but only do it nightly until we receive a 3rd instance
41-
// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ),
4229
new BuildEnvironment( node: 's390x' ),
43-
new BuildEnvironment( dbName: 'tidb', node: 'tidb',
44-
notificationRecipients: '[email protected]' ),
30+
new BuildEnvironment( dbName: 'sybase_jconn' ),
4531
new BuildEnvironment( testJdkVersion: '17' ),
32+
new BuildEnvironment( testJdkVersion: '21' ),
4633
// We want to enable preview features when testing newer builds of OpenJDK:
4734
// even if we don't use these features, just enabling them can cause side effects
4835
// and it's useful to test that.
49-
new BuildEnvironment( testJdkVersion: '20', testJdkLauncherArgs: '--enable-preview' ),
50-
new BuildEnvironment( testJdkVersion: '21', testJdkLauncherArgs: '--enable-preview' ),
5136
new BuildEnvironment( testJdkVersion: '22', testJdkLauncherArgs: '--enable-preview' ),
5237
// The following JDKs aren't supported by Hibernate ORM out-of-the box yet:
5338
// they require the use of -Dnet.bytebuddy.experimental=true.
@@ -56,18 +41,6 @@ stage('Configure') {
5641
new BuildEnvironment( testJdkVersion: '23', testJdkLauncherArgs: '--enable-preview -Dnet.bytebuddy.experimental=true' )
5742
];
5843

59-
if ( env.CHANGE_ID ) {
60-
if ( pullRequest.labels.contains( 'cockroachdb' ) ) {
61-
this.environments.add( new BuildEnvironment( dbName: 'cockroachdb', node: 'cockroachdb', longRunning: true ) )
62-
}
63-
if ( pullRequest.labels.contains( 'hana' ) ) {
64-
this.environments.add( new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ) )
65-
}
66-
if ( pullRequest.labels.contains( 'sybase' ) ) {
67-
this.environments.add( new BuildEnvironment( dbName: 'sybase_jconn' ) )
68-
}
69-
}
70-
7144
helper.configure {
7245
file 'job-configuration.yaml'
7346
// We don't require the following, but the build helper plugin apparently does
@@ -91,19 +64,21 @@ stage('Configure') {
9164

9265
// Avoid running the pipeline on branch indexing
9366
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
94-
print "INFO: Build skipped due to trigger being Branch Indexing"
67+
print "INFO: Build skipped due to trigger being Branch Indexing"
9568
currentBuild.result = 'NOT_BUILT'
9669
return
9770
}
71+
// This is a limited maintenance branch, so don't run this on pushes to the branch, only on PRs
72+
if ( !env.CHANGE_ID ) {
73+
print "INFO: Build skipped because this job should only run for pull request, not for branch pushes"
74+
currentBuild.result = 'NOT_BUILT'
75+
return
76+
}
9877

9978
stage('Build') {
10079
Map<String, Closure> executions = [:]
10180
Map<String, Map<String, String>> state = [:]
10281
environments.each { BuildEnvironment buildEnv ->
103-
// Don't build environments for newer JDKs when this is a PR
104-
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion ) {
105-
return
106-
}
10782
state[buildEnv.tag] = [:]
10883
executions.put(buildEnv.tag, {
10984
runBuildOnNode(buildEnv.node ?: NODE_PATTERN_BASE) {
@@ -194,6 +169,9 @@ stage('Build') {
194169
}
195170
})
196171
}
172+
executions.put('Hibernate Search Update Dependency', {
173+
build job: '/hibernate-search-dependency-update/7.1', propagate: true, parameters: [string(name: 'UPDATE_JOB', value: 'orm6.4'), string(name: 'ORM_REPOSITORY', value: helper.scmSource.remoteUrl), string(name: 'ORM_PULL_REQUEST_ID', value: helper.scmSource.pullRequest.id)]
174+
})
197175
parallel(executions)
198176
}
199177

Diff for: ci/jpa-3.1-tck.Jenkinsfile

+7-14
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,15 @@
22

33
// Avoid running the pipeline on branch indexing
44
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
5-
print "INFO: Build skipped due to trigger being Branch Indexing"
5+
print "INFO: Build skipped due to trigger being Branch Indexing"
66
currentBuild.result = 'NOT_BUILT'
7-
return
7+
return
88
}
9-
def throttleCount
10-
// Don't build the TCK on PRs, unless they use the tck label
11-
if ( env.CHANGE_ID != null ) {
12-
if ( !pullRequest.labels.contains( 'tck' ) ) {
13-
print "INFO: Build skipped because pull request doesn't have 'tck' label"
14-
return
15-
}
16-
throttleCount = 20
17-
}
18-
else {
19-
throttleCount = 1
9+
// This is a limited maintenance branch, so don't run this on pushes to the branch, only on PRs
10+
if ( !env.CHANGE_ID ) {
11+
print "INFO: Build skipped because this job should only run for pull request, not for branch pushes"
12+
currentBuild.result = 'NOT_BUILT'
13+
return
2014
}
2115

2216
pipeline {
@@ -27,7 +21,6 @@ pipeline {
2721
jdk 'OpenJDK 11 Latest'
2822
}
2923
options {
30-
rateLimitBuilds(throttle: [count: throttleCount, durationName: 'day', userBoost: true])
3124
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
3225
disableConcurrentBuilds(abortPrevious: true)
3326
}

Diff for: ci/jpa-3.2-tck.Jenkinsfile

-99
This file was deleted.

Diff for: ci/quarkus.Jenkinsfile

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
@Library('[email protected]') _
2+
3+
// Avoid running the pipeline on branch indexing
4+
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
5+
print "INFO: Build skipped due to trigger being Branch Indexing"
6+
currentBuild.result = 'NOT_BUILT'
7+
return
8+
}
9+
// This is a limited maintenance branch, so don't run this on pushes to the branch, only on PRs
10+
if ( !env.CHANGE_ID ) {
11+
print "INFO: Build skipped because this job should only run for pull request, not for branch pushes"
12+
currentBuild.result = 'NOT_BUILT'
13+
return
14+
}
15+
16+
pipeline {
17+
agent {
18+
label 'LongDuration'
19+
}
20+
tools {
21+
jdk 'OpenJDK 17 Latest'
22+
}
23+
options {
24+
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
25+
disableConcurrentBuilds(abortPrevious: true)
26+
}
27+
stages {
28+
stage('Build') {
29+
steps {
30+
script {
31+
sh './gradlew publishToMavenLocal -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com --no-daemon'
32+
script {
33+
env.HIBERNATE_VERSION = sh (
34+
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
35+
returnStdout: true
36+
).trim()
37+
}
38+
dir('.release/quarkus') {
39+
sh "git clone -b 3.8 --single-branch https://github.com/quarkusio/quarkus.git . || git reset --hard && git clean -fx && git pull"
40+
sh "sed -i 's@<hibernate-orm.version>.*</hibernate-orm.version>@<hibernate-orm.version>${env.HIBERNATE_VERSION}</hibernate-orm.version>@' bom/application/pom.xml"
41+
// Need to override the default maven configuration this way, because there is no other way to do it
42+
sh "sed -i 's/-Xmx5g/-Xmx1920m/' ./.mvn/jvm.config"
43+
sh "echo -e '\\n-XX:MaxMetaspaceSize=768m'>>./.mvn/jvm.config"
44+
sh "./mvnw -pl !docs -Dquickly install"
45+
// Need to kill the gradle daemons started during the Maven install run
46+
sh "sudo pkill -f '.*GradleDaemon.*' || true"
47+
// Need to override the default maven configuration this way, because there is no other way to do it
48+
sh "sed -i 's/-Xmx1920m/-Xmx1340m/' ./.mvn/jvm.config"
49+
sh "sed -i 's/MaxMetaspaceSize=768m/MaxMetaspaceSize=512m/' ./.mvn/jvm.config"
50+
def excludes = "'!integration-tests/kafka-oauth-keycloak,!integration-tests/kafka-sasl-elytron,!integration-tests/hibernate-search-orm-opensearch,!integration-tests/maven,!integration-tests/quartz,!integration-tests/reactive-messaging-kafka,!integration-tests/resteasy-reactive-kotlin/standard,!integration-tests/opentelemetry-reactive-messaging,!integration-tests/virtual-threads/kafka-virtual-threads,!integration-tests/smallrye-jwt-oidc-webapp,!docs'"
51+
sh "TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true ./mvnw -pl :quarkus-hibernate-orm -amd -pl ${excludes} verify -Dstart-containers -Dtest-containers -Dskip.gradle.build"
52+
}
53+
}
54+
}
55+
}
56+
}
57+
post {
58+
always {
59+
configFileProvider([configFile(fileId: 'job-configuration.yaml', variable: 'JOB_CONFIGURATION_FILE')]) {
60+
notifyBuildResult maintainers: (String) readYaml(file: env.JOB_CONFIGURATION_FILE).notification?.email?.recipients
61+
}
62+
}
63+
}
64+
}

Diff for: ci/release/Jenkinsfile

+5-4
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,12 @@ pipeline {
5858
steps {
5959
script {
6060
// Avoid doing a release for commits from a release
61-
def lastCommitter = sh(script: 'git show -s --format=\'%an\'', returnStdout: true)
62-
def secondLastCommitter = sh(script: 'git show -s --format=\'%an\' HEAD~1', returnStdout: true)
61+
def lastCommitter = sh(script: 'git show -s --format=\'%an\'', returnStdout: true).trim()
62+
def secondLastCommitter = sh(script: 'git show -s --format=\'%an\' HEAD~1', returnStdout: true).trim()
6363
if (lastCommitter == 'Hibernate-CI' && secondLastCommitter == 'Hibernate-CI') {
64-
print "INFO: Build skipped because last commits were for the previous release"
65-
currentBuild.result = 'ABORTED'
64+
print "INFO: Release skipped because last commits were for the previous release"
65+
currentBuild.getRawBuild().getExecutor().interrupt(Result.NOT_BUILT)
66+
sleep(1) // Interrupt is not blocking and does not take effect immediately.
6667
return
6768
}
6869

0 commit comments

Comments
 (0)