HHH-17087 Update container images to the latest version

This commit is contained in:
Christian Beikov 2023-09-04 16:51:59 +02:00
parent 6e4b4ace03
commit e936e1b6e0
6 changed files with 70 additions and 183 deletions

97
Jenkinsfile vendored
View File

@ -126,96 +126,11 @@ stage('Build') {
try {
stage('Start database') {
switch (buildEnv.dbName) {
case "hsqldb_2_6":
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
" -Pgradle.libs.versions.hsqldb=2.6.1"
break;
case "mysql":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mysql:8.0.31').pull()
}
sh "./docker_db.sh mysql"
state[buildEnv.tag]['containerName'] = "mysql"
break;
case "mysql_5_7":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mysql:5.7.40').pull()
}
sh "./docker_db.sh mysql_5_7"
state[buildEnv.tag]['containerName'] = "mysql"
break;
case "mariadb":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mariadb:10.9.3').pull()
}
sh "./docker_db.sh mariadb"
state[buildEnv.tag]['containerName'] = "mariadb"
break;
case "mariadb_10_3":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mariadb:10.3.36').pull()
}
sh "./docker_db.sh mariadb_10_3"
state[buildEnv.tag]['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('postgis/postgis:15-3.3').pull()
}
sh "./docker_db.sh postgresql"
state[buildEnv.tag]['containerName'] = "postgres"
break;
case "edb":
docker.image('quay.io/enterprisedb/edb-postgres-advanced:15.2-3.3-postgis').pull()
docker.image('quay.io/enterprisedb/edb-postgres-advanced:15.4-3.3-postgis').pull()
sh "./docker_db.sh edb"
state[buildEnv.tag]['containerName'] = "edb"
break;
case "oracle":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('gvenzl/oracle-xe:21.3.0-full').pull()
}
sh "./docker_db.sh oracle"
state[buildEnv.tag]['containerName'] = "oracle"
break;
case "oracle_11_2":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('gvenzl/oracle-xe:11.2.0.2-full').pull()
}
sh "./docker_db.sh oracle_11"
state[buildEnv.tag]['containerName'] = "oracle"
break;
case "db2":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('ibmcom/db2:11.5.7.0').pull()
}
sh "./docker_db.sh db2"
state[buildEnv.tag]['containerName'] = "db2"
break;
case "db2_10_5":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('ibmoms/db2express-c@sha256:a499afd9709a1f69fb41703e88def9869955234c3525547e2efc3418d1f4ca2b').pull()
}
sh "./docker_db.sh db2_10_5"
state[buildEnv.tag]['containerName'] = "db2"
break;
case "mssql":
docker.image('mcr.microsoft.com/mssql/server@sha256:f54a84b8a802afdfa91a954e8ddfcec9973447ce8efec519adf593b54d49bedf').pull()
sh "./docker_db.sh mssql"
state[buildEnv.tag]['containerName'] = "mssql"
break;
case "mssql_2017":
docker.image('mcr.microsoft.com/mssql/server@sha256:7d194c54e34cb63bca083542369485c8f4141596805611e84d8c8bab2339eede').pull()
sh "./docker_db.sh mssql_2017"
state[buildEnv.tag]['containerName'] = "mssql"
break;
case "sybase":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('nguoianphu/docker-sybase').pull()
}
sh "./docker_db.sh sybase"
state[buildEnv.tag]['containerName'] = "sybase"
break;
case "sybase_jconn":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('nguoianphu/docker-sybase').pull()
@ -225,18 +140,11 @@ stage('Build') {
break;
case "cockroachdb":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('cockroachdb/cockroach:v22.2.2').pull()
docker.image('cockroachdb/cockroach:v23.1.8').pull()
}
sh "./docker_db.sh cockroachdb"
state[buildEnv.tag]['containerName'] = "cockroach"
break;
case "cockroachdb_21_2":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('cockroachdb/cockroach:v21.2.16').pull()
}
sh "./docker_db.sh cockroachdb_21_2"
state[buildEnv.tag]['containerName'] = "cockroach"
break;
}
}
stage('Test') {
@ -301,6 +209,7 @@ class BuildEnvironment {
String toString() { getTag() }
String getTag() { "${node ? node + "_" : ''}${testJdkVersion ? 'jdk_' + testJdkVersion + '_' : '' }${dbName}" }
String getRdbms() { dbName.contains("_") ? dbName.substring(0, dbName.indexOf('_')) : dbName }
}
void runBuildOnNode(String label, Closure body) {

View File

@ -12,9 +12,9 @@ elif [ "$RDBMS" == "mysql" ] || [ "$RDBMS" == "mysql_5_7" ]; then
goal="-Pdb=mysql_ci"
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_3" ]; then
goal="-Pdb=mariadb_ci"
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_10" ]; then
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_11" ]; then
goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_10" ]; then
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_11" ]; then
goal="-Pdb=edb_ci -DdbHost=localhost:5444"
elif [ "$RDBMS" == "oracle" ]; then
# I have no idea why, but these tests don't seem to work on CI...
@ -36,7 +36,7 @@ elif [ "$RDBMS" == "tidb" ]; then
goal="-Pdb=tidb"
elif [ "$RDBMS" == "hana_cloud" ]; then
goal="-Pdb=hana_cloud"
elif [ "$RDBMS" == "cockroachdb" ] || [ "$RDBMS" == "cockroachdb_21_2" ]; then
elif [ "$RDBMS" == "cockroachdb" ]; then
goal="-Pdb=cockroachdb"
fi

View File

@ -16,12 +16,12 @@ else
fi
mysql() {
mysql_8_0
mysql_8_1
}
mysql_5_7() {
$CONTAINER_CLI rm -f mysql || true
$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
$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
# Give the container some time to start
OUTPUT=
n=0
@ -67,13 +67,37 @@ mysql_8_0() {
fi
}
mysql_8_1() {
$CONTAINER_CLI rm -f mysql || true
$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
# Give the container some time to start
OUTPUT=
n=0
until [ "$n" -ge 5 ]
do
# Need to access STDERR. Thanks for the snippet https://stackoverflow.com/a/56577569/412446
{ OUTPUT="$( { $CONTAINER_CLI logs mysql; } 2>&1 1>&3 3>&- )"; } 3>&1;
if [[ $OUTPUT == *"ready for connections"* ]]; then
break;
fi
n=$((n+1))
echo "Waiting for MySQL to start..."
sleep 3
done
if [ "$n" -ge 5 ]; then
echo "MySQL failed to start and configure after 15 seconds"
else
echo "MySQL successfully started"
fi
}
mariadb() {
mariadb_10_9
mariadb_11_1
}
mariadb_10_3() {
$CONTAINER_CLI rm -f mariadb || true
$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
$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
OUTPUT=
n=0
until [ "$n" -ge 5 ]
@ -117,6 +141,29 @@ mariadb_10_9() {
fi
}
mariadb_11_1() {
$CONTAINER_CLI rm -f mariadb || true
$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
OUTPUT=
n=0
until [ "$n" -ge 5 ]
do
# Need to access STDERR. Thanks for the snippet https://stackoverflow.com/a/56577569/412446
{ OUTPUT="$( { $CONTAINER_CLI logs mariadb; } 2>&1 1>&3 3>&- )"; } 3>&1;
if [[ $OUTPUT == *"ready for connections"* ]]; then
break;
fi
n=$((n+1))
echo "Waiting for MariaDB to start..."
sleep 3
done
if [ "$n" -ge 5 ]; then
echo "MariaDB failed to start and configure after 15 seconds"
else
echo "MariaDB successfully started"
fi
}
postgresql() {
postgresql_15
}
@ -172,7 +219,7 @@ db2() {
db2_11_5() {
$PRIVILEGED_CLI $CONTAINER_CLI rm -f db2 || true
$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
$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
# Give the container some time to start
OUTPUT=
while [[ $OUTPUT != *"INSTANCE"* ]]; do
@ -644,7 +691,7 @@ hana() {
}
cockroachdb() {
cockroachdb_22_2
cockroachdb_23_1
}
cockroachdb_23_1() {
@ -657,7 +704,7 @@ sinks:
redact: false
exit-on-error: true
"
$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 \
$CONTAINER_CLI run -d --name=cockroach -m 6g -p 26257:26257 -p 8080:8080 cockroachdb/cockroach-unstable:v23.1.8 start-single-node \
--insecure --store=type=mem,size=0.25 --advertise-addr=localhost --log="$LOG_CONFIG"
OUTPUT=
while [[ $OUTPUT != *"CockroachDB node starting"* ]]; do
@ -849,22 +896,24 @@ if [ -z ${1} ]; then
echo -e "\tcockroachdb_23_1"
echo -e "\tcockroachdb_22_2"
echo -e "\tcockroachdb_22_1"
echo -e "\tcockroachdb_21_1"
echo -e "\tdb2"
echo -e "\tdb2_11_5"
echo -e "\tdb2_10_5"
echo -e "\tdb2_spatial"
echo -e "\tedb"
echo -e "\tedb_15"
echo -e "\tedb_14"
echo -e "\tedb_10"
echo -e "\tedb_11"
echo -e "\thana"
echo -e "\tmariadb"
echo -e "\tmariadb_11_1"
echo -e "\tmariadb_10_9"
echo -e "\tmariadb_10_3"
echo -e "\tmssql"
echo -e "\tmssql_2022"
echo -e "\tmssql_2017"
echo -e "\tmysql"
echo -e "\tmysql_8_1"
echo -e "\tmysql_8_0"
echo -e "\tmysql_5_7"
echo -e "\toracle"
@ -875,8 +924,6 @@ if [ -z ${1} ]; then
echo -e "\tpostgresql_15"
echo -e "\tpostgresql_14"
echo -e "\tpostgresql_13"
echo -e "\tpostgresql_10"
echo -e "\tpostgresql_9_5"
echo -e "\tsybase"
echo -e "\ttidb"
echo -e "\ttidb_5_1"

View File

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

View File

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

View File

@ -39,8 +39,6 @@ stage('Configure') {
new BuildEnvironment( dbName: 'sybase_jconn' ),
// Long running databases
new BuildEnvironment( dbName: 'cockroachdb', node: 'cockroachdb', longRunning: true ),
new BuildEnvironment( dbName: 'cockroachdb_22_1', node: 'cockroachdb', longRunning: true ),
new BuildEnvironment( dbName: 'cockroachdb_23_1', node: 'cockroachdb', longRunning: true ),
new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true )
];
@ -112,42 +110,20 @@ stage('Build') {
state[buildEnv.tag]['additionalOptions'] = state[buildEnv.tag]['additionalOptions'] +
" -Pgradle.libs.versions.hsqldb=2.6.1"
break;
case "mysql":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mysql:8.0.31').pull()
}
sh "./docker_db.sh mysql"
state[buildEnv.tag]['containerName'] = "mysql"
break;
case "mysql_5_7":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mysql:5.7.40').pull()
docker.image('mysql:5.7.43').pull()
}
sh "./docker_db.sh mysql_5_7"
state[buildEnv.tag]['containerName'] = "mysql"
break;
case "mariadb":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mariadb:10.9.3').pull()
}
sh "./docker_db.sh mariadb"
state[buildEnv.tag]['containerName'] = "mariadb"
break;
case "mariadb_10_3":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('mariadb:10.3.36').pull()
docker.image('mariadb:10.3.39').pull()
}
sh "./docker_db.sh mariadb_10_3"
state[buildEnv.tag]['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('postgis/postgis:15-3.3').pull()
}
sh "./docker_db.sh postgresql"
state[buildEnv.tag]['containerName'] = "postgres"
break;
case "postgresql_11":
// use the postgis image to enable the PGSQL GIS (spatial) extension
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
@ -156,23 +132,11 @@ stage('Build') {
sh "./docker_db.sh postgresql_11"
state[buildEnv.tag]['containerName'] = "postgres"
break;
case "edb":
docker.image('quay.io/enterprisedb/edb-postgres-advanced:15.2-3.3-postgis').pull()
sh "./docker_db.sh edb"
state[buildEnv.tag]['containerName'] = "edb"
break;
case "edb_11":
docker.image('quay.io/enterprisedb/edb-postgres-advanced:11.20-3.3-postgis').pull()
docker.image('quay.io/enterprisedb/edb-postgres-advanced:11.21-3.3-postgis').pull()
sh "./docker_db.sh edb_11"
state[buildEnv.tag]['containerName'] = "edb"
break;
case "oracle":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('gvenzl/oracle-xe:21.3.0-full').pull()
}
sh "./docker_db.sh oracle"
state[buildEnv.tag]['containerName'] = "oracle"
break;
case "oracle_11_2":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('gvenzl/oracle-xe:11.2.0.2-full').pull()
@ -180,13 +144,6 @@ stage('Build') {
sh "./docker_db.sh oracle_11"
state[buildEnv.tag]['containerName'] = "oracle"
break;
case "db2":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('ibmcom/db2:11.5.7.0').pull()
}
sh "./docker_db.sh db2"
state[buildEnv.tag]['containerName'] = "db2"
break;
case "db2_10_5":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('ibmoms/db2express-c@sha256:a499afd9709a1f69fb41703e88def9869955234c3525547e2efc3418d1f4ca2b').pull()
@ -194,23 +151,11 @@ stage('Build') {
sh "./docker_db.sh db2_10_5"
state[buildEnv.tag]['containerName'] = "db2"
break;
case "mssql":
docker.image('mcr.microsoft.com/mssql/server@sha256:f54a84b8a802afdfa91a954e8ddfcec9973447ce8efec519adf593b54d49bedf').pull()
sh "./docker_db.sh mssql"
state[buildEnv.tag]['containerName'] = "mssql"
break;
case "mssql_2017":
docker.image('mcr.microsoft.com/mssql/server@sha256:7d194c54e34cb63bca083542369485c8f4141596805611e84d8c8bab2339eede').pull()
sh "./docker_db.sh mssql_2017"
state[buildEnv.tag]['containerName'] = "mssql"
break;
case "sybase":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('nguoianphu/docker-sybase').pull()
}
sh "./docker_db.sh sybase"
state[buildEnv.tag]['containerName'] = "sybase"
break;
case "sybase_jconn":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('nguoianphu/docker-sybase').pull()
@ -220,25 +165,11 @@ stage('Build') {
break;
case "cockroachdb":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('cockroachdb/cockroach:v22.2.2').pull()
docker.image('cockroachdb/cockroach:v23.1.8').pull()
}
sh "./docker_db.sh cockroachdb"
state[buildEnv.tag]['containerName'] = "cockroach"
break;
case "cockroachdb_22_1":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('cockroachdb/cockroach:v22.1.13').pull()
}
sh "./docker_db.sh cockroachdb_22_1"
state[buildEnv.tag]['containerName'] = "cockroach"
break;
case "cockroachdb_23_1":
docker.withRegistry('https://index.docker.io/v1/', 'hibernateci.hub.docker.com') {
docker.image('cockroachdb/cockroach-unstable:v23.1.0-rc.1').pull()
}
sh "./docker_db.sh cockroachdb_23_1"
state[buildEnv.tag]['containerName'] = "cockroach"
break;
}
}
stage('Test') {