HHH-17982 Setup JPA 3.2 TCK testing automation for ORM 7
This commit is contained in:
parent
5361930735
commit
7c7db82b75
|
@ -110,25 +110,35 @@ pipeline {
|
|||
steps {
|
||||
script {
|
||||
def containerName
|
||||
def dbHost
|
||||
if ( params.RDBMS == 'postgresql' ) {
|
||||
containerName = 'postgres'
|
||||
}
|
||||
else {
|
||||
containerName = params.RDBMS
|
||||
}
|
||||
if ( params.RDBMS != 'derby' ) {
|
||||
dbHost = containerName
|
||||
sh """ \
|
||||
rm -Rf ./results
|
||||
docker rm -f tck || true
|
||||
while IFS= read -r container; do
|
||||
docker network disconnect tck-net \$container || true
|
||||
done <<< \$(docker network inspect tck-net --format '{{range \$k, \$v := .Containers}}{{print \$k}}{{end}}' 2>/dev/null || true)
|
||||
docker network rm -f tck-net
|
||||
docker network create tck-net
|
||||
docker network connect tck-net ${containerName}
|
||||
"""
|
||||
}
|
||||
else {
|
||||
dbHost = 'localhost'
|
||||
}
|
||||
sh """ \
|
||||
rm -Rf ./results
|
||||
docker rm -f tck || true
|
||||
while IFS= read -r container; do
|
||||
docker network disconnect tck-net \$container || true
|
||||
done <<< \$(docker network inspect tck-net --format '{{range \$k, \$v := .Containers}}{{print \$k}}{{end}}' 2>/dev/null || true)
|
||||
docker network rm -f tck-net
|
||||
docker network create tck-net
|
||||
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
|
||||
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/test-reports ./results
|
||||
"""
|
||||
}
|
||||
}
|
||||
archiveArtifacts artifacts: 'results/**'
|
||||
script {
|
||||
|
|
Loading…
Reference in New Issue