Skip to content

Commit bfd1f22

Browse files
committed
HHH-15533 Introduce versionless CI matrix entries for the PostgreSQL and MySQL minimum supported version
1 parent 5ad3abc commit bfd1f22

File tree

7 files changed

+51
-31
lines changed

7 files changed

+51
-31
lines changed

.github/workflows/contributor-build.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ jobs:
3838
- rdbms: h2
3939
- rdbms: hsqldb
4040
- rdbms: derby
41+
- rdbms: mysql
4142
- rdbms: mysql8
4243
- rdbms: mariadb
43-
- rdbms: postgresql_9_5
44+
- rdbms: postgresql
4445
- rdbms: postgresql_13
4546
- rdbms: oracle
4647
- rdbms: db2

Jenkinsfile

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ stage('Configure') {
3030
// new BuildEnvironment( dbName: 'h2' ),
3131
// new BuildEnvironment( dbName: 'hsqldb' ),
3232
// new BuildEnvironment( dbName: 'derby' ),
33+
// new BuildEnvironment( dbName: 'mysql' ),
3334
// new BuildEnvironment( dbName: 'mysql8' ),
3435
// new BuildEnvironment( dbName: 'mariadb' ),
35-
// new BuildEnvironment( dbName: 'postgresql_9_5' ),
36+
// new BuildEnvironment( dbName: 'postgresql' ),
3637
// new BuildEnvironment( dbName: 'postgresql_13' ),
3738
// new BuildEnvironment( dbName: 'oracle' ),
3839
new BuildEnvironment( dbName: 'oracle_ee' ),
@@ -116,6 +117,13 @@ stage('Build') {
116117
try {
117118
stage('Start database') {
118119
switch (buildEnv.dbName) {
120+
case "mysql":
121+
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
122+
docker.image('mysql:5.7').pull()
123+
}
124+
sh "./docker_db.sh mysql"
125+
state[buildEnv.tag]['containerName'] = "mysql"
126+
break;
119127
case "mysql8":
120128
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
121129
docker.image('mysql:8.0.21').pull()
@@ -130,12 +138,12 @@ stage('Build') {
130138
sh "./docker_db.sh mariadb"
131139
state[buildEnv.tag]['containerName'] = "mariadb"
132140
break;
133-
case "postgresql_9_5":
141+
case "postgresql":
134142
// use the postgis image to enable the PGSQL GIS (spatial) extension
135143
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
136144
docker.image('postgis/postgis:9.5-2.5').pull()
137145
}
138-
sh "./docker_db.sh postgresql_9_5"
146+
sh "./docker_db.sh postgresql"
139147
state[buildEnv.tag]['containerName'] = "postgres"
140148
break;
141149
case "postgresql_13":
@@ -191,13 +199,14 @@ stage('Build') {
191199
case "hsqldb":
192200
runTest("-Pdb=${buildEnv.dbName}${state[buildEnv.tag]['additionalOptions']}")
193201
break;
202+
case "mysql":
194203
case "mysql8":
195204
runTest("-Pdb=mysql_ci${state[buildEnv.tag]['additionalOptions']}")
196205
break;
197206
case "tidb":
198207
runTest("-Pdb=tidb -DdbHost=localhost:4000${state[buildEnv.tag]['additionalOptions']}", 'TIDB')
199208
break;
200-
case "postgresql_9_5":
209+
case "postgresql":
201210
case "postgresql_13":
202211
runTest("-Pdb=pgsql_ci${state[buildEnv.tag]['additionalOptions']}")
203212
break;

README.adoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ The script `docker_db.sh` allows you to start a pre-configured database which ca
130130
All you have to do is run the following command:
131131

132132
----
133-
./docker_db.sh postgresql_9_5
133+
./docker_db.sh postgresql
134134
----
135135

136136
omitting the argument will print a list of possible options.
@@ -162,7 +162,7 @@ The following table illustrates a list of commands for various databases that ca
162162
|`./gradlew test -Pdb=derby`
163163

164164
|MySQL 5.7
165-
|`./docker_db.sh mysql_5_7`
165+
|`./docker_db.sh mysql`
166166
|`./gradlew test -Pdb=mysql_ci`
167167

168168
|MySQL 8.0
@@ -174,7 +174,7 @@ The following table illustrates a list of commands for various databases that ca
174174
|`./gradlew test -Pdb=mariadb_ci`
175175

176176
|PostgreSQL 9.5
177-
|`./docker_db.sh postgresql_9_5`
177+
|`./docker_db.sh postgresql`
178178
|`./gradlew test -Pdb=pgsql_ci`
179179

180180
|PostgreSQL 13

ci/build.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ elif [ "$RDBMS" == "mysql" ]; then
1111
goal="-Pdb=mysql_ci"
1212
elif [ "$RDBMS" == "mariadb" ]; then
1313
goal="-Pdb=mariadb_ci"
14-
elif [ "$RDBMS" == "postgresql_9_5" ]; then
14+
elif [ "$RDBMS" == "postgresql" ]; then
1515
goal="-Pdb=pgsql_ci"
1616
elif [ "$RDBMS" == "postgresql_13" ]; then
1717
goal="-Pdb=pgsql_ci"

ci/database-start.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
44

55
if [ "$RDBMS" == 'mysql' ]; then
6-
bash $DIR/../docker_db.sh mysql_5_7
6+
bash $DIR/../docker_db.sh mysql
77
elif [ "$RDBMS" == 'mysql8' ]; then
88
bash $DIR/../docker_db.sh mysql_8_0
99
elif [ "$RDBMS" == 'mariadb' ]; then
1010
bash $DIR/../docker_db.sh mariadb
11-
elif [ "$RDBMS" == 'postgresql_9_5' ]; then
12-
bash $DIR/../docker_db.sh postgresql_9_5
11+
elif [ "$RDBMS" == 'postgresql' ]; then
12+
bash $DIR/../docker_db.sh postgresql
1313
elif [ "$RDBMS" == 'postgresql_13' ]; then
1414
bash $DIR/../docker_db.sh postgresql_13
1515
elif [ "$RDBMS" == 'db2' ]; then

docker_db.sh

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ else
1515
PRIVILEGED_CLI=""
1616
fi
1717

18+
mysql() {
19+
mysql_5_7
20+
}
21+
1822
mysql_5_7() {
1923
$CONTAINER_CLI rm -f mysql || true
2024
$CONTAINER_CLI run --name mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d docker.io/mysql:5.7 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake --log-bin-trust-function-creators=1
@@ -86,6 +90,10 @@ mariadb() {
8690
fi
8791
}
8892

93+
postgresql() {
94+
postgresql_9_5
95+
}
96+
8997
postgresql_9_5() {
9098
$CONTAINER_CLI rm -f postgres || true
9199
$CONTAINER_CLI run --name postgres -e POSTGRES_USER=hibernate_orm_test -e POSTGRES_PASSWORD=hibernate_orm_test -e POSTGRES_DB=hibernate_orm_test -p5432:5432 -d docker.io/postgis/postgis:9.5-2.5
@@ -517,6 +525,7 @@ if [ -z ${1} ]; then
517525
echo -e "\thana"
518526
echo -e "\tmariadb"
519527
echo -e "\tmssql"
528+
echo -e "\tmysql"
520529
echo -e "\tmysql_5_7"
521530
echo -e "\tmysql_8_0"
522531
echo -e "\toracle"
@@ -527,6 +536,7 @@ if [ -z ${1} ]; then
527536
echo -e "\tpostgis"
528537
echo -e "\tpostgresql_13"
529538
echo -e "\tpostgresql_9_5"
539+
echo -e "\tpostgresql"
530540
echo -e "\tsybase"
531541
else
532542
${1}

hibernate-spatial/src/test/resources/mysql/test-mysql-functions-data-set.xml

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -16,48 +16,48 @@ In MySQL these are stored as null objects.
1616
<Element>
1717
<id>1</id>
1818
<type>POINT</type>
19-
<wkt>SRID=4326;POINT(10 5)</wkt>
19+
<wkt>SRID=0;POINT(10 5)</wkt>
2020
</Element>
2121
<Element>
2222
<id>2</id>
2323
<type>POINT</type>
24-
<wkt>SRID=4326;POINT(52.25 2.53)</wkt>
24+
<wkt>SRID=0;POINT(52.25 2.53)</wkt>
2525
</Element>
2626

2727
<Element>
2828
<id>3</id>
2929
<type>POINT</type>
30-
<wkt>SRID=4326;POINT(51 12)</wkt>
30+
<wkt>SRID=0;POINT(51 12)</wkt>
3131
</Element>
3232
<Element>
3333
<id>4</id>
3434
<type>POINT</type>
35-
<wkt>SRID=4326;POINT(10.0 2.0)</wkt>
35+
<wkt>SRID=0;POINT(10.0 2.0)</wkt>
3636
</Element>
3737

3838
<Element>
3939
<id>5</id>
4040
<type>LINESTRING</type>
41-
<wkt>SRID=4326;LINESTRING(10.0 5.0, 20.0 15.0)</wkt>
41+
<wkt>SRID=0;LINESTRING(10.0 5.0, 20.0 15.0)</wkt>
4242
</Element>
4343

4444
<Element>
4545
<id>6</id>
4646
<type>LINESTRING</type>
47-
<wkt>SRID=4326;LINESTRING(10.0 5.0, 20.0 15.0, 30.3 22.4, 10 30.0)</wkt>
47+
<wkt>SRID=0;LINESTRING(10.0 5.0, 20.0 15.0, 30.3 22.4, 10 30.0)</wkt>
4848
</Element>
4949

5050

5151
<Element>
5252
<id>11</id>
5353
<type>MULTILINESTRING</type>
54-
<wkt>SRID=4326;MULTILINESTRING((10.0 5.0, 20.0 15.0),( 25.0 30.0, 30.0 20.0))</wkt>
54+
<wkt>SRID=0;MULTILINESTRING((10.0 5.0, 20.0 15.0),( 25.0 30.0, 30.0 20.0))</wkt>
5555
</Element>
5656

5757
<Element>
5858
<id>12</id>
5959
<type>MULTILINESTRING</type>
60-
<wkt>SRID=4326;MULTILINESTRING((10.0 5.0, 20.0 15.0, 30.3 22.4, 10 30.0), (40.0 20.0, 42.0 18.0, 43.0 16.0, 40
60+
<wkt>SRID=0;MULTILINESTRING((10.0 5.0, 20.0 15.0, 30.3 22.4, 10 30.0), (40.0 20.0, 42.0 18.0, 43.0 16.0, 40
6161
14.0))
6262
</wkt>
6363
</Element>
@@ -66,28 +66,28 @@ In MySQL these are stored as null objects.
6666
<Element>
6767
<id>16</id>
6868
<type>POLYGON</type>
69-
<wkt>SRID=4326;POLYGON( (0 0, 0 10, 10 10, 10 0, 0 0) )</wkt>
69+
<wkt>SRID=0;POLYGON( (0 0, 0 10, 10 10, 10 0, 0 0) )</wkt>
7070
</Element>
7171
<Element>
7272
<id>18</id>
7373
<type>POLYGON</type>
74-
<wkt>SRID=4326;POLYGON( (0 0, 0 10, 10 10, 10 0, 0 0), (2 2, 2 5, 5 5,5 2, 2 2))</wkt>
74+
<wkt>SRID=0;POLYGON( (0 0, 0 10, 10 10, 10 0, 0 0), (2 2, 2 5, 5 5,5 2, 2 2))</wkt>
7575
</Element>
7676
<Element>
7777
<id>19</id>
7878
<type>POLYGON</type>
79-
<wkt>SRID=4326;POLYGON( (110 110, 110 120, 120 120, 120 110, 110 110) )</wkt>
79+
<wkt>SRID=0;POLYGON( (110 110, 110 120, 120 120, 120 110, 110 110) )</wkt>
8080
</Element>
8181

8282
<Element>
8383
<id>20</id>
8484
<type>MULTIPOLYGON</type>
85-
<wkt>SRID=4326;MULTIPOLYGON( ((10 20, 30 40, 44 50, 10 20)), ((105 100, 120 140, 130 134, 105 100)) )</wkt>
85+
<wkt>SRID=0;MULTIPOLYGON( ((10 20, 30 40, 44 50, 10 20)), ((105 100, 120 140, 130 134, 105 100)) )</wkt>
8686
</Element>
8787
<Element>
8888
<id>22</id>
8989
<type>MULTIPOLYGON</type>
90-
<wkt>SRID=4326;MULTIPOLYGON(( (0 0, 0 50, 50 50, 50 0, 0 0), (10 10, 10 20, 20 20, 20 10, 10 10) ),((105 100,
90+
<wkt>SRID=0;MULTIPOLYGON(( (0 0, 0 50, 50 50, 50 0, 0 0), (10 10, 10 20, 20 20, 20 10, 10 10) ),((105 100,
9191
120 140, 130
9292
134, 105 100)) )
9393
</wkt>
@@ -97,36 +97,36 @@ In MySQL these are stored as null objects.
9797
<Element>
9898
<id>25</id>
9999
<type>MULTIPOINT</type>
100-
<wkt>SRID=4326;MULTIPOINT(21 2, 25 5, 30 3)</wkt>
100+
<wkt>SRID=0;MULTIPOINT(21 2, 25 5, 30 3)</wkt>
101101
</Element>
102102
<Element>
103103
<id>26</id>
104104
<type>MULTIPOINT</type>
105-
<wkt>SRID=4326;MULTIPOINT(21 2)</wkt>
105+
<wkt>SRID=0;MULTIPOINT(21 2)</wkt>
106106
</Element>
107107

108108
<Element>
109109
<id>30</id>
110110
<type>GEOMETRYCOLLECTION</type>
111-
<wkt>SRID=4326;GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3))</wkt>
111+
<wkt>SRID=0;GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3))</wkt>
112112
</Element>
113113
<Element>
114114
<id>31</id>
115115
<type>GEOMETRYCOLLECTION</type>
116-
<wkt>SRID=4326;GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3), POLYGON((0 0, 3 0, 3 3,0 3, 0 0)))</wkt>
116+
<wkt>SRID=0;GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3), POLYGON((0 0, 3 0, 3 3,0 3, 0 0)))</wkt>
117117
</Element>
118118
<Element>
119119
<id>32</id>
120120
<type>GEOMETRYCOLLECTION</type>
121-
<wkt>SRID=4326;GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3), POLYGON((0 0, 3 0, 3 3,0 3, 0 0),(1 1, 2 1,
121+
<wkt>SRID=0;GEOMETRYCOLLECTION(POINT(4 0), LINESTRING(4 2, 5 3), POLYGON((0 0, 3 0, 3 3,0 3, 0 0),(1 1, 2 1,
122122
2 2, 1 2,
123123
1 1)))
124124
</wkt>
125125
</Element>
126126
<Element>
127127
<id>33</id>
128128
<type>GEOMETRYCOLLECTION</type>
129-
<wkt>SRID=4326;GEOMETRYCOLLECTION( MULTIPOINT(21 2, 25 5, 30 3), MULTIPOLYGON( ((10 20, 30 40, 44 50, 10 20)),
129+
<wkt>SRID=0;GEOMETRYCOLLECTION( MULTIPOINT(21 2, 25 5, 30 3), MULTIPOLYGON( ((10 20, 30 40, 44 50, 10 20)),
130130
((105 100,
131131
120 140, 130 134, 105 100)) ), MULTILINESTRING((10.0 5.0, 20.0 15.0),( 25.0 30.0, 30.0 20.0)))
132132
</wkt>

0 commit comments

Comments
 (0)