Skip to content

Commit e936e1b

Browse files
committed
HHH-17087 Update container images to the latest version
1 parent 6e4b4ac commit e936e1b

File tree

6 files changed

+70
-183
lines changed

6 files changed

+70
-183
lines changed

Jenkinsfile

+3-94
Original file line numberDiff line numberDiff line change
@@ -126,96 +126,11 @@ stage('Build') {
126126
try {
127127
stage('Start database') {
128128
switch (buildEnv.dbName) {
129-
case "hsqldb_2_6":
130-
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
131-
" -Pgradle.libs.versions.hsqldb=2.6.1"
132-
break;
133-
case "mysql":
134-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
135-
docker.image('mysql:8.0.31').pull()
136-
}
137-
sh "./docker_db.sh mysql"
138-
state[buildEnv.tag]['containerName'] = "mysql"
139-
break;
140-
case "mysql_5_7":
141-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
142-
docker.image('mysql:5.7.40').pull()
143-
}
144-
sh "./docker_db.sh mysql_5_7"
145-
state[buildEnv.tag]['containerName'] = "mysql"
146-
break;
147-
case "mariadb":
148-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
149-
docker.image('mariadb:10.9.3').pull()
150-
}
151-
sh "./docker_db.sh mariadb"
152-
state[buildEnv.tag]['containerName'] = "mariadb"
153-
break;
154-
case "mariadb_10_3":
155-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
156-
docker.image('mariadb:10.3.36').pull()
157-
}
158-
sh "./docker_db.sh mariadb_10_3"
159-
state[buildEnv.tag]['containerName'] = "mariadb"
160-
break;
161-
case "postgresql":
162-
// use the postgis image to enable the PGSQL GIS (spatial) extension
163-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
164-
docker.image('postgis/postgis:15-3.3').pull()
165-
}
166-
sh "./docker_db.sh postgresql"
167-
state[buildEnv.tag]['containerName'] = "postgres"
168-
break;
169129
case "edb":
170-
docker.image('quay.io/enterprisedb/edb-postgres-advanced:15.2-3.3-postgis').pull()
130+
docker.image('quay.io/enterprisedb/edb-postgres-advanced:15.4-3.3-postgis').pull()
171131
sh "./docker_db.sh edb"
172132
state[buildEnv.tag]['containerName'] = "edb"
173133
break;
174-
case "oracle":
175-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
176-
docker.image('gvenzl/oracle-xe:21.3.0-full').pull()
177-
}
178-
sh "./docker_db.sh oracle"
179-
state[buildEnv.tag]['containerName'] = "oracle"
180-
break;
181-
case "oracle_11_2":
182-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
183-
docker.image('gvenzl/oracle-xe:11.2.0.2-full').pull()
184-
}
185-
sh "./docker_db.sh oracle_11"
186-
state[buildEnv.tag]['containerName'] = "oracle"
187-
break;
188-
case "db2":
189-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
190-
docker.image('ibmcom/db2:11.5.7.0').pull()
191-
}
192-
sh "./docker_db.sh db2"
193-
state[buildEnv.tag]['containerName'] = "db2"
194-
break;
195-
case "db2_10_5":
196-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
197-
docker.image('ibmoms/db2express-c@sha256:a499afd9709a1f69fb41703e88def9869955234c3525547e2efc3418d1f4ca2b').pull()
198-
}
199-
sh "./docker_db.sh db2_10_5"
200-
state[buildEnv.tag]['containerName'] = "db2"
201-
break;
202-
case "mssql":
203-
docker.image('mcr.microsoft.com/mssql/server@sha256:f54a84b8a802afdfa91a954e8ddfcec9973447ce8efec519adf593b54d49bedf').pull()
204-
sh "./docker_db.sh mssql"
205-
state[buildEnv.tag]['containerName'] = "mssql"
206-
break;
207-
case "mssql_2017":
208-
docker.image('mcr.microsoft.com/mssql/server@sha256:7d194c54e34cb63bca083542369485c8f4141596805611e84d8c8bab2339eede').pull()
209-
sh "./docker_db.sh mssql_2017"
210-
state[buildEnv.tag]['containerName'] = "mssql"
211-
break;
212-
case "sybase":
213-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
214-
docker.image('nguoianphu/docker-sybase').pull()
215-
}
216-
sh "./docker_db.sh sybase"
217-
state[buildEnv.tag]['containerName'] = "sybase"
218-
break;
219134
case "sybase_jconn":
220135
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
221136
docker.image('nguoianphu/docker-sybase').pull()
@@ -225,18 +140,11 @@ stage('Build') {
225140
break;
226141
case "cockroachdb":
227142
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
228-
docker.image('cockroachdb/cockroach:v22.2.2').pull()
143+
docker.image('cockroachdb/cockroach:v23.1.8').pull()
229144
}
230145
sh "./docker_db.sh cockroachdb"
231146
state[buildEnv.tag]['containerName'] = "cockroach"
232147
break;
233-
case "cockroachdb_21_2":
234-
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
235-
docker.image('cockroachdb/cockroach:v21.2.16').pull()
236-
}
237-
sh "./docker_db.sh cockroachdb_21_2"
238-
state[buildEnv.tag]['containerName'] = "cockroach"
239-
break;
240148
}
241149
}
242150
stage('Test') {
@@ -301,6 +209,7 @@ class BuildEnvironment {
301209

302210
String toString() { getTag() }
303211
String getTag() { "${node ? node + "_" : ''}${testJdkVersion ? 'jdk_' + testJdkVersion + '_' : '' }${dbName}" }
212+
String getRdbms() { dbName.contains("_") ? dbName.substring(0, dbName.indexOf('_')) : dbName }
304213
}
305214

306215
void runBuildOnNode(String label, Closure body) {

ci/build.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ elif [ "$RDBMS" == "mysql" ] || [ "$RDBMS" == "mysql_5_7" ]; then
1212
goal="-Pdb=mysql_ci"
1313
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_3" ]; then
1414
goal="-Pdb=mariadb_ci"
15-
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_10" ]; then
15+
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_11" ]; then
1616
goal="-Pdb=pgsql_ci"
17-
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_10" ]; then
17+
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_11" ]; then
1818
goal="-Pdb=edb_ci -DdbHost=localhost:5444"
1919
elif [ "$RDBMS" == "oracle" ]; then
2020
# I have no idea why, but these tests don't seem to work on CI...
@@ -36,7 +36,7 @@ elif [ "$RDBMS" == "tidb" ]; then
3636
goal="-Pdb=tidb"
3737
elif [ "$RDBMS" == "hana_cloud" ]; then
3838
goal="-Pdb=hana_cloud"
39-
elif [ "$RDBMS" == "cockroachdb" ] || [ "$RDBMS" == "cockroachdb_21_2" ]; then
39+
elif [ "$RDBMS" == "cockroachdb" ]; then
4040
goal="-Pdb=cockroachdb"
4141
fi
4242

docker_db.sh

+58-11
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@ else
1616
fi
1717

1818
mysql() {
19-
mysql_8_0
19+
mysql_8_1
2020
}
2121

2222
mysql_5_7() {
2323
$CONTAINER_CLI rm -f mysql || true
24-
$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.40 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake --log-bin-trust-function-creators=1
24+
$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.43 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake --log-bin-trust-function-creators=1
2525
# Give the container some time to start
2626
OUTPUT=
2727
n=0
@@ -67,13 +67,37 @@ mysql_8_0() {
6767
fi
6868
}
6969

70+
mysql_8_1() {
71+
$CONTAINER_CLI rm -f mysql || true
72+
$CONTAINER_CLI run --name mysql -e MYSQL_USER=hibernate_orm_test -e MYSQL_PASSWORD=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -e MYSQL_DATABASE=hibernate_orm_test -e MYSQL_ROOT_PASSWORD=hibernate_orm_test -p3306:3306 -d docker.io/mysql:8.1.0 --character-set-server=utf8mb4 --collation-server=utf8mb4_0900_as_cs --skip-character-set-client-handshake --log-bin-trust-function-creators=1
73+
# Give the container some time to start
74+
OUTPUT=
75+
n=0
76+
until [ "$n" -ge 5 ]
77+
do
78+
# Need to access STDERR. Thanks for the snippet https://stackoverflow.com/a/56577569/412446
79+
{ OUTPUT="$( { $CONTAINER_CLI logs mysql; } 2>&1 1>&3 3>&- )"; } 3>&1;
80+
if [[ $OUTPUT == *"ready for connections"* ]]; then
81+
break;
82+
fi
83+
n=$((n+1))
84+
echo "Waiting for MySQL to start..."
85+
sleep 3
86+
done
87+
if [ "$n" -ge 5 ]; then
88+
echo "MySQL failed to start and configure after 15 seconds"
89+
else
90+
echo "MySQL successfully started"
91+
fi
92+
}
93+
7094
mariadb() {
71-
mariadb_10_9
95+
mariadb_11_1
7296
}
7397

7498
mariadb_10_3() {
7599
$CONTAINER_CLI rm -f mariadb || true
76-
$CONTAINER_CLI run --name mariadb -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/mariadb:10.3.36 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake
100+
$CONTAINER_CLI run --name mariadb -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/mariadb:10.3.39 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake
77101
OUTPUT=
78102
n=0
79103
until [ "$n" -ge 5 ]
@@ -117,6 +141,29 @@ mariadb_10_9() {
117141
fi
118142
}
119143

144+
mariadb_11_1() {
145+
$CONTAINER_CLI rm -f mariadb || true
146+
$CONTAINER_CLI run --name mariadb -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/mariadb:11.1.2 --character-set-server=utf8mb4 --collation-server=utf8mb4_bin --skip-character-set-client-handshake
147+
OUTPUT=
148+
n=0
149+
until [ "$n" -ge 5 ]
150+
do
151+
# Need to access STDERR. Thanks for the snippet https://stackoverflow.com/a/56577569/412446
152+
{ OUTPUT="$( { $CONTAINER_CLI logs mariadb; } 2>&1 1>&3 3>&- )"; } 3>&1;
153+
if [[ $OUTPUT == *"ready for connections"* ]]; then
154+
break;
155+
fi
156+
n=$((n+1))
157+
echo "Waiting for MariaDB to start..."
158+
sleep 3
159+
done
160+
if [ "$n" -ge 5 ]; then
161+
echo "MariaDB failed to start and configure after 15 seconds"
162+
else
163+
echo "MariaDB successfully started"
164+
fi
165+
}
166+
120167
postgresql() {
121168
postgresql_15
122169
}
@@ -172,7 +219,7 @@ db2() {
172219

173220
db2_11_5() {
174221
$PRIVILEGED_CLI $CONTAINER_CLI rm -f db2 || true
175-
$PRIVILEGED_CLI $CONTAINER_CLI run --name db2 --privileged -e DB2INSTANCE=orm_test -e DB2INST1_PASSWORD=orm_test -e DBNAME=orm_test -e LICENSE=accept -e AUTOCONFIG=false -e ARCHIVE_LOGS=false -e TO_CREATE_SAMPLEDB=false -e REPODB=false -p 50000:50000 -d docker.io/ibmcom/db2:11.5.7.0
222+
$PRIVILEGED_CLI $CONTAINER_CLI run --name db2 --privileged -e DB2INSTANCE=orm_test -e DB2INST1_PASSWORD=orm_test -e DBNAME=orm_test -e LICENSE=accept -e AUTOCONFIG=false -e ARCHIVE_LOGS=false -e TO_CREATE_SAMPLEDB=false -e REPODB=false -p 50000:50000 -d docker.io/ibmcom/db2:11.5.8.0
176223
# Give the container some time to start
177224
OUTPUT=
178225
while [[ $OUTPUT != *"INSTANCE"* ]]; do
@@ -644,7 +691,7 @@ hana() {
644691
}
645692

646693
cockroachdb() {
647-
cockroachdb_22_2
694+
cockroachdb_23_1
648695
}
649696

650697
cockroachdb_23_1() {
@@ -657,7 +704,7 @@ sinks:
657704
redact: false
658705
exit-on-error: true
659706
"
660-
$CONTAINER_CLI run -d --name=cockroach -m 6g -p 26257:26257 -p 8080:8080 cockroachdb/cockroach-unstable:v23.1.0-rc.1 start-single-node \
707+
$CONTAINER_CLI run -d --name=cockroach -m 6g -p 26257:26257 -p 8080:8080 cockroachdb/cockroach-unstable:v23.1.8 start-single-node \
661708
--insecure --store=type=mem,size=0.25 --advertise-addr=localhost --log="$LOG_CONFIG"
662709
OUTPUT=
663710
while [[ $OUTPUT != *"CockroachDB node starting"* ]]; do
@@ -849,22 +896,24 @@ if [ -z ${1} ]; then
849896
echo -e "\tcockroachdb_23_1"
850897
echo -e "\tcockroachdb_22_2"
851898
echo -e "\tcockroachdb_22_1"
852-
echo -e "\tcockroachdb_21_1"
853899
echo -e "\tdb2"
854900
echo -e "\tdb2_11_5"
855901
echo -e "\tdb2_10_5"
856902
echo -e "\tdb2_spatial"
857903
echo -e "\tedb"
904+
echo -e "\tedb_15"
858905
echo -e "\tedb_14"
859-
echo -e "\tedb_10"
906+
echo -e "\tedb_11"
860907
echo -e "\thana"
861908
echo -e "\tmariadb"
909+
echo -e "\tmariadb_11_1"
862910
echo -e "\tmariadb_10_9"
863911
echo -e "\tmariadb_10_3"
864912
echo -e "\tmssql"
865913
echo -e "\tmssql_2022"
866914
echo -e "\tmssql_2017"
867915
echo -e "\tmysql"
916+
echo -e "\tmysql_8_1"
868917
echo -e "\tmysql_8_0"
869918
echo -e "\tmysql_5_7"
870919
echo -e "\toracle"
@@ -875,8 +924,6 @@ if [ -z ${1} ]; then
875924
echo -e "\tpostgresql_15"
876925
echo -e "\tpostgresql_14"
877926
echo -e "\tpostgresql_13"
878-
echo -e "\tpostgresql_10"
879-
echo -e "\tpostgresql_9_5"
880927
echo -e "\tsybase"
881928
echo -e "\ttidb"
882929
echo -e "\ttidb_5_1"

edb/edb11.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/enterprisedb/edb-postgres-advanced:11.20-3.3-postgis
1+
FROM quay.io/enterprisedb/edb-postgres-advanced:11.21-3.3-postgis
22
USER root
33
# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
44
RUN chown -R postgres:postgres /var/lib/edb && chmod 777 /var/lib/edb && rm /docker-entrypoint-initdb.d/10_postgis.sh

edb/edb15.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM quay.io/enterprisedb/edb-postgres-advanced:15.2-3.3-postgis
1+
FROM quay.io/enterprisedb/edb-postgres-advanced:15.4-3.3-postgis
22
USER root
33
# this 777 will be replaced by 700 at runtime (allows semi-arbitrary "--user" values)
44
RUN chown -R postgres:postgres /var/lib/edb && chmod 777 /var/lib/edb && rm /docker-entrypoint-initdb.d/10_postgis.sh

0 commit comments

Comments
 (0)