Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 53 additions & 8 deletions Setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,15 +83,20 @@ DBB_MODELER_APPMAPPINGS_DIR="$DBB_MODELER_WORK/applications-mappings"
# Reference to the repository paths mapping file
REPOSITORY_PATH_MAPPING_FILE=$DBB_MODELER_WORK/repositoryPathsMapping.yaml
# Reference to the type mapping file
APPLICATION_MEMBER_TYPE_MAPPING=$DBB_MODELER_WORK/types.txt
APPLICATION_MEMBER_TYPE_MAPPING=$DBB_MODELER_WORK/typesMapping.yaml
# Reference to the type configuration file to generate build configuration
TYPE_CONFIGURATIONS_FILE=$DBB_MODELER_WORK/typesConfigurations.yaml
TYPE_CONFIGURATIONS_FILE=
# Input files and configuration
# APPLICATION_DATASETS=DBEHM.MIG.COBOL,DBEHM.MIG.COPY,DBEHM.MIG.BMS
APPLICATION_ARTIFACTS_HLQ=DBEHM.MIG
# Scanning options
SCAN_DATASET_MEMBERS=false
SCAN_DATASET_MEMBERS_ENCODING=IBM-1047

# Build Framework to use. Either zBuilder or zAppBuild
BUILD_FRAMEWORK=zBuilder
# Build Framework to use. Either zBuilder or zAppBuild
DBB_ZBUILDER=/var/dbb/zBuilder
# Reference to zAppBuild
DBB_ZAPPBUILD=/var/dbb/dbb-zappbuild
# Reference to DBB Community Repo
Expand Down Expand Up @@ -129,7 +134,7 @@ PIPELINE_CI=1

# Arrays for configuration parameters, that will the Setup script will prompt the user for
path_config_array=(DBB_MODELER_APPCONFIG_DIR DBB_MODELER_APPLICATION_DIR DBB_MODELER_LOGS DBB_MODELER_DEFAULT_GIT_CONFIG)
input_array=(DBB_MODELER_APPMAPPINGS_DIR REPOSITORY_PATH_MAPPING_FILE APPLICATION_MEMBER_TYPE_MAPPING TYPE_CONFIGURATIONS_FILE APPLICATION_ARTIFACTS_HLQ SCAN_DATASET_MEMBERS SCAN_DATASET_MEMBERS_ENCODING DBB_ZAPPBUILD DBB_COMMUNITY_REPO APPLICATION_DEFAULT_BRANCH INTERACTIVE_RUN PUBLISH_ARTIFACTS ARTIFACT_REPOSITORY_SERVER_URL ARTIFACT_REPOSITORY_USER ARTIFACT_REPOSITORY_PASSWORD ARTIFACT_REPOSITORY_SUFFIX PIPELINE_USER PIPELINE_USER_GROUP)
input_array=(DBB_MODELER_APPMAPPINGS_DIR REPOSITORY_PATH_MAPPING_FILE APPLICATION_MEMBER_TYPE_MAPPING TYPE_CONFIGURATIONS_FILE APPLICATION_ARTIFACTS_HLQ SCAN_DATASET_MEMBERS SCAN_DATASET_MEMBERS_ENCODING DBB_COMMUNITY_REPO APPLICATION_DEFAULT_BRANCH INTERACTIVE_RUN PUBLISH_ARTIFACTS ARTIFACT_REPOSITORY_SERVER_URL ARTIFACT_REPOSITORY_USER ARTIFACT_REPOSITORY_PASSWORD ARTIFACT_REPOSITORY_SUFFIX PIPELINE_USER PIPELINE_USER_GROUP)

# Create work dir
echo
Expand All @@ -147,6 +152,34 @@ if [[ -z "$variable" || $variable =~ ^[Yy]$ ]]; then
fi
fi

if [ $rc -eq 0 ]; then
# Specify DBB Build Framework and related options
echo
echo "[SETUP] Specifying the Build Framework configuration"
read -p "Specify the type of the Build Framework to use with DBB ("zBuilder" or "zAppBuild") [default: ${BUILD_FRAMEWORK}]: " variable
if [ "$variable" ]; then
declare BUILD_FRAMEWORK="${variable}"
fi
TYPE_CONFIGURATIONS_FILE=$DBB_MODELER_WORK/typesConfigurations-$BUILD_FRAMEWORK.yaml

if [ "$BUILD_FRAMEWORK" = "zBuilder" ]; then
read -p "Specify the location of the DBB zBuilder installation [default: ${DBB_ZBUILDER}]: " variable
if [ "$variable" ]; then
declare DBB_ZBUILDER="${variable}"
fi
elif [ "$BUILD_FRAMEWORK" = "zAppBuild" ]; then
read -p "Specify the location of the zAppBuild installation [default: ${DBB_ZAPPBUILD}]: " variable
if [ "$variable" ]; then
declare DBB_ZAPPBUILD="${variable}"
fi
else
rc=8
ERRMSG="[ERROR] The value ${variable} was specified and is invalid (either 'zBuilder' or 'zAppBuild' are valid options). Exiting. rc="$rc
echo $ERRMSG
fi
fi


if [ $rc -eq 0 ]; then
# Specify DBB Metadatastore type and config
echo
Expand All @@ -161,9 +194,7 @@ if [ $rc -eq 0 ]; then
if [ "$variable" ]; then
declare DBB_MODELER_FILE_METADATA_STORE_DIR="${variable}"
fi
fi

if [ "$DBB_MODELER_METADATASTORE_TYPE" = "db2" ]; then
elif [ "$DBB_MODELER_METADATASTORE_TYPE" = "db2" ]; then
read -p "Specify the location of the DBB Db2 Metadatastore configuration file [default: ${DBB_MODELER_DB2_METADATASTORE_CONFIG_FILE}]: " variable
if [ "$variable" ]; then
declare DBB_MODELER_DB2_METADATASTORE_CONFIG_FILE="${variable}"
Expand All @@ -185,6 +216,10 @@ if [ $rc -eq 0 ]; then
rm -rf $DBB_MODELER_WORK
exit 1
fi
else
rc=8
ERRMSG="[ERROR] The value ${variable} was specified and is invalid (either 'file' or 'db2' are valid options). Exiting. rc="$rc
echo $ERRMSG
fi
fi

Expand Down Expand Up @@ -235,11 +270,15 @@ if [ $rc -eq 0 ]; then
rc=$?
fi
if [ $rc -eq 0 ]; then
cp $DBB_MODELER_HOME/samples/types.txt $APPLICATION_MEMBER_TYPE_MAPPING
cp $DBB_MODELER_HOME/samples/typesMapping.yaml $APPLICATION_MEMBER_TYPE_MAPPING
rc=$?
fi
if [ $rc -eq 0 ]; then
cp $DBB_MODELER_HOME/samples/typesConfigurations.yaml $TYPE_CONFIGURATIONS_FILE
if [ "$BUILD_FRAMEWORK" = "zBuilder" ]; then
cp $DBB_MODELER_HOME/samples/typesConfigurations-zBuilder.yaml $TYPE_CONFIGURATIONS_FILE
else
cp $DBB_MODELER_HOME/samples/typesConfigurations.yaml $TYPE_CONFIGURATIONS_FILE
fi
rc=$?
fi
if [ $rc -eq 0 ]; then
Expand Down Expand Up @@ -283,6 +322,12 @@ if [ $rc -eq 0 ]; then
echo "${config}=${!config}" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
done

echo "" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
echo "# DBB Git Migration Modeler - Build Framework configuration" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
echo "BUILD_FRAMEWORK=${BUILD_FRAMEWORK}" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
echo "DBB_ZBUILDER=${DBB_ZBUILDER}" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
echo "DBB_ZAPPBUILD=${DBB_ZAPPBUILD}" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE

echo "" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
echo "# DBB Git Migration Modeler - DBB Metadatastore configuration" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
echo "DBB_MODELER_METADATASTORE_TYPE=${DBB_MODELER_METADATASTORE_TYPE}" >> $DBB_GIT_MIGRATION_MODELER_CONFIG_FILE
Expand Down
2 changes: 1 addition & 1 deletion samples/git-config/.gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ server.xml zos-working-tree-encoding=iso8859-1 git-encoding=utf-8
*.plbck binary
*.md zos-working-tree-encoding=IBM-1047 git-encoding=utf-8
*.yml zos-working-tree-encoding=IBM-1047 git-encoding=utf-8
*.yaml zos-working-tree-encoding=IBM-1047 git-encoding=utf-8
*.yaml zos-working-tree-encoding=utf-8 git-encoding=utf-8
*.md zos-working-tree-encoding=utf-8 git-encoding=utf-8

.gitattributes zos-working-tree-encoding=ISO8859-1 git-encoding=utf-8
Expand Down
22 changes: 22 additions & 0 deletions samples/git-config/dbb-app.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
---
#
# Licensed materials - Property of IBM
# 5655-AC5 Copyright IBM Corp. 2024
# All rights reserved
# US Government users restricted rights - Use, duplication or
# disclosure restricted by GSA ADP schedule contract with IBM Corp.
#
version: 1.0.0
application:
name:
tasks:
# Variable overrides for the ImpactAnalysis task
- task: ImpactAnalysis
variables:
- name: impactQueryPatterns
value:

- task: ScannerInit
variables:
- name: loadModuleExcludeList
value: "${SCEELKED}.*,${SDFHLOAD}.*"
4 changes: 0 additions & 4 deletions samples/types.txt

This file was deleted.

29 changes: 29 additions & 0 deletions samples/typesConfigurations-zBuilder.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
typesConfigurations:
- typeConfiguration: "PLI"
tasks:
- "Pli"
variables:
- name: compileParms
value: "PP(INCLUDE('ID(++INCLUDE)'))"
- name: linkedit
value: true
- typeConfiguration: "CBLDB2"
tasks:
- "Cobol"
variables:
- name: compileParms
value: "LIB,SOURCE,SQL"
- name: isSQL
value: true
- name: linkedit
value: true
- typeConfiguration: "CICS"
tasks:
- "Pli"
- "Cobol"
variables:
- name: isCICS
value: true
- name: compileParms
value: "${compileParms},CICS"

11 changes: 11 additions & 0 deletions samples/typesMapping.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
types:
- type: "CICS"
filePatterns:
- "LGACDB01"
- "LGACUS01"
- type: "CBLDB2"
filePatterns:
- "LGACDB.."
- type: "PLI"
filePatterns:
- "LGACUS01"
Loading