HHH-14663 : Add testing for s390x

This commit is contained in:
Christian Beikov 2021-10-12 14:58:19 +02:00
parent c545cee28c
commit 8a0e4a9cdd
2 changed files with 38 additions and 30 deletions

60
Jenkinsfile vendored
View File

@ -43,6 +43,7 @@ stage('Configure') {
// buildEnv('8', 'mssql'), // buildEnv('8', 'mssql'),
// buildEnv('8', 'sybase'), // buildEnv('8', 'sybase'),
buildEnv('8', 'hana', 'HANA'), buildEnv('8', 'hana', 'HANA'),
buildEnv('8', 's390x', 's390x'),
// Disable EDB for now as the image is not available anymore // Disable EDB for now as the image is not available anymore
// buildEnv('8', 'edb') // buildEnv('8', 'edb')
]; ];
@ -148,56 +149,38 @@ stage('Build') {
} }
} }
stage('Test') { stage('Test') {
// Clean by default otherwise the PackagedEntityManager tests fail on a node that previously ran a different DB
boolean clean = true;
String goal;
String lockableResource;
switch (buildEnv.dbName) { switch (buildEnv.dbName) {
case "h2": case "h2":
case "derby": case "derby":
case "hsqldb": case "hsqldb":
goal = "-Pdb=${buildEnv.dbName}" runTest("-Pdb=${buildEnv.dbName}")
break; break;
case "mysql8": case "mysql8":
goal = "-Pdb=mysql_ci" runTest("-Pdb=mysql_ci")
break; break;
case "postgresql_9_5": case "postgresql_9_5":
case "postgresql_13": case "postgresql_13":
goal = "-Pdb=pgsql_ci" runTest("-Pdb=pgsql_ci")
break; break;
case "oracle": case "oracle":
goal = "-Pdb=oracle_ci -PexcludeTests=**.LockTest.testQueryTimeout*" runTest("-Pdb=oracle_ci -PexcludeTests=**.LockTest.testQueryTimeout*")
break; break;
case "oracle_ee": case "oracle_ee":
goal = "-Pdb=oracle_jenkins" runTest("-Pdb=oracle_jenkins", 'ORACLE_RDS')
lockableResource = 'ORACLE_RDS'
break; break;
case "hana": case "hana":
// For HANA we have to also clean because this is a shared VM and the compile cache can become a problem runTest("-Pdb=hana_jenkins", 'HANA')
clean = true;
goal = "-Pdb=hana_jenkins"
break; break;
case "edb": case "edb":
goal = "-Pdb=edb_ci -DdbHost=localhost:5433" runTest("-Pdb=edb_ci -DdbHost=localhost:5433")
break;
case "s390x":
runTest("-Pdb=h2")
break; break;
default: default:
goal = "-Pdb=${buildEnv.dbName}_ci" runTest("-Pdb=${buildEnv.dbName}_ci")
break; break;
} }
String cmd = "./gradlew" + (clean ? " clean" : "") + " check ${goal} -Plog-test-progress=true --stacktrace";
try {
if (lockableResource == null) {
sh cmd
}
else {
lock(lockableResource) {
sh cmd
}
}
}
finally {
junit '**/target/test-results/test/*.xml'
}
} }
} }
finally { finally {
@ -270,10 +253,27 @@ void runBuildOnNode(String label, Closure body) {
} }
} }
void pruneDockerContainers() { void pruneDockerContainers() {
if ( !sh( script: 'which docker', returnStdout: true ).trim().isEmpty() ) { if ( !sh( script: 'command -v docker || true', returnStdout: true ).trim().isEmpty() ) {
sh 'docker container prune -f || true' sh 'docker container prune -f || true'
sh 'docker image prune -f || true' sh 'docker image prune -f || true'
sh 'docker network prune -f || true' sh 'docker network prune -f || true'
sh 'docker volume prune -f || true' sh 'docker volume prune -f || true'
} }
}
// Clean by default otherwise the PackagedEntityManager tests fail on a node that previously ran a different DB
void runTest(String goal, String lockableResource = null, boolean clean = true) {
String cmd = "./gradlew" + (clean ? " clean" : "") + " check ${goal} -Plog-test-progress=true --stacktrace";
try {
if (lockableResource == null) {
sh cmd
}
else {
lock(lockableResource) {
sh cmd
}
}
}
finally {
junit '**/target/test-results/test/*.xml'
}
} }

View File

@ -61,5 +61,13 @@ several requirements have to be fulfilled:
In case the responsible employee is unreachable for a longer period or issues with the dialect are not attended to in a timely manner, In case the responsible employee is unreachable for a longer period or issues with the dialect are not attended to in a timely manner,
the Hibernate team will move the dialect back to the `hibernate-community-dialects` artifact. the Hibernate team will move the dialect back to the `hibernate-community-dialects` artifact.
The requirements for the database server are:
* JDK 8 installed through e.g. `sudo yum install -y java-1.8.0-openjdk-devel`
* JDK 11 installed through e.g. `sudo yum install -y java-11-openjdk-devel`
* Git installed through e.g. `sudo yum install -y git`
* Access to the database through non-confidential credentials
* Access via SSH through confidential credentials
Get in touch with the Hibernate team on https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user[Zulip] Get in touch with the Hibernate team on https://hibernate.zulipchat.com/#narrow/stream/132096-hibernate-user[Zulip]
if you want to request the move of your dialect to hibernate-core. if you want to request the move of your dialect to hibernate-core.