diff --git a/Jenkinsfile b/Jenkinsfile index 5f9b377cb1..49fae753b3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -85,11 +85,12 @@ stage('Build') { containerName = "mariadb" break; case "postgresql": + // use the postgis image to enable the PGSQL GIS (spatial) extension docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') { - docker.image('postgres:9.5').pull() + docker.image('postgis/postgis:11-2.5').pull() } - sh "./docker_db.sh postgresql_9_5" - containerName = "postgres" + sh "./docker_db.sh postgresql_11" + containerName = "postgis" break; case "oracle": docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') { diff --git a/docker_db.sh b/docker_db.sh index 4110a2416e..0fd1d5fb34 100755 --- a/docker_db.sh +++ b/docker_db.sh @@ -81,7 +81,8 @@ postgresql_13() { docker run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d postgres:13.0 } -postgis(){ +postgresql_11() { + # use the postgis image to enable the PGSQL GIS (spatial) extension docker rm -f postgis || true docker run --name postgis -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d postgis/postgis:11-2.5 } diff --git a/hibernate-spatial/hibernate-spatial.gradle b/hibernate-spatial/hibernate-spatial.gradle index b73706c4db..dc0c373b26 100644 --- a/hibernate-spatial/hibernate-spatial.gradle +++ b/hibernate-spatial/hibernate-spatial.gradle @@ -43,3 +43,7 @@ dependencies { sourceSets.test.resources { setSrcDirs(['src/test/java', 'src/test/resources']) } + +tasks.test { + enabled = project.db == 'pgsql' +} \ No newline at end of file diff --git a/settings.gradle b/settings.gradle index 704e1b116f..f002af291d 100644 --- a/settings.gradle +++ b/settings.gradle @@ -119,8 +119,7 @@ include 'hibernate-envers' include 'hibernate-envers-jakarta' include 'hibernate-community-dialects' -// todo (6.0): re-enable hibernate-spatial -//include 'hibernate-spatial' +include 'hibernate-spatial' include 'hibernate-c3p0' include 'hibernate-proxool'