Skip to content

Commit

Permalink
DBB 2.0 Support (IBM#253)
Browse files Browse the repository at this point in the history
* Initial commit

* initial add of zappbuild:main:

* replace repository client with metadatastore

* fixes, improvements

* fix

* clean up implementation

* update print stmnt

* update attachment

* use buildReport.generateHTML()

* cleanup

* resolve outstanding conflicts

* remove repositoryclient instances

* fix

* add db2 metadatastore constructor

* Implement db2 metadatastore

* improvements

* Implement db2 metadatastore creation logic

* fix MetadataStore initialization

* cleanup

* print build result

* fix

* testing

* fix

* improvements

* clarification improvement

* test

* test

* fix

* cast password as String to resolve ambiguous method exception

* fix

* support null id

* improvements

* useSearchConfig set to true

* debug

* add dbg stmnt

* clean up

* remove MetadataStore as param

* remove MetadataStore as a param for createMergeBuildList, use factory to get instance instead

* remove MetadataStore as a param for scanOnlyStaticDependencies, replace with factory getter method

* remove MetadataStore param from calculateConcurrentChanges()

* remove MetadataStore param from generateConcurrentChangesReports()

* remove MetadataStore param from reportExternalImpacts definition and calls

* remove MetadataStore param from calculateLogicalImpactedFile definition and calls

* remove MetadataStore param from updateCollection()

* remove MetadataStore param from saveStaticLinkDependencies definition and calls

* remove MetadataStore param from verifyCollections() definition and calls

* fix updateCollection MetadataStore API calls

* remove metadataStore arg from BuildUtilities.updateBuildResult and GitUtilities.updateBuildResult

* remove MetadataStore arg from retrieveLastBuildResult definition and calls

* clean up, remove unecessary MetadataStore vars, fixes

* clean up repository client references

* debug

* debug

* debug

* fix

* relativize paths

* update README for MetadataStore options

* remove MetadataStore variable and getter from language files, no longer needed

* cleanup

* remove useSearchConfiguration property, old DependencyResolver and ImpactResolver are removed in DBB 2.0

* minor improvement

* remove debug println stmnt

* change 'repository' to 'MetadataStore'

* clarity

* provide example for JDBC URL

* fix wording for db2 command line options, update BUILD.md

* add property to readme

Co-authored-by: Daniel Bruce <[email protected]>
Co-authored-by: Luke Burgess <[email protected]>
  • Loading branch information
3 people authored Oct 17, 2022
1 parent 6c9288d commit cd70579
Show file tree
Hide file tree
Showing 26 changed files with 471 additions and 638 deletions.
16 changes: 8 additions & 8 deletions BUILD.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ $DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1
## Common User Build Invocation Examples
**Build one program**

Build a single program in a user build context. Does not require a repository client connection to the DBB WebApp.
Build a single program in a user build context. Does not require use of the MetadataStore (filesystem or Db2)
```
$DBB_HOME/bin/groovyz build.groovy --workspace /u/build/repos --application app1 --outDir /u/build/out --hlq BUILD.APP1 --userBuild app1/cobol/epsmpmt.cbl
```
Expand Down Expand Up @@ -136,12 +136,12 @@ build options:
-re,--reportExternalImpacts Flag to activate analysis and report of external impacted files within DBB collections
web application credentials
-url,--url <arg> DBB repository URL
-id,--id <arg> DBB repository id
-pw,--pw <arg> DBB repository password
-pf,--pwFile <arg> Absolute or relative (from workspace) path to
file containing DBB password
Db2 MetadataStore configuration options
-url,--url <arg> Db2 JDBC URL for the MetadataStore.
Example: jdbc:db2:<Db2 server location>
-id,--id <arg> Db2 user id for the MetadataStore
-pw,--pw <arg> Db2 password (encrypted with DBB Password Utility) for the MetadataStore
-pf,--pwFile <arg> Absolute or relative (from workspace) path to file containing Db2 password
IDz/ZOD User Build options
-u,--userBuild Flag indicating running a user build
Expand Down Expand Up @@ -173,7 +173,7 @@ utility options

Build a single program in the application.

By leveraging `--userBuild` zAppBuild does not connect to the repositoryClient to the DBB WebApp and also does not store a build result.
By leveraging `--userBuild` zAppBuild does not intialize the MetadataStore and also does not store a build result.

```
groovyz dbb-zappbuild/build.groovy --workspace /var/dbb/dbb-zappbuild/samples --hlq USER.ZAPP.CLEAN.MASTER --workDir /var/dbb/out/MortgageApplication --application MortgageApplication --logEncoding UTF-8 --userBuild --verbose MortgageApplication/cobol/epsnbrvl.cbl
Expand Down
8 changes: 4 additions & 4 deletions build-conf/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ documentDeleteRecords | Option determine if the build framework should document
generateDb2BindInfoRecord | Flag to control the generation of a generic DBB build record for a build file to document the configured db2 bind information (application-conf/bind.properties). Default: false ** Can be overridden by a file property.
dbb.file.tagging | Controls compile log and build report file tagging. Default: true.
dbb.LinkEditScanner.excludeFilter | DBB configuration property used by the link edit scanner to exclude load module entries
dbb.RepositoryClient.url | DBB configuration property for web application URL. ***Can be overridden by build.groovy option -url, --url***
dbb.RepositoryClient.userId | DBB configuration property for web application logon id. ***Can be overridden by build.groovy option -id, --id***
dbb.RepositoryClient.password | DBB configuration property for web application logon password. ***Can be overridden by build.groovy option -pw, --pw***
dbb.RepositoryClient.passwordFile | DBB configuration property for web application logon password file. ***Can be overridden by build.groovy option -pf, --pf***
metadataStoreType | DBB MetadataStore Type configuration property. Valid options are 'file' or 'db2'. Default: file
metadataStoreFileLocation | DBB File MetadataStore location. Default: $USER
metadataStoreDb2Url | DBB configuration property for Db2 URL. ***Can be overridden by build.groovy option -url, --url***
metadataStoreDb2ConnectionConf | DBB configuration property for Db2 configuration properties file.

### dependencyReport.properties
Properties used by the impact utilities to generate a report of external impacted files
Expand Down
29 changes: 11 additions & 18 deletions build-conf/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -126,29 +126,22 @@ createBuildOutputSubfolder=true
# Default : false
documentDeleteRecords=false

# MetadataStore configuration properties:

#
# default DBB Repository Web Application authentication properties
# can be overridden by build.groovy script options

# build.groovy option -url, --url
dbb.RepositoryClient.url=
# select MetadataStore configuration (either 'file' or 'db2')
metadataStoreType=file

# build.groovy option -id, --id
dbb.RepositoryClient.userId=ADMIN
# location of file metadata store. Default is $USER
#metadataStoreFileLocation=

# build.groovy option -pw, --pw
dbb.RepositoryClient.password=
# Db2 metadata server url
# build.groovy option -url, --url
#metadataStoreDb2Url=jdbc:db2:<Db2 server location>

# build.groovy option -pf, --pf
dbb.RepositoryClient.passwordFile=${zAppBuildDir}/utilities/ADMIN.pw
# Db2 connection configuration property file
# Sample is povided at $DBB_HOME/conf/db2Connection.conf
#metadataStoreDb2ConnectionConf=

# Use dbb.RepositoryClient.sslProtocols to specify one or more SSL protocols used
# to communication between DBB toolkit and server. Use a comma as separator for more
# than one protocol. Requires toolkit PTF UI72423 or version 1.1.0 or higher
# examples
# dbb.RepositoryClient.sslProtocols=TLSv1.2
# dbb.RepositoryClient.sslProtocols=TLS,TLSv1.2

# The dbb.gateway.type property determines which gateway type is used for the entire build process
# Possible values are 'legacy' and 'interactive. Default if not indicated is 'legacy'
Expand Down
Loading

0 comments on commit cd70579

Please sign in to comment.