There are two types of chain that can be called at the project
level:
- Pass Chain: specifies a project or library to run when the project
passes.
- Fail Chain: specifies a project or library to run when the project
fails.
This feature has several uses:
- Employ conditional execution at the project level. Other flow-control
capabilities are provided at the step level. In addition, a step can
have its own Pass Chain and Fail Chain. See Controlling execution flow in Working with steps.
- Maintain frequently used groups of steps separately from projects
that depend on them. Libraries can also be used for this purpose.
- Clean up files after a project passes or fails.
- Call automated test and deployment projects when a software build
project passes.
Chain inheritance from the calling project or library
A
chained project or library inherits some characteristics from the
calling project:
- A chained project inherits the class of the calling project by
default. You can change this behavior in by setting Override Class
when Chaining to No.
- A chained library inherits the calling step's selector because
a library does not have its own selector. If that step does not have
a selector, the library inherits the build's selector. Steps of the
chained library use the inherited selector, unless those steps have
explicit selectors.
A chained project or library otherwise runs with its own characteristics:
- Its server is specified by its own selector.
- It uses its own properties, including its own notification settings
and chain settings.
- Its environment is applied after the calling project's environments.
Variables from the calling project are renamed and available in the
called project. See also Environment variable inheritance in chained projects.
Chain nesting
When you chain a project,
the called project is nested in the calling project. The maximum level
of nesting is 32 levels. The level of nesting may also encounter limits
based on the available memory on the host running Management Console.
Running and interrupting chains
If you use
a .break command within a chained project, the system
stops the chained project but returns control to the calling project,
which then continues. See .break.