.. _chain-build:

chain-build
===========

.. program:: chain-build

Synopsis
--------

::

    sample-rpkg chain-build [-h] [--arches [ARCHES ...]] [--md5] [--nowait] [--target TARGET] [--background] [--fail-fast] [--skip-remote-rules-validation]
                            [--skip-nvr-check] [--custom-user-metadata CUSTOM_USER_METADATA]
                            package [package ...]

Description
-----------


Build current package in order with other packages.

example: sample-rpkg chain-build libwidget libgizmo

The current package is added to the end of the CHAIN list.
Colons (:) can be used in the CHAIN parameter to define groups of
packages.  Packages in any single group will be built in parallel
and all packages in a group must build successfully and populate
the repository before the next group will begin building.

For example:

sample-rpkg chain-build libwidget libaselib : libgizmo :

will cause libwidget and libaselib to be built in parallel, followed
by libgizmo and then the current directory package. If no groups are
defined, packages will be built sequentially.


Arguments
---------

.. option:: package

   List the packages and order you want to build in



Options
-------

.. option:: -h --help

   show this help message and exit

.. option:: --arches

   Build for specific arches

.. option:: --md5

   Use md5 checksums (for older rpm hosts)

.. option:: --nowait

   Don't wait on build

.. option:: --target

   Define build target to build into

.. option:: --background

   Run the build at a low priority

.. option:: --fail-fast

   Fail the build immediately if any arch fails

.. option:: --skip-remote-rules-validation

   Don't check if there's a valid gating.yaml file in the repo, where you can define additional policies for Greenwave gating.

.. option:: --skip-nvr-check

   Submit build to buildsystem without check if NVR was already built. NVR is constructed locally and may be different from NVR constructed during build on builder.

.. option:: --custom-user-metadata

   Provide a JSON string of custom metadata to be deserialized and stored under the build's extra.custom_user_metadata field