HHH-16552 - Add CockroachDB v23.1 to Jenkings nightly

This commit is contained in:
Karel Maesen 2023-05-10 10:00:13 +02:00 committed by GitHub
parent 2d345fc04b
commit 19f6a60dcc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 50 additions and 1 deletions

View File

@ -652,6 +652,46 @@ cockroachdb() {
cockroachdb_22_2
}
cockroachdb_23_1() {
$CONTAINER_CLI rm -f cockroach || true
LOG_CONFIG="
sinks:
stderr:
channels: all
filter: ERROR
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 \
--insecure --store=type=mem,size=0.25 --advertise-addr=localhost --log="$LOG_CONFIG"
OUTPUT=
while [[ $OUTPUT != *"CockroachDB node starting"* ]]; do
echo "Waiting for CockroachDB to start..."
sleep 10
# Note we need to redirect stderr to stdout to capture the logs
OUTPUT=$($CONTAINER_CLI logs cockroach 2>&1)
done
echo "Enabling experimental box2d operators and some optimized settings for running the tests"
#settings documented in https://www.cockroachlabs.com/docs/v22.1/local-testing.html#use-a-local-single-node-cluster-with-in-memory-storage
$CONTAINER_CLI exec cockroach bash -c "cat <<EOF | ./cockroach sql --insecure
SET CLUSTER SETTING sql.spatial.experimental_box2d_comparison_operators.enabled = on;
SET CLUSTER SETTING kv.raft_log.disable_synchronization_unsafe = true;
SET CLUSTER SETTING kv.range_merge.queue_interval = '50ms';
SET CLUSTER SETTING jobs.registry.interval.gc = '30s';
SET CLUSTER SETTING jobs.registry.interval.cancel = '180s';
SET CLUSTER SETTING jobs.retention_time = '15s';
SET CLUSTER SETTING sql.stats.automatic_collection.enabled = false;
SET CLUSTER SETTING kv.range_split.by_load_merge_delay = '5s';
ALTER RANGE default CONFIGURE ZONE USING "gc.ttlseconds" = 600;
ALTER DATABASE system CONFIGURE ZONE USING "gc.ttlseconds" = 600;
quit
EOF
"
echo "Cockroachdb successfully started"
}
cockroachdb_22_2() {
$CONTAINER_CLI rm -f cockroach || true
LOG_CONFIG="
@ -807,6 +847,7 @@ if [ -z ${1} ]; then
echo "No db name provided"
echo "Provide one of:"
echo -e "\tcockroachdb"
echo -e "\tcockroachdb_23_1"
echo -e "\tcockroachdb_22_2"
echo -e "\tcockroachdb_22_1"
echo -e "\tcockroachdb_21_1"

View File

@ -40,7 +40,8 @@ stage('Configure') {
// new BuildEnvironment( dbName: 'sybase_16' ), // There only is a Sybase ASE 16 image, so no pint in testing that nightly
// 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_21_2', node: 'cockroachdb', longRunning: true ),
new BuildEnvironment( dbName: 'cockroachdb_23_1', node: 'cockroachdb', longRunning: true ),
new BuildEnvironment( dbName: 'hana_cloud', dbLockableResource: 'hana-cloud', dbLockResourceAsHost: true )
];
@ -233,6 +234,13 @@ stage('Build') {
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') {