-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
HHH-17981 Automate maintenance releases for 6.4
- Loading branch information
Showing
8 changed files
with
88 additions
and
483 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,6 @@ | |
name: Hibernate ORM build-Atlas | ||
|
||
on: | ||
push: | ||
branches: | ||
- '6.4' | ||
pull_request: | ||
branches: | ||
- '6.4' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,9 +7,6 @@ | |
name: Hibernate ORM build | ||
|
||
on: | ||
push: | ||
branches: | ||
- '6.4' | ||
pull_request: | ||
branches: | ||
- '6.4' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,28 +26,13 @@ this.helper = new JobHelper(this) | |
helper.runWithNotification { | ||
stage('Configure') { | ||
this.environments = [ | ||
// new BuildEnvironment( dbName: 'h2' ), | ||
// new BuildEnvironment( dbName: 'hsqldb' ), | ||
// new BuildEnvironment( dbName: 'derby' ), | ||
// new BuildEnvironment( dbName: 'mysql' ), | ||
// new BuildEnvironment( dbName: 'mariadb' ), | ||
// new BuildEnvironment( dbName: 'postgresql' ), | ||
// new BuildEnvironment( dbName: 'edb' ), | ||
// new BuildEnvironment( dbName: 'oracle' ), | ||
// new BuildEnvironment( dbName: 'db2' ), | ||
// new BuildEnvironment( dbName: 'mssql' ), | ||
// new BuildEnvironment( dbName: 'sybase' ), | ||
// Don't build with HANA by default, but only do it nightly until we receive a 3rd instance | ||
// new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ), | ||
new BuildEnvironment( node: 's390x' ), | ||
new BuildEnvironment( dbName: 'tidb', node: 'tidb', | ||
notificationRecipients: '[email protected]' ), | ||
new BuildEnvironment( dbName: 'sybase_jconn' ), | ||
new BuildEnvironment( testJdkVersion: '17' ), | ||
new BuildEnvironment( testJdkVersion: '21' ), | ||
// We want to enable preview features when testing newer builds of OpenJDK: | ||
// even if we don't use these features, just enabling them can cause side effects | ||
// and it's useful to test that. | ||
new BuildEnvironment( testJdkVersion: '20', testJdkLauncherArgs: '--enable-preview' ), | ||
new BuildEnvironment( testJdkVersion: '21', testJdkLauncherArgs: '--enable-preview' ), | ||
new BuildEnvironment( testJdkVersion: '22', testJdkLauncherArgs: '--enable-preview' ), | ||
// The following JDKs aren't supported by Hibernate ORM out-of-the box yet: | ||
// they require the use of -Dnet.bytebuddy.experimental=true. | ||
|
@@ -56,18 +41,6 @@ stage('Configure') { | |
new BuildEnvironment( testJdkVersion: '23', testJdkLauncherArgs: '--enable-preview -Dnet.bytebuddy.experimental=true' ) | ||
]; | ||
|
||
if ( env.CHANGE_ID ) { | ||
if ( pullRequest.labels.contains( 'cockroachdb' ) ) { | ||
this.environments.add( new BuildEnvironment( dbName: 'cockroachdb', node: 'cockroachdb', longRunning: true ) ) | ||
} | ||
if ( pullRequest.labels.contains( 'hana' ) ) { | ||
this.environments.add( new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true ) ) | ||
} | ||
if ( pullRequest.labels.contains( 'sybase' ) ) { | ||
this.environments.add( new BuildEnvironment( dbName: 'sybase_jconn' ) ) | ||
} | ||
} | ||
|
||
helper.configure { | ||
file 'job-configuration.yaml' | ||
// We don't require the following, but the build helper plugin apparently does | ||
|
@@ -91,19 +64,21 @@ stage('Configure') { | |
|
||
// Avoid running the pipeline on branch indexing | ||
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { | ||
print "INFO: Build skipped due to trigger being Branch Indexing" | ||
print "INFO: Build skipped due to trigger being Branch Indexing" | ||
currentBuild.result = 'NOT_BUILT' | ||
return | ||
} | ||
// This is a limited maintenance branch, so don't run this on pushes to the branch, only on PRs | ||
if ( !env.CHANGE_ID ) { | ||
print "INFO: Build skipped because this job should only run for pull request, not for branch pushes" | ||
currentBuild.result = 'NOT_BUILT' | ||
return | ||
} | ||
|
||
stage('Build') { | ||
Map<String, Closure> executions = [:] | ||
Map<String, Map<String, String>> state = [:] | ||
environments.each { BuildEnvironment buildEnv -> | ||
// Don't build environments for newer JDKs when this is a PR | ||
if ( helper.scmSource.pullRequest && buildEnv.testJdkVersion ) { | ||
return | ||
} | ||
state[buildEnv.tag] = [:] | ||
executions.put(buildEnv.tag, { | ||
runBuildOnNode(buildEnv.node ?: NODE_PATTERN_BASE) { | ||
|
@@ -194,6 +169,9 @@ stage('Build') { | |
} | ||
}) | ||
} | ||
executions.put('Hibernate Search Update Dependency', { | ||
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)] | ||
}) | ||
parallel(executions) | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
@Library('[email protected]') _ | ||
|
||
// Avoid running the pipeline on branch indexing | ||
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { | ||
print "INFO: Build skipped due to trigger being Branch Indexing" | ||
currentBuild.result = 'NOT_BUILT' | ||
return | ||
} | ||
// This is a limited maintenance branch, so don't run this on pushes to the branch, only on PRs | ||
if ( !env.CHANGE_ID ) { | ||
print "INFO: Build skipped because this job should only run for pull request, not for branch pushes" | ||
currentBuild.result = 'NOT_BUILT' | ||
return | ||
} | ||
|
||
pipeline { | ||
agent { | ||
label 'LongDuration' | ||
} | ||
tools { | ||
jdk 'OpenJDK 17 Latest' | ||
} | ||
options { | ||
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3')) | ||
disableConcurrentBuilds(abortPrevious: true) | ||
} | ||
stages { | ||
stage('Build') { | ||
steps { | ||
script { | ||
sh './gradlew publishToMavenLocal -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com --no-daemon' | ||
script { | ||
env.HIBERNATE_VERSION = sh ( | ||
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2", | ||
returnStdout: true | ||
).trim() | ||
} | ||
dir('.release/quarkus') { | ||
sh "git clone -b 3.8 --single-branch https://github.com/quarkusio/quarkus.git . || git reset --hard && git clean -fx && git pull" | ||
sh "sed -i 's@<hibernate-orm.version>.*</hibernate-orm.version>@<hibernate-orm.version>${env.HIBERNATE_VERSION}</hibernate-orm.version>@' bom/application/pom.xml" | ||
// Need to override the default maven configuration this way, because there is no other way to do it | ||
sh "sed -i 's/-Xmx5g/-Xmx1920m/' ./.mvn/jvm.config" | ||
sh "echo -e '\\n-XX:MaxMetaspaceSize=768m'>>./.mvn/jvm.config" | ||
sh "./mvnw -pl !docs -Dquickly install" | ||
// Need to kill the gradle daemons started during the Maven install run | ||
sh "sudo pkill -f '.*GradleDaemon.*' || true" | ||
// Need to override the default maven configuration this way, because there is no other way to do it | ||
sh "sed -i 's/-Xmx1920m/-Xmx1340m/' ./.mvn/jvm.config" | ||
sh "sed -i 's/MaxMetaspaceSize=768m/MaxMetaspaceSize=512m/' ./.mvn/jvm.config" | ||
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'" | ||
sh "TESTCONTAINERS_RYUK_CONTAINER_PRIVILEGED=true ./mvnw -pl :quarkus-hibernate-orm -amd -pl ${excludes} verify -Dstart-containers -Dtest-containers -Dskip.gradle.build" | ||
} | ||
} | ||
} | ||
} | ||
} | ||
post { | ||
always { | ||
configFileProvider([configFile(fileId: 'job-configuration.yaml', variable: 'JOB_CONFIGURATION_FILE')]) { | ||
notifyBuildResult maintainers: (String) readYaml(file: env.JOB_CONFIGURATION_FILE).notification?.email?.recipients | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.