build

Updated:2022-11-22

maia build : this command reads and executes the commands given in the sections prepare and build in the component configuration file (default a MAIA.yml file).

Usage
  1. execute maia build to build one component as part of other build steps and wrapping your build command into the MAIA.yml file.
    • suitable when integrating MAIA Agent into an existing build pipeline.
    • the command must be executed from the directory of an already cloned repository.
    • execute maia git_scan prior to the maia build command.
    • the build command creates an SBOM file that is transferred to the MAIA web app.
    • no build options should be used.
    • Activities options can be used.
    • Example
  2. execute maia build to build one component as part of other build steps without wrapping your build command into the MAIA.yml file.
    • suitable when integrating MAIA Agent into an existing build pipeline.
    • the command must be executed from the directory of an already cloned repository.
    • execute maia git_scan prior to the maia build command.
    • the build command creates an SBOM file that is transferred to the MAIA web app.
    • no build options should be used.
    • Activities options can not be used.
    • Example.
  3. execute maia build to build one component in conjunction with other maia commands.
    • suitable when creating a new build pipeline or improvements in the existing is needed.
    • the option --component must be used.
    • execute maia checkout prior to the maia build command.
    • the build command creates an SBOM file that is transferred to the MAIA web app.
    • Activities options can be used.
    • Example
  4. execute maia build a collection of components.
    • the command must be executed from the directory of an already cloned repository.
    • execute maia git_scan prior to the maia build command.
    • the build command creates an SBOM file that is transferred to the MAIA web app.
    • no build options should be used.
    • Activities options can be used.
    • Example

MAIA Agent (MA) executes commands in the following sequence:

  1. If the component is a collection, MA prepares to build its sub components.
  2. MA prepares to build the component.
  3. If the component is a collection, MA builds its sub components.
  4. MAIA Agent builds the component.
Command printout
$ bundle exec maia build --help
Usage: build [--help] [--verbose] [--debug]  [--component <str> [--track <str>]] [--activity string] 
[--activity-uuid <uuid>] [--parent-activity-uuid <uuid>] [--save-log] [--no-owner] 
[--heartbeat-interval <int>] [--time-to-live <int>] [--revision <str>][--keep-going]

Options:
    -v, --verbose                    Verbose mode
    -d, --debug                      Debug mode
    -c, --component STRING           Component to build
    -t, --track STRING               Track to build
        --activity-uuid STRING       Activity uuid
        --parent-activity-uuid STRING
                                     Parent activity uuid
    -z, --activity STRING            Activity comment (default activity-uuid)
        --time-to-live INT           Timeout (default 7200s)
        --heartbeat-interval INT     Heartbeat (default 600s)
        --no-owner                   Disable owner for an activity.
    -g, --save-log                   Save logfile locally
    -r, --revision STRING            Revision
    -k, --keep-going                 Continue to build suite subcomponents after an error.
    -h, --help                       Show this message


Command details
Run command Restrictions Examples
maia build 1&2. use with no option when a repository clone already exists and the command is run from that directory, or
3&4. with option --component (here the component must be checked out with the command maia checkout before command execution).
1&2. $bundle exec maia build
3. $bundle exec maia build --component openssl
4. $bundle exec maia build --component openssl --keep-going


Option flag Parameter Description
--component, -c component name string C The name of the component in MAIA web app.
--track, -t track name string The name of the track in MAIA web app.
--revision, -r revision string The revision of the created artifact in MAIA web app.
--keep-going, -k C If an error occurs when building a sub component the remaining sub components continue to be built, if the component is a suite.

The following additional command options apply when also creating Activities in the MAIA web app.

Option flag Parameter Description
--activity, -z string C The activity comment that will be showed in MAIA web app. Default activity-uuid
--activity-uuid uuid string M The uuid of this activity.
--parent-activity-uuid uuid string The uuid of the parent activity that the build belongs to in MAIA.
--no-owner Disables the owner for an activity.
--heartbeat-interval int The number of seconds between heartbeats. Default 600 sec.
--time-to-live int The maximum timeout, in seconds, before the activity is terminated. Default 7200 sec.
--save-log, -g Saves the log file locally

The following additional command options apply to all MAIA Agent commands.

Option flag Description
--help, -h Shows all available options for the command.
--verbose, -v Enables verbose mode.
--debug, -d Enables debug mode.