Register deployed artifact metadata from your CloudBees CI or Jenkins® pipeline to CloudBees Unify to track artifact deployments across environments. Use deployment data to enable DORA metrics, environment inventory tracking, and deployment analytics.
| Before you begin, ensure you have completed the CI or Jenkins integration and registered your build artifacts. For setup instructions, refer to Connect CI and Jenkins controllers. For artifact registration, refer to Register CI build artifacts. |
Configure your Multibranch Pipeline to register deployed artifacts
Register the deployment of your artifacts to track which versions have been deployed to specific environments.
To register deployed artifacts from your CI pipeline to CloudBees Unify:
-
Specify a
registerBuildArtifactMetadatastep in your Jenkinsfile that contains the required inputs listed in the table below:Table 1. Input details Input name Data type Required? Description nameString
Yes
The name of the artifact reported to CloudBees Unify.
urlString
Yes
The URL where the artifact version is located. For example,
docker.io/myapp/myimg:1.0.0.versionString
Yes
The version of the artifact to send to CloudBees Unify for artifact traceability purposes.
digestString
No
The hash or checksum that uniquely identifies the artifact version.
CloudBees recommends specifying the digest to track artifact versions across repositories. For more information, refer to Artifact deployment and publish history.
labelString
No
A comma-separated list of artifact labels.
typeString
No
The type of artifact, such as Docker or Maven.
componentIdString
No
The ID of the component associated with the artifact. If not provided, the default value is the component ID where the CloudBees CI / Jenkins workflow is located.
commitString
Only required if a different repository/branch.[1]
The commit used to build the artifact. The default value is the commit hash from the CloudBees CI / Jenkins build.
commitUrlString
Only required if a different repository/branch.[1]
The URL of the commit used to build the artifact. The default value is the commit URL from the CloudBees CI / Jenkins build.
repositoryUrlString
Only required if a different repository/branch.[1]
The URL of the repository. The default value is the repository URL from the CloudBees CI / Jenkins build.
refString
Only required if a different repository/branch.[1]
The branch or tag ref used to build the artifact. The default value is the ref from the CloudBees CI / Jenkins build.
[1] By default, the artifact version is associated with the code commit from the CI build. If a different commit/repository/branch has been checked out for building the artifact, specify those commit details instead. If you do not want to associate commit details with this artifact version, omit this parameter.
-
Specify a
registerDeployedArtifactMetadatastep in your Jenkinsfile that contains the required inputs listed in the table below:Table 2. Input details Input name Data type Required? Description artifactIdString
No
The artifact’s ID, returned as the output value of the
registerBuildArtifactMetadatastep. For example,def artifactId = registerBuildArtifactMetadata(…). Either this orartifactUrlmust be present.artifactUrlString
No
URL of the deployed artifact. Either this or
artifactIdmust be present.targetEnvironmentString
Yes
The artifact’s target environment. The environment must already be configured in CloudBees Unify.
labelsString
No
Comma-separated labels attached to the artifact, for example
latest.allowNoMatchingComponentBoolean
No
If set to
false(the default), this step fails if the component is not registered in CloudBees Unify. If set totrue, this step succeeds even if the component does not exist, logging the error instead.
| Once you have registered build and deployed artifacts, this data is reflected in the DORA metrics dashboard and the environment inventory in . |
Usage examples
The following examples demonstrate common patterns for registering deployed artifact metadata.
Basic example using artifact ID
The following is a basic example of using the registerDeployedArtifactMetadata step with the artifact ID:
Example using artifact URL and optional parameters
The following example uses the artifact URL and includes optional parameters:
Full pipeline example
The following example registers a build artifact and then registers its deployment. Running this pipeline creates a build artifact that is reported to CloudBees Unify, and then registers its deployment.
Example Jenkinsfile
After the run completes, the artifact information is displayed in the tab in CloudBees Unify.
View deployed CI build artifacts
View deployed artifact data from your CI build in CloudBees Unify.
To view the deployed artifacts for a build:
-
Select the organization and component associated with the CI build.
-
Select .
-
Select the build name to view the build details in .
-
Select Deployments to list only the deployed artifacts generated during that build.
For the full parameter specification and syntax, refer to Pipeline steps reference.