HHH-17982 Setup JPA 3.2 TCK testing automation for ORM 7

This commit is contained in:
Christian Beikov 2024-04-30 14:35:18 +02:00 committed by Steve Ebersole
parent 5361930735
commit 7c7db82b75
1 changed files with 19 additions and 9 deletions

View File

@ -110,12 +110,15 @@ pipeline {
steps { steps {
script { script {
def containerName def containerName
def dbHost
if ( params.RDBMS == 'postgresql' ) { if ( params.RDBMS == 'postgresql' ) {
containerName = 'postgres' containerName = 'postgres'
} }
else { else {
containerName = params.RDBMS containerName = params.RDBMS
} }
if ( params.RDBMS != 'derby' ) {
dbHost = containerName
sh """ \ sh """ \
rm -Rf ./results rm -Rf ./results
docker rm -f tck || true docker rm -f tck || true
@ -125,11 +128,18 @@ pipeline {
docker network rm -f tck-net docker network rm -f tck-net
docker network create tck-net docker network create tck-net
docker network connect tck-net ${containerName} docker network connect tck-net ${containerName}
docker run -v ~/.m2/repository/org/hibernate:/root/.m2/repository/org/hibernate:z --network=tck-net -e DB_HOST=${containerName} -e RDBMS=${params.RDBMS} -e HIBERNATE_VERSION=$HIBERNATE_VERSION --name tck jakarta-tck-runner """
}
else {
dbHost = 'localhost'
}
sh """ \
docker run -v ~/.m2/repository/org/hibernate:/root/.m2/repository/org/hibernate:z --network=tck-net -e DB_HOST=${dbHost} -e RDBMS=${params.RDBMS} -e HIBERNATE_VERSION=$HIBERNATE_VERSION --name tck jakarta-tck-runner
docker cp tck:/tck/persistence-tck/bin/target/failsafe-reports ./results docker cp tck:/tck/persistence-tck/bin/target/failsafe-reports ./results
docker cp tck:/tck/persistence-tck/bin/target/test-reports ./results docker cp tck:/tck/persistence-tck/bin/target/test-reports ./results
""" """
} }
}
archiveArtifacts artifacts: 'results/**' archiveArtifacts artifacts: 'results/**'
script { script {
failures = sh ( failures = sh (