Skip to content

Commit

Permalink
CBS - Turn JDBC id and password into optional parameters (#249)
Browse files Browse the repository at this point in the history
* Turn JDBC id and password to optional parameters

Signed-off-by: Dennis Behm <dennis.behm@de.ibm.com>
  • Loading branch information
dennis-behm authored Jun 5, 2024
1 parent 46a7998 commit b494e51
Showing 1 changed file with 10 additions and 8 deletions.
18 changes: 10 additions & 8 deletions Templates/Common-Backend-Scripts/dbbBuild.sh
Original file line number Diff line number Diff line change
Expand Up @@ -370,15 +370,11 @@ validateOptions() {
esac

if [ -z "${dbbMetadataStoreJdbcId}" ]; then
rc=8
ERRMSG=$PGM": [ERROR] DBB database user is required. rc="$rc
echo $ERRMSG
echo $PGM": [WARNING] Db2 JDBC User not set. It is recommended to use Db2 for the DBB Metadatastore."
fi

if [ -z "${dbbMetadataStoreJdbcPwdFile}" ]; then
rc=8
ERRMSG=$PGM": [ERROR] DBB database password file is required. rc="$rc
echo $ERRMSG
echo $PGM": [WARNING] Db2 JDBC Password file not set. It is recommended to use Db2 for the DBB Metadatastore."
else
if [ ! -f "${dbbMetadataStoreJdbcPwdFile}" ]; then
rc=8
Expand Down Expand Up @@ -478,7 +474,13 @@ if [ $rc -eq 0 ]; then
echo $PGM": [INFO] Invoking the zAppBuild Build Framework."

# Assemble build command
CMD="$DBB_HOME/bin/groovyz ${DBBLogger} ${BuildGroovy} --workspace $(getWorkDirectory) --application ${App} --outDir ${outDir} --hlq ${HLQ} --id ${dbbMetadataStoreJdbcId} --pwFile ${dbbMetadataStoreJdbcPwdFile} ${zAppBuildVerbose} --logEncoding UTF-8"
CMD="$DBB_HOME/bin/groovyz ${DBBLogger} ${BuildGroovy} --workspace $(getWorkDirectory) --application ${App} --outDir ${outDir} --hlq ${HLQ} ${zAppBuildVerbose} --logEncoding UTF-8"
if [ ! -z "${dbbMetadataStoreJdbcId}" ]; then
CMD="${CMD} --id ${dbbMetadataStoreJdbcId}" # Appending JDBC User Id if defined
fi
if [ ! -z "${dbbMetadataStoreJdbcPwdFile}" ]; then
CMD="${CMD} --pwFile ${dbbMetadataStoreJdbcPwdFile}" # Appending JDBC Password file if defined
fi
if [ ! -z "${dbbMetadataStoreJdbcUrl}" ]; then
CMD="${CMD} --url ${dbbMetadataStoreJdbcUrl}" # Appending JDBC URL if defined
fi
Expand All @@ -489,7 +491,7 @@ if [ $rc -eq 0 ]; then
CMD="${CMD} --propOverwrites ${propOverrides}" # Appending propOverrides if defined
fi

CMD="${CMD} ${Type}" # Append Build Type
CMD="${CMD} ${Type}" # Append zAppBuild Build Type
echo $PGM": [INFO] ${CMD}"
${CMD} #TLD: I commented this out for testing purposed
rc=$?
Expand Down

0 comments on commit b494e51

Please sign in to comment.