Tasks
A task performs some unit of work during the build process. Tasks are implemented in Java or Groovy and configured in build configuration YAML files.
tasks:
- task: Start
variables:
# Override the default time format
- name: timeFormat
value: "yyyyMMddThh:mm:ssZ"
Task declaration and configuration
Tasks can be declared and configured in three locations in the build configuration:
- The global top-level build configuration
tasks:
list. - A build lifecycle
tasks:
list. - A stage
tasks:
list.
Tasks declared and configured in the top-level tasks list are global to the build process and can be reused in multiple lifecycle and stage tasks lists. This is done by referencing the declared task's name in the task list:
# global task declaration and configuration block
tasks:
- task: Start
variables:
# Override the default time format
- name: timeFormat
value: "yyyyMMddThh:mm:ss:Z"
# executable build lifecycles
lifecycles:
# build all programs of the application
- lifecycle: full
tasks:
- Start # reuse the global Start task configuration
- task: Finish # declare a new local Finish task configuration
variables:
# Override the default log code page
- name: logEncoding
value: utf-8
See the YAML schema tasks reference for syntax details.
Task configuration types
The zBuilder supports three types of task configurations:
- Basic task – Basic tasks are generally simple tasks used to perform different types of initialization, analysis, and finalization steps during the build process.
- Language task - Language tasks are special tasks used to build a list of source files for a specific language like Cobol, PL/I, Assembler.
- Stage – Stages allow for the creation of named collections of declared and configured tasks for reuse by one or more build lifecycles.