Skip to content

Latest commit

 

History

History
35 lines (21 loc) · 1.38 KB

AbstractProjectSupport.md

File metadata and controls

35 lines (21 loc) · 1.38 KB

Integration with AbstractProject job types

AbstractProject is one of the most widely used abstraction layers of Jenkins. Most of the common job types implement it (Freestyle, Matrix, JobDSL, etc.).

Environment variables

Ownership plugin may contribute Build Environment variables, which can be used in custom logic. These variables are available from all build steps, including SCM checkout.

Job-specific settings can be configured in the Build Environment section of the job configuration. In Global Ownership Settings it is possible to enable injection of the ownership variables by default.

On the screenshot below you can find the list of injected environment variables:

Ownership Build Wrapper

Usage example:

Example. Build Step

Token macro

Particular Jenkins plugins (e.g. Copy Artifact) use Token Macro expressions instead of environment variables. Though all ownership environment variables are accessible through the ${ENV} macro, there is also a specialized ${OWNERSHIP} macro.

Usage: ${OWNERSHIP,var="TODO:varname"}. Possible varname values and behavior are similar to the Build Environment variables described above.

Usage example:

Example. Build Step