diff --git a/Templates/Common-Backend-Scripts/generateCleanupCommands.sh b/Templates/Common-Backend-Scripts/generateCleanupCommands.sh index 0daedaa6..d79edea2 100755 --- a/Templates/Common-Backend-Scripts/generateCleanupCommands.sh +++ b/Templates/Common-Backend-Scripts/generateCleanupCommands.sh @@ -72,13 +72,12 @@ Help() { } # -# Customization # Configuration file leveraged by the backend scripts # Either an absolute path or a relative path to the current working directory SCRIPT_HOME="$(dirname "$0")" pipelineConfiguration="${SCRIPT_HOME}/pipelineBackend.config" buildUtilities="${SCRIPT_HOME}/utilities/dbbBuildUtils.sh" -# Customization - End +deleteScript="${SCRIPT_HOME}/../../Utilities/DeletePDS/DeletePDS.groovy" # # Internal Variables @@ -319,7 +318,7 @@ genDeleteStatementsCollections() { for applicationCollection in ${collectionsToBeDeleted[@]}; do - echo "dbb collection delete $applicationCollection ${dbbMetadataStoreOptions}" >>${cmdFileDeleteCollections} + echo "dbb collection delete $applicationCollection ${cleanupDbbMetadataStoreOptions}" >>${cmdFileDeleteCollections} done @@ -341,7 +340,7 @@ genDeleteStatementsBuildGroups() { for buildGroup in ${buildgroupsToBeDeleted[@]}; do - echo "dbb build-group delete $buildGroup ${dbbMetadataStoreOptions}" >>${cmdFileDeleteBuildGroups} + echo "dbb build-group delete $buildGroup ${cleanupDbbMetadataStoreOptions}" >>${cmdFileDeleteBuildGroups} done @@ -381,7 +380,7 @@ if [ $rc -eq 0 ]; then echo $PGM": [INFO] ** Cmd obsolete collections:" ${cmdFileDeleteCollections} echo $PGM": [INFO] ** Cmd obsolete build groups:" ${cmdFileDeleteBuildGroups} echo $PGM": [INFO] ** Cmd obsolete build datasets:" ${cmdFileDeleteBuildDatasets} - echo $PGM": [INFO] ** DBB Metadastore Config:" ${dbbMetadataStoreOptions} + echo $PGM": [INFO] ** DBB Metadastore Config:" ${cleanupDbbMetadataStoreOptions} echo $PGM": [INFO] ** Process Cleanup Scripts:" ${executeCleanupCommandScripts} echo $PGM": [INFO] **************************************************************" echo "" @@ -390,7 +389,7 @@ fi if [ $rc -eq 0 ]; then # Retrieve existing DBB Collections echo $PGM": [STAGE] Retrieve all collections with application qualifier $App" - applicationCollections=$(dbb collection list $dbbMetadataStoreOptions | grep $App) + applicationCollections=$(dbb collection list $cleanupDbbMetadataStoreOptions | grep $App) rc=$? if [ ! $rc -eq 0 ]; then ERRMSG=$PGM": [ERROR] Retrieving Collections failed. Check Log. rc="$rc diff --git a/Templates/Common-Backend-Scripts/pipelineBackend.config b/Templates/Common-Backend-Scripts/pipelineBackend.config index e9778a48..76089d78 100644 --- a/Templates/Common-Backend-Scripts/pipelineBackend.config +++ b/Templates/Common-Backend-Scripts/pipelineBackend.config @@ -82,6 +82,10 @@ dbbMetadataStoreJdbcId="" # Default = None, Required. dbbMetadataStoreJdbcPwdFile="" +# Absolute path to Db2 conf file containing db2 schema etc +# Default = None, currently only referenced in generateCleanupCommands.sh +dbbMetadataStoreJdbcConfigFile="" + # JDBC connection server url # sample jdbc:db2://10.3.20.201:4740/MOPDBC0 # Optional if zAppBuild is configured to use the @@ -320,6 +324,22 @@ wdDeployPackageDir() { ## End of wazideploy-generate.sh, wazideploy-deploy.sh and wazideploy-evidences.sh parameters #### ##################################################################################################### +##################################################################################################### +## generateCleanupCommands.sh parameters ############################################################ +##################################################################################################### + +# DBB Metadatastore Options String to configure Db2 or File Metadatastore in cleanup commands +# e.g. +# for file metadatastore +# cleanupDbbMetadataStoreOptions="--type file --location /u/github/" +# for db2 metadatastore, reusing build settings +# cleanupDbbMetadataStoreOptions="--type db2 --user ${dbbMetadataStoreJdbcId} --password-file ${dbbMetadataStoreJdbcPwdFile} --db2-config ${dbbMetadataStoreJdbcConfigFile} --url ${dbbMetadataStoreJdbcUrl}" +cleanupDbbMetadataStoreOptions="" + +##################################################################################################### +## End of generateCleanupCommands.sh parameters #### +##################################################################################################### + ##################################################################################################### ## Central functions shared across scripts ####################################################### #####################################################################################################