Basic task

Basic tasks are simple tasks that perform different steps of the build process such as initialization, analysis, and finalization. They can be implemented in either Groovy or Java. When a lifecycle task list is being executed, each task is located and executed being passed in the task configuration variables provided by the build configuration files.

zBuilder provided tasks

zBuilder provides many built-in common basic tasks required by pre-defined zBuilder lifecycles. These tasks are ready-to-use with default configuration values requiring little or no user-provided configuration.

 # global task configurations that can be referenced in multiple build lifecycles
 tasks:
   # basic build initialization
   - task: Start
  
   # initialize dependency scanners
   - task: ScannerInit

   # initialize metadata store
   - task: MetadataInit
     variables:
       - name: type
         value: db2
       - name: db2Url
         value: jdbc:db2://system1.company.com:5040/DBB1

   # create full build list
   - task: FullAnalysis

   # build finalization
   - task: Finish
Task Description
Start First task to execute. Initializes the build process.
ScannerInit Initializes the DBB source and load module metadata scanners.
Registers user provided custom source scanners.
MetadataInit Initializes the DBB MetadataStore for the build process.
FileAnalysis Creates a list of programs to build that are passed in on the command line.
Supports text files containing a list of programs to build.
FullAnalysis Creates a full or "build all" list of programs to build for the application.
ImpactAnalysis Creates a list of programs to build that are impacted by source files that have changed since previous build.
MergeAnalysis Creates a list of programs to build in a topic branch, for the programs that are intended for merging into the main branch.
Language Processes user-provided language configuration files to build programs for that language.
UnitTest Executes IBM Test Accelerator for Z unit tests.
Package Creates deployment packages that contain build outputs and a manifest file.
zOSConnect Compiles zOSConnect APIs.
Finish Last task to execute. Writes final reports and shuts down the build process.

See the task index reference to understand what functions the built-in zBuilder tasks provide and how to customize them for your build requirements.

Custom tasks

Sometimes using and customizing the zBuilder built-on basic tasks are not enough to meet a client's z/OS application build requirements. In those rare cases, users can extend the zBuilder build framework by writing writing custom task implementations and then declare and configure those tasks in zBuilder Build configuration.

The following example shows how you can configure a user provided custom task that deletes a list of data sets.

- task: DeleteDatasets
  comment: Delete a list of datasets
  script: groovy/DeleteDatasets.groovy
  variables: 
   - name: datasets
     value:
       - ${HLQ}.COBOL
       - ${HLQ}.BMS
       - ${HLQ}.PLI
       - ${HLQ}.OBJECT
       - ${HLQ}.LOAD

Additional topics

For more information about basic tasks see: