GitHubContribute in GitHub: Edit online

Metadata lifecycle

The metadata lifecycle is used to collect dependency metadata for an application that has already been built. It can be used to rebuild dependency metadata or to create it fresh after migrating to the zBuilder.

Usage

The metadata lifecycle can be executed with the following command: dbb build metadata [options]

The Analysis tasks collect the dependency metadata associated with the sources collection. The Language task generates build maps and scans the load module associated with source files to collect the dependency metadata for the outputs collection.

Yaml definitions

Lifecycle definition

Source: build/dbb-build.yaml

#########################################
# Executable build lifecycles
#########################################
lifecycles:

  # Scan source files and existing load modules to collect dependency data for source and outputs without creating load modules.
  - lifecycle: metadata
    variables:
      - name: printScannedItems
        value: true
      - name: metadataBuild
        value: true
    # define the list of tasks to execute during the build lifecycle
    tasks:
      - Start
      - ScannerInit
      - MetadataInit
    # - FullAnalysis
      - ImpactAnalysis
      - Languages    # Defined in Languages.yaml
      - Finish

The lifecycle defines the list of tasks to execute. The printScannedItems variables enable the stdout output that details the scanned source files for the Analysis tasks.

Included task definitions

Source: build/dbb-build.yaml

#########################################################################
# Basic task configurations that can be referenced by multiple lifecycles
#########################################################################
tasks:

  # basic build initialization
  - task: Start

  # initialize dependency scanners
  - task: ScannerInit

  # initialize metadata store
  - task: MetadataInit

  # create a build list containing impacted files
  - task: ImpactAnalysis

  # build finalization
  - task: Finish

  # default empty Languages stage
  # to be replaced by content of Languges.yaml
  - stage: Languages
    tasks: