-
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-18846 Enable release automation for ORM 6.6
- Loading branch information
Showing
7 changed files
with
90 additions
and
411 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 |
---|---|---|
@@ -1,9 +1,6 @@ | ||
name: GH Actions CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- '6.6' | ||
pull_request: | ||
branches: | ||
- '6.6' | ||
|
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 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 |
---|---|---|
|
@@ -28,48 +28,21 @@ stage('Configure') { | |
requireApprovalForPullRequest 'hibernate' | ||
|
||
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: '23', 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. | ||
// Make sure to remove that argument as soon as possible | ||
// -- generally that requires upgrading bytebuddy after the JDK goes GA. | ||
new BuildEnvironment( testJdkVersion: '23', testJdkLauncherArgs: '--enable-preview -Dnet.bytebuddy.experimental=true' ), | ||
new BuildEnvironment( testJdkVersion: '24', 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 | ||
|
@@ -97,15 +70,17 @@ if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) { | |
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) { | ||
|
@@ -198,6 +173,9 @@ stage('Build') { | |
} | ||
}) | ||
} | ||
executions.put('Hibernate Search Update Dependency', { | ||
build job: '/hibernate-search-dependency-update/7.2', propagate: true, parameters: [string(name: 'UPDATE_JOB', value: 'orm6.6'), 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 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,70 @@ | ||
@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) | ||
skipDefaultCheckout() | ||
} | ||
stages { | ||
stage('Build') { | ||
steps { | ||
script { | ||
dir('hibernate') { | ||
checkout scm | ||
sh "./gradlew publishToMavenLocal -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com --no-daemon -Dmaven.repo.local=${env.WORKSPACE}/.m2repository" | ||
script { | ||
env.HIBERNATE_VERSION = sh ( | ||
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2", | ||
returnStdout: true | ||
).trim() | ||
} | ||
} | ||
dir('quarkus') { | ||
sh "git clone -b 3.15 --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/-Xmx2048m/' ./.mvn/jvm.config" | ||
sh "echo -e '\\n-XX:MaxMetaspaceSize=1024m'>>./.mvn/jvm.config" | ||
withMaven(mavenLocalRepo: env.WORKSPACE + '/.m2repository', publisherStrategy:'EXPLICIT') { | ||
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/-Xmx2048m/-Xmx1340m/' ./.mvn/jvm.config" | ||
sh "sed -i 's/MaxMetaspaceSize=1024m/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 -Dinsecure.repositories=WARN -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.