hibernate-orm/ci/build.sh

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

85 lines
4.2 KiB
Bash
Raw Normal View History

#! /bin/bash
goal=
if [ "$RDBMS" == "h2" ]; then
2022-10-11 08:35:57 -04:00
# This is the default.
goal=""
elif [ "$RDBMS" == "hsqldb" ] || [ "$RDBMS" == "hsqldb_2_6" ]; then
goal="-Pdb=hsqldb"
elif [ "$RDBMS" == "mysql" ] || [ "$RDBMS" == "mysql_8_0" ]; then
goal="-Pdb=mysql_ci"
elif [ "$RDBMS" == "mariadb" ] || [ "$RDBMS" == "mariadb_10_4" ]; then
goal="-Pdb=mariadb_ci"
elif [ "$RDBMS" == "postgresql" ] || [ "$RDBMS" == "postgresql_12" ]; then
goal="-Pdb=pgsql_ci"
elif [ "$RDBMS" == "edb" ] || [ "$RDBMS" == "edb_12" ]; then
goal="-Pdb=edb_ci -DdbHost=localhost:5444"
elif [ "$RDBMS" == "oracle" ]; then
goal="-Pdb=oracle_ci"
elif [ "$RDBMS" == "oracle_xe" ] || [ "$RDBMS" == "oracle_21" ]; then
2023-06-30 09:18:16 -04:00
# I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_xe_ci"
2024-02-14 05:29:21 -05:00
elif [ "$RDBMS" == "oracle_atps_tls" ]; then
2023-09-21 09:42:43 -04:00
echo "Managing Oracle Autonomous Database..."
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=autonomous&hostname=`hostname`" -H 'accept: application/json')
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
# I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_cloud_autonomous_tls -DrunID=$RUNID -DdbHost=$HOST -DdbService=$SERVICE"
2024-02-14 05:29:21 -05:00
elif [ "$RDBMS" == "oracle_atps" ]; then
echo "Managing Oracle Autonomous Database..."
2024-02-14 05:34:13 -05:00
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=autonomous2&hostname=`hostname`" -H 'accept: application/json')
2024-02-14 05:29:21 -05:00
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
# I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_cloud_autonomous -DrunID=$RUNID -DdbHost=$HOST -DdbService=$SERVICE"
2023-09-21 09:42:43 -04:00
elif [ "$RDBMS" == "oracle_db19c" ]; then
echo "Managing Oracle Database 19c..."
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=db19c&hostname=`hostname`" -H 'accept: application/json')
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
# I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_cloud_db19c -DrunID=$RUNID -DdbHost=$HOST -DdbService=$SERVICE"
elif [ "$RDBMS" == "oracle_db21c" ]; then
echo "Managing Oracle Database 21c..."
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=db21c&hostname=`hostname`" -H 'accept: application/json')
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
# I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_cloud_db21c -DrunID=$RUNID -DdbHost=$HOST -DdbService=$SERVICE"
elif [ "$RDBMS" == "oracle_db23c" ]; then
echo "Managing Oracle Database 23c..."
export INFO=$(curl -s -k -L -X GET "https://api.atlas-controller.oraclecloud.com/ords/atlas/admin/database?type=db23c&hostname=`hostname`" -H 'accept: application/json')
export HOST=$(echo $INFO | jq -r '.database' | jq -r '.host')
export SERVICE=$(echo $INFO | jq -r '.database' | jq -r '.service')
# I have no idea why, but these tests don't seem to work on CI...
goal="-Pdb=oracle_cloud_db23c -DrunID=$RUNID -DdbHost=$HOST -DdbService=$SERVICE"
elif [ "$RDBMS" == "db2" ]; then
goal="-Pdb=db2_ci"
elif [ "$RDBMS" == "db2_10_5" ]; then
goal="-Pdb=db2"
elif [ "$RDBMS" == "mssql" ] || [ "$RDBMS" == "mssql_2017" ]; then
goal="-Pdb=mssql_ci"
elif [ "$RDBMS" == "sybase" ]; then
goal="-Pdb=sybase_ci"
elif [ "$RDBMS" == "sybase_jconn" ]; then
goal="-Pdb=sybase_jconn_ci"
2022-10-11 08:35:57 -04:00
elif [ "$RDBMS" == "tidb" ]; then
goal="-Pdb=tidb"
elif [ "$RDBMS" == "hana_cloud" ]; then
goal="-Pdb=hana_cloud"
elif [ "$RDBMS" == "cockroachdb" ]; then
goal="-Pdb=cockroachdb"
2023-11-13 21:24:17 -05:00
elif [ "$RDBMS" == "altibase" ]; then
goal="-Pdb=altibase"
2024-06-07 08:51:13 -04:00
elif [ "$RDBMS" == "informix" ]; then
goal="-Pdb=informix"
fi
function logAndExec() {
echo 1>&2 "Executing:" "${@}"
exec "${@}"
}
2023-11-07 04:54:42 -05:00
logAndExec ./gradlew check ${goal} "${@}" -Plog-test-progress=true --stacktrace