Skip to content

Commit

Permalink
Updated Jenkins pipeline files for nativepg renames.
Browse files Browse the repository at this point in the history
  • Loading branch information
tonydamage committed Aug 30, 2023
1 parent 0a2bb51 commit b8e867c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion tools/jenkins/midpoint-main-generic-oracle-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ echo -e "\\nWait to DB get up..."
checkDB jenkins test-db-${JOB_NAME}-${BUILD_NUMBER} ../logs-${JOB_NAME}-${BUILD_NUMBER} 0

# dd of=... is used because cat > redirect would require some quoting to work on the remote side.
cat config/sql/generic-old/oracle-*-all.sql repo/repo-sql-impl-test/sql-procedures/oracle.sql |
cat config/sql/generic/oracle-*-all.sql repo/repo-sql-impl-test/sql-procedures/oracle.sql |
kubectl exec -i -n jenkins test-db-${JOB_NAME}-${BUILD_NUMBER} -c oracle -- dd of=ora-mp-init.sql

# Inside Oracle container sys/Heslo123@xepdb1 works the same as sys/Heslo123@//localhost:1521/xepdb1
Expand Down
2 changes: 1 addition & 1 deletion tools/jenkins/midpoint-main-generic-sql-server-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ EOF
# -I enables QUOTED_IDENTIFIER, see https://stackoverflow.com/a/51201270/658826
# Without it the script fails on CREATE INDEX (probably iPrimaryIdentifierValueWithOC, if the line is right).
/opt/mssql-tools/bin/sqlcmd -b -I -S localhost -U midtest -P password -d midtest \
-i config/sql/generic-old/sqlserver-*-all.sql -i repo/repo-sql-impl-test/sql-procedures/sqlserver.sql
-i config/sql/generic/sqlserver-*-all.sql -i repo/repo-sql-impl-test/sql-procedures/sqlserver.sql
"""
}
}
Expand Down
18 changes: 9 additions & 9 deletions tools/jenkins/midpoint-main-nativepg-pipeline
Original file line number Diff line number Diff line change
Expand Up @@ -58,22 +58,22 @@ podTemplate(
if (!params.DB_UPGRADE_FROM_TAG) {
sh """#!/bin/bash -ex
psql --version
psql -v ON_ERROR_STOP=1 -q -U midtest -f config/sql/native-new/postgres-new.sql \
-f config/sql/native-new/postgres-new-audit.sql -f config/sql/native-new/postgres-new-quartz.sql
psql -v ON_ERROR_STOP=1 -q -U midtest -f config/sql/native/postgres.sql \
-f config/sql/native/postgres-audit.sql -f config/sql/native/postgres-quartz.sql
#psql -U midtest -c "\\dt" # uncomment to list the tables
"""
} else {
// In the future, when the path changes, this may require either some logic, or make it part of the parameter.
sh """#!/bin/bash -ex
psql --version
wget https://raw.githubusercontent.com/Evolveum/midpoint/${params.DB_UPGRADE_FROM_TAG}/config/sql/native-new/postgres-new.sql
wget https://raw.githubusercontent.com/Evolveum/midpoint/${params.DB_UPGRADE_FROM_TAG}/config/sql/native-new/postgres-new-audit.sql
psql -v ON_ERROR_STOP=1 -q -U midtest -f postgres-new.sql \
-f postgres-new-audit.sql -f config/sql/native-new/postgres-new-quartz.sql
wget https://raw.githubusercontent.com/Evolveum/midpoint/${params.DB_UPGRADE_FROM_TAG}/config/sql/native/postgres.sql
wget https://raw.githubusercontent.com/Evolveum/midpoint/${params.DB_UPGRADE_FROM_TAG}/config/sql/native/postgres-audit.sql
psql -v ON_ERROR_STOP=1 -q -U midtest -f postgres.sql \
-f postgres-audit.sql -f config/sql/native/postgres-quartz.sql

echo -e "\n*** UPGRADING DB ***\n"
psql -v ON_ERROR_STOP=1 -q -U midtest -f config/sql/native-new/postgres-new-upgrade.sql \
-f config/sql/native-new/postgres-new-upgrade-audit.sql
psql -v ON_ERROR_STOP=1 -q -U midtest -f config/sql/native/postgres-upgrade.sql \
-f config/sql/native/postgres-upgrade-audit.sql
#psql -U midtest -c "\\dt" # uncomment to list the tables
"""
}
Expand Down Expand Up @@ -110,7 +110,7 @@ podTemplate(

mvn -B -ntp -Dmaven.test.failure.ignore -P sqale,extratest,-dist verify -rf testing \
-Dmidpoint.repository.jdbcUrl=jdbc:postgresql://localhost:5432/midtest \
-Dtest.config.file=test-config-new-repo.xml \
-Dtest.config.file=test-config-repo.xml \
-Dfailsafe.args="-Xms2g -Xmx6g -Duser.language=en --add-exports java.management/sun.management=ALL-UNNAMED"

if [ "${verbose}" -ge 1 ]
Expand Down

0 comments on commit b8e867c

Please sign in to comment.