Skip to content

Commit 8a0e4a9

Browse files
committed
HHH-14663 : Add testing for s390x
1 parent c545cee commit 8a0e4a9

File tree

2 files changed

+38
-30
lines changed

2 files changed

+38
-30
lines changed

Jenkinsfile

+30-30
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ stage('Configure') {
4343
// buildEnv('8', 'mssql'),
4444
// buildEnv('8', 'sybase'),
4545
buildEnv('8', 'hana', 'HANA'),
46+
buildEnv('8', 's390x', 's390x'),
4647
// Disable EDB for now as the image is not available anymore
4748
// buildEnv('8', 'edb')
4849
];
@@ -148,56 +149,38 @@ stage('Build') {
148149
}
149150
}
150151
stage('Test') {
151-
// Clean by default otherwise the PackagedEntityManager tests fail on a node that previously ran a different DB
152-
boolean clean = true;
153-
String goal;
154-
String lockableResource;
155152
switch (buildEnv.dbName) {
156153
case "h2":
157154
case "derby":
158155
case "hsqldb":
159-
goal = "-Pdb=${buildEnv.dbName}"
156+
runTest("-Pdb=${buildEnv.dbName}")
160157
break;
161158
case "mysql8":
162-
goal = "-Pdb=mysql_ci"
159+
runTest("-Pdb=mysql_ci")
163160
break;
164161
case "postgresql_9_5":
165162
case "postgresql_13":
166-
goal = "-Pdb=pgsql_ci"
163+
runTest("-Pdb=pgsql_ci")
167164
break;
168165
case "oracle":
169-
goal = "-Pdb=oracle_ci -PexcludeTests=**.LockTest.testQueryTimeout*"
166+
runTest("-Pdb=oracle_ci -PexcludeTests=**.LockTest.testQueryTimeout*")
170167
break;
171168
case "oracle_ee":
172-
goal = "-Pdb=oracle_jenkins"
173-
lockableResource = 'ORACLE_RDS'
169+
runTest("-Pdb=oracle_jenkins", 'ORACLE_RDS')
174170
break;
175171
case "hana":
176-
// For HANA we have to also clean because this is a shared VM and the compile cache can become a problem
177-
clean = true;
178-
goal = "-Pdb=hana_jenkins"
172+
runTest("-Pdb=hana_jenkins", 'HANA')
179173
break;
180174
case "edb":
181-
goal = "-Pdb=edb_ci -DdbHost=localhost:5433"
175+
runTest("-Pdb=edb_ci -DdbHost=localhost:5433")
176+
break;
177+
case "s390x":
178+
runTest("-Pdb=h2")
182179
break;
183180
default:
184-
goal = "-Pdb=${buildEnv.dbName}_ci"
181+
runTest("-Pdb=${buildEnv.dbName}_ci")
185182
break;
186183
}
187-
String cmd = "./gradlew" + (clean ? " clean" : "") + " check ${goal} -Plog-test-progress=true --stacktrace";
188-
try {
189-
if (lockableResource == null) {
190-
sh cmd
191-
}
192-
else {
193-
lock(lockableResource) {
194-
sh cmd
195-
}
196-
}
197-
}
198-
finally {
199-
junit '**/target/test-results/test/*.xml'
200-
}
201184
}
202185
}
203186
finally {
@@ -270,10 +253,27 @@ void runBuildOnNode(String label, Closure body) {
270253
}
271254
}
272255
void pruneDockerContainers() {
273-
if ( !sh( script: 'which docker', returnStdout: true ).trim().isEmpty() ) {
256+
if ( !sh( script: 'command -v docker || true', returnStdout: true ).trim().isEmpty() ) {
274257
sh 'docker container prune -f || true'
275258
sh 'docker image prune -f || true'
276259
sh 'docker network prune -f || true'
277260
sh 'docker volume prune -f || true'
278261
}
262+
}
263+
// Clean by default otherwise the PackagedEntityManager tests fail on a node that previously ran a different DB
264+
void runTest(String goal, String lockableResource = null, boolean clean = true) {
265+
String cmd = "./gradlew" + (clean ? " clean" : "") + " check ${goal} -Plog-test-progress=true --stacktrace";
266+
try {
267+
if (lockableResource == null) {
268+
sh cmd
269+
}
270+
else {
271+
lock(lockableResource) {
272+
sh cmd
273+
}
274+
}
275+
}
276+
finally {
277+
junit '**/target/test-results/test/*.xml'
278+
}
279279
}

dialects.adoc

+8
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,13 @@ several requirements have to be fulfilled:
6161
In case the responsible employee is unreachable for a longer period or issues with the dialect are not attended to in a timely manner,
6262
the Hibernate team will move the dialect back to the `hibernate-community-dialects` artifact.
6363

64+
The requirements for the database server are:
65+
66+
* JDK 8 installed through e.g. `sudo yum install -y java-1.8.0-openjdk-devel`
67+
* JDK 11 installed through e.g. `sudo yum install -y java-11-openjdk-devel`
68+
* Git installed through e.g. `sudo yum install -y git`
69+
* Access to the database through non-confidential credentials
70+
* Access via SSH through confidential credentials
71+
6472
Get in touch with the Hibernate team on https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user[Zulip]
6573
if you want to request the move of your dialect to hibernate-core.

0 commit comments

Comments
 (0)