Skip to content

Commit 3c4114e

Browse files
committed
fixup! Also run Quarkus native image tests in parallel
1 parent deaeb1c commit 3c4114e

File tree

1 file changed

+54
-39
lines changed

1 file changed

+54
-39
lines changed

ci/quarkus.Jenkinsfile

Lines changed: 54 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
1+
import groovy.transform.Field
2+
13
@Library('hibernate-jenkins-pipeline-helpers') _
24

5+
@Field final String ORM_JDK_VERSION = '21'
6+
@Field final String QUARKUS_JDK_VERSION = '17'
7+
@Field final String ORM_JDK_TOOL = "OpenJDK ${ORM_JDK_VERSION} Latest"
8+
@Field final String QUARKUS_JDK_TOOL = "OpenJDK ${QUARKUS_JDK_VERSION} Latest"
9+
310
// Avoid running the pipeline on branch indexing
411
if (currentBuild.getBuildCauses().toString().contains('BranchIndexingCause')) {
512
print "INFO: Build skipped due to trigger being Branch Indexing"
@@ -61,22 +68,18 @@ class BuildConfiguration {
6168

6269
// See data category from https://github.com/quarkusio/quarkus/blob/main/.github/native-tests.json
6370
def configurations = [
64-
new BuildConfiguration( name: "JVM test", projects: "!integration-tests/kafka-oauth-keycloak,!integration-tests/kafka-sasl-elytron,!integration-tests/hibernate-search-orm-opensearch,!integration-tests/hibernate-search-orm-elasticsearch-outbox-polling,!integration-tests/hibernate-search-orm-elasticsearch-tenancy,!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,!extensions/oidc-db-token-state-manager/deployment,!docs",
65-
new BuildConfiguration( name: "Data1", nativeProfile: true, projects: "jpa-h2, jpa-h2-embedded, jpa-mariadb, jpa-mssql, jpa-without-entity, hibernate-orm-tenancy/datasource, hibernate-orm-tenancy/connection-resolver, hibernate-orm-tenancy/connection-resolver-legacy-qualifiers",
66-
new BuildConfiguration( name: "Data2", nativeProfile: true, projects: "jpa, jpa-mapping-xml/legacy-app, jpa-mapping-xml/modern-app, jpa-mysql, jpa-db2, jpa-oracle",
67-
new BuildConfiguration( name: "Data3", nativeProfile: true, projects: "flyway, hibernate-orm-panache, hibernate-orm-panache-kotlin, hibernate-orm-envers, liquibase, liquibase-mongodb",
68-
new BuildConfiguration( name: "Data4", nativeProfile: true, projects: "mongodb-client, mongodb-devservices, mongodb-panache, mongodb-rest-data-panache, mongodb-panache-kotlin, redis-client, hibernate-orm-rest-data-panache",
69-
new BuildConfiguration( name: "Data5", nativeProfile: true, projects: "jpa-postgresql, jpa-postgresql-withxml, narayana-stm, narayana-jta, reactive-pg-client, hibernate-reactive-postgresql, hibernate-orm-tenancy/schema, hibernate-orm-tenancy/schema-mariadb",
70-
new BuildConfiguration( name: "Data6", nativeProfile: true, projects: "elasticsearch-rest-client, elasticsearch-java-client, hibernate-search-orm-elasticsearch, hibernate-search-orm-elasticsearch-tenancy, hibernate-search-orm-opensearch, hibernate-search-orm-elasticsearch-outbox-polling, hibernate-search-standalone-elasticsearch, hibernate-search-standalone-opensearch",
71-
new BuildConfiguration( name: "Data7", nativeProfile: true, projects: "reactive-oracle-client, reactive-mysql-client, reactive-db2-client, hibernate-reactive-db2, hibernate-reactive-mariadb, hibernate-reactive-mssql, hibernate-reactive-mysql, hibernate-reactive-mysql-agroal-flyway, hibernate-reactive-panache, hibernate-reactive-panache-kotlin, hibernate-reactive-oracle"
71+
new BuildConfiguration( name: "JVM test", projects: "!integration-tests/kafka-oauth-keycloak,!integration-tests/kafka-sasl-elytron,!integration-tests/hibernate-search-orm-opensearch,!integration-tests/hibernate-search-orm-elasticsearch-outbox-polling,!integration-tests/hibernate-search-orm-elasticsearch-tenancy,!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,!extensions/oidc-db-token-state-manager/deployment,!docs"),
72+
new BuildConfiguration( name: "Data1", nativeProfile: true, projects: "jpa-h2, jpa-h2-embedded, jpa-mariadb, jpa-mssql, jpa-without-entity, hibernate-orm-tenancy/datasource, hibernate-orm-tenancy/connection-resolver, hibernate-orm-tenancy/connection-resolver-legacy-qualifiers"),
73+
new BuildConfiguration( name: "Data2", nativeProfile: true, projects: "jpa, jpa-mapping-xml/legacy-app, jpa-mapping-xml/modern-app, jpa-mysql, jpa-db2, jpa-oracle"),
74+
new BuildConfiguration( name: "Data3", nativeProfile: true, projects: "flyway, hibernate-orm-panache, hibernate-orm-panache-kotlin, hibernate-orm-envers, liquibase, liquibase-mongodb"),
75+
new BuildConfiguration( name: "Data4", nativeProfile: true, projects: "mongodb-client, mongodb-devservices, mongodb-panache, mongodb-rest-data-panache, mongodb-panache-kotlin, redis-client, hibernate-orm-rest-data-panache"),
76+
new BuildConfiguration( name: "Data5", nativeProfile: true, projects: "jpa-postgresql, jpa-postgresql-withxml, narayana-stm, narayana-jta, reactive-pg-client, hibernate-reactive-postgresql, hibernate-orm-tenancy/schema, hibernate-orm-tenancy/schema-mariadb"),
77+
new BuildConfiguration( name: "Data6", nativeProfile: true, projects: "elasticsearch-rest-client, elasticsearch-java-client, hibernate-search-orm-elasticsearch, hibernate-search-orm-elasticsearch-tenancy, hibernate-search-orm-opensearch, hibernate-search-orm-elasticsearch-outbox-polling, hibernate-search-standalone-elasticsearch, hibernate-search-standalone-opensearch"),
78+
new BuildConfiguration( name: "Data7", nativeProfile: true, projects: "reactive-oracle-client, reactive-mysql-client, reactive-db2-client, hibernate-reactive-db2, hibernate-reactive-mariadb, hibernate-reactive-mssql, hibernate-reactive-mysql, hibernate-reactive-mysql-agroal-flyway, hibernate-reactive-panache, hibernate-reactive-panache-kotlin, hibernate-reactive-oracle")
7279
]
7380

7481
pipeline {
7582
agent none
76-
tools {
77-
jdk 'OpenJDK 21 Latest'
78-
maven 'Apache Maven 3.9'
79-
}
8083
options {
8184
buildDiscarder(logRotator(numToKeepStr: '3', artifactNumToKeepStr: '3'))
8285
disableConcurrentBuilds(abortPrevious: true)
@@ -88,34 +91,45 @@ pipeline {
8891
requireApprovalForPullRequest 'hibernate'
8992
}
9093
}
91-
stage('Build') {
94+
stage('Build Hibernate ORM') {
95+
agent {
96+
label 'LongDuration'
97+
}
98+
tools {
99+
jdk ORM_JDK_TOOL
100+
}
92101
steps {
93-
stage('Build Hibernate ORM') {
94-
agent {
95-
label 'LongDuration'
96-
}
97-
script {
98-
dir('hibernate') {
99-
checkout scm
100-
sh "./gradlew clean publishToMavenLocal -x test --no-scan --no-daemon --no-build-cache --stacktrace -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com -Dmaven.repo.local=${env.WORKSPACE}/.m2repository"
101-
script {
102-
env.HIBERNATE_VERSION = sh (
103-
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
104-
returnStdout: true
105-
).trim()
106-
}
102+
script {
103+
dir('hibernate') {
104+
checkout scm
105+
sh "./gradlew clean publishToMavenLocal -x test --no-scan --no-daemon --no-build-cache --stacktrace -PmavenMirror=nexus-load-balancer-c4cf05fd92f43ef8.elb.us-east-1.amazonaws.com -Dmaven.repo.local=${env.WORKSPACE}/.m2repository"
106+
script {
107+
env.HIBERNATE_VERSION = sh (
108+
script: "grep hibernateVersion gradle/version.properties|cut -d'=' -f2",
109+
returnStdout: true
110+
).trim()
107111
}
108112
}
113+
stash name: 'repository', includes: ".m2repository/"
109114
}
110-
stage('Build Quarkus') {
111-
agent {
112-
label 'LongDuration'
113-
}
114-
script {
115-
Map<String, Closure> executions = [:]
115+
}
116+
}
117+
stage('Build Quarkus') {
118+
agent {
119+
label 'LongDuration'
120+
}
121+
tools {
122+
jdk QUARKUS_JDK_TOOL
123+
maven 'Apache Maven 3.9'
124+
}
125+
steps {
126+
script {
127+
Map<String, Closure> executions = [:]
116128

117-
configurations.each { BuildConfiguration configuration ->
118-
executions.put(configuration.name, {
129+
configurations.each { BuildConfiguration configuration ->
130+
executions.put(configuration.name, {
131+
node( 'LongDuration' ) {
132+
unstash "repository"
119133
dir('quarkus') {
120134
def quarkusVersionToTest = 'orm-7-1-10-3.27'
121135
sh "git clone -b ${quarkusVersionToTest} --single-branch https://github.com/yrodiere/quarkus.git . || git reset --hard && git clean -fx && git pull"
@@ -129,8 +143,9 @@ pipeline {
129143
sh "sed -i 's/-Xmx5g/-Xmx2048m/' ./.mvn/jvm.config"
130144
sh "echo -e '\\n-XX:MaxMetaspaceSize=1024m'>>./.mvn/jvm.config"
131145
withMaven(mavenLocalRepo: env.WORKSPACE + '/.m2repository', publisherStrategy: 'EXPLICIT') {
146+
def javaHome = tool(name: QUARKUS_JDK_TOOL, type: 'jdk')
132147
// to account for script-only maven wrapper use in Quarkus:
133-
withEnv(["MAVEN_ARGS=${env.MAVEN_ARGS?:""} ${env.MAVEN_CONFIG}"]) {
148+
withEnv(["JAVA_HOME=${javaHome}", "PATH+JAVA=${javaHome}/bin", "MAVEN_ARGS=${env.MAVEN_ARGS?:""} ${env.MAVEN_CONFIG}"]) {
134149
sh "./mvnw -pl !docs -Dquickly install"
135150
// Need to kill the gradle daemons started during the Maven install run
136151
sh "sudo pkill -f '.*GradleDaemon.*' || true"
@@ -152,10 +167,10 @@ pipeline {
152167
}
153168
}
154169
}
155-
})
156-
}
157-
parallel executions
170+
}
171+
})
158172
}
173+
parallel executions
159174
}
160175
}
161176
}

0 commit comments

Comments
 (0)