Artifact management reference

8 minute read

Technical specifications for all artifact management actions in CloudBees Unify, organized by lifecycle stage. Use this reference to look up action names, input parameters, data types, and outputs while building artifact management workflows.

Registration and tracking actions

The following actions register, retrieve, and label artifacts in CloudBees Unify.

Register a build artifact

Use the cloudbees-io/register-build-artifact@v2 action to report to CloudBees Unify that an artifact version has been created from a workflow run.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.
Do not use register-build-artifact for the same artifact version alongside any of the following actions, as the resulting run registers duplicate artifact entries: ecr-promote-image, s3-upload-object (if send-artifact-info: true), crane, helm-push, jfrog-artifactory-promote-image, jfrog-artifactory-upload-file (if send-artifact-info: true), or kaniko. These actions include built-in artifact registration.

Inputs and outputs

Table 1. Input details
Input name Data type Required? Description

commit

String

Only required if a different repository/branch.[1]

The commit ID from the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.sha }}.

digest

String

No, but recommended to track artifact versions across repositories in the artifact history.

The hash or checksum that uniquely identifies the artifact version.

labels

String

No

A comma-separated list of artifact labels. A maximum of 20 labels are allowed per artifact version, with a maximum of 20 characters per label.

name

String

Yes

The name of the artifact reported to CloudBees Unify.

ref

String

Only required if a different repository/branch.[1]

The ref or branch of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.ref }}.

repository-url

String

Only required if a different repository/branch.[1]

The clone URL of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.repositoryUrl }}.

url

String

Yes

The URL where the artifact version is located. For example, docker.io/myapp/myimg:1.0.0.

version

String

Yes

The version of the artifact reported to CloudBees Unify.

[1] By default, this action associates the artifact version with the code commit associated with the workflow run in the workflow’s repository/branch. If a different commit/repository/branch has been checked out for building the artifact, specify that commit ID instead. If you do not want to associate a commit with this artifact version, specify an empty commit.

Output: artifact-id (String): the unique identifier of the artifact reported to CloudBees Unify.

Register a deployed artifact

Use the cloudbees-io/register-deployed-artifact@v2 action to report to CloudBees Unify that an artifact has been deployed to an environment.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.
This action (v2.0) is the most recent release. Previous releases are deprecated. Version 2.0 replaces multiple required inputs with a single artifact-id parameter.

Inputs

Table 2. Input details
Input name Data type Required? Description

artifact-id

String

Yes

The unique identifier of the artifact ID output from CloudBees Unify.

labels

String

No

A comma-separated list of artifact labels. A maximum of 20 labels are allowed per artifact version, with a maximum of 20 characters per label.

target-environment

String

Required if no job-level environment is specified.

The environment where the deployment is located. The target-environment value overrides the job-level environment value.

Get artifact details

Use the cloudbees-io/get-artifact-details@v1 action to retrieve an artifact’s name, version, URL, and digest using its artifact ID.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs and outputs

Input: artifact-id (String, required): the unique identifier of the artifact ID output from CloudBees Unify.

Table 3. Output details
Output name Data type Description

name

String

The name of the artifact reported to CloudBees Unify.

version

String

The version of the artifact reported to CloudBees Unify.

url

String

The URL where the artifact version is located. For example, docker.io/myapp/myimg:1.0.0.

digest

String

The hash or checksum that uniquely identifies the artifact version.

Label an artifact version

Use the cloudbees-io/label-artifact-version@v1 action to add or remove labels on existing artifact versions.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 4. Input details
Input name Data type Required? Description

artifact-id

String

Yes

The unique identifier of an artifact version reported to CloudBees Unify.

labels

String

Yes

A comma-separated list of artifact labels. A maximum of 20 labels are allowed per artifact version, with a maximum of 20 characters per label.

operation

String

No

The labeling operation to perform. Supported values: ADD (default) to apply labels, or REMOVE to remove labels.

Storage actions

The following actions upload and download artifacts to and from external storage.

Upload to Amazon S3

Use the cloudbees-io/s3-upload-object@v1 action to upload a file to Amazon S3.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs and outputs

Table 5. Input details
Input name Data type Required? Description

bucket-name

String

Yes

The Amazon S3 bucket name.

file-path

String

Yes

The local file path of the directory to be uploaded.

s3-path

String

Yes

The Amazon S3 destination path for the upload.

artifact-name

String

No

The name of the artifact to send to CloudBees Unify. Defaults to the filename if not provided.

artifact-version

String

No

The version of the artifact to send to CloudBees Unify. Defaults to - if not provided.

send-artifact-info

Boolean

No

If true, sends artifact information to CloudBees Unify for artifact traceability purposes. Default is false.

commit

String

No

The commit ID from the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.sha }}.

ref

String

No

The ref or branch of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.ref }}.

repository-url

String

No

The clone URL of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.repositoryUrl }}.

component-id

String

No

The ID of the component associated with the artifact. Defaults to the component of the current workflow run (${{ cloudbees.component.id }}).

Output: artifact-id (String): the unique identifier of the artifact reported to CloudBees Unify. Only populated when send-artifact-info: true.

Download from Amazon S3

Use the cloudbees-io/s3-download-object@v1 action to download a file from Amazon S3.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 6. Input details
Input name Data type Required? Description

bucket-name

String

Yes

The Amazon S3 bucket name.

file-path

String

Yes

The destination path for the download.

s3-path

String

Yes

The Amazon S3 bucket file path of the object to be downloaded.

Upload to JFrog Artifactory

Use the cloudbees-io/jfrog-artifactory-upload-file@v1 action to upload a file to JFrog Artifactory.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs and outputs

Table 7. Input details
Input name Data type Required? Description

artifactory-path

String

Yes

The JFrog Artifactory destination path for the upload.

file-path

String

Yes

The path of the file to be uploaded.

url

String

Yes

The JFrog Artifactory server URL.

token

String

Required only if username and password are not specified.

The JFrog Artifactory token.

username

String

Required only if token is not specified.

The JFrog Artifactory username.

password

String

Required only if token is not specified.

The JFrog Artifactory password.

artifact-name

String

No

The name of the artifact to send to CloudBees Unify. Defaults to the filename if not provided.

artifact-version

String

No

The version of the artifact to send to CloudBees Unify. Defaults to - if not provided.

send-artifact-info

Boolean

No

If true, sends artifact information to CloudBees Unify for artifact traceability purposes. Default is false.

commit

String

No

The commit ID from the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.sha }}.

ref

String

No

The ref or branch of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.ref }}.

repository-url

String

No

The clone URL of the source repository, used when registering the build artifact in CloudBees Unify. Default is ${{ cloudbees.scm.repositoryUrl }}.

Output: artifact-id (String): the unique identifier of the artifact reported to CloudBees Unify. Only populated when send-artifact-info: true.

Download from JFrog Artifactory

Use the cloudbees-io/jfrog-artifactory-download-file@v1 action to download a file from JFrog Artifactory.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 8. Input details
Input name Data type Required? Description

url

String

Yes

The JFrog Artifactory server URL.

token

String

Required only if username and password are not specified.

The JFrog Artifactory token.

username

String

Required only if token is not specified.

The JFrog Artifactory username.

password

String

Required only if token is not specified.

The JFrog Artifactory password.

file-path

String

Yes

The destination path for the download.

artifactory-path

String

Yes

The JFrog Artifactory file path of the object to be downloaded.

Promotion actions

The following actions promote container images between registries and register each promoted image as a new artifact in CloudBees Unify.

Promote an image in Amazon ECR

Use the cloudbees-io/ecr-promote-image@v1 action to copy an image between Amazon ECR repositories.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs and outputs

Table 9. Input details
Input name Data type Required? Description

registry-url

String

Yes

The Amazon ECR registry URL.

source-repository-name

String

Yes

The Amazon ECR source repository name.

source-tag

String

Yes

The Amazon ECR source image tag.

target-repository-name

String

Required only if target-tag is identical to source-tag.

The Amazon ECR target repository name.

target-tag

String

Required only if target-repository-name is identical to source-repository-name.

The Amazon ECR target image tag.

artifact-name

String

No

The name of the artifact, used when registering in CloudBees Unify. Defaults to the target repository name.

component-id

String

No

The ID of the component associated with the artifact. Defaults to the component of the current workflow run (${{ cloudbees.component.id }}).

Output: artifact-id (String): the unique identifier of the artifact reported to CloudBees Unify.

Copy a container image with Crane

Use the cloudbees-io/crane@v1 action to copy a container image from any source registry to any destination registry.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs and outputs

Table 10. Input details
Input name Data type Required? Description

src

String

Yes

The source image to copy.

destination

String

Yes

The destination image.

platform

String

No

Specifies the platform in the format os/arch[/variant][:osversion].

registry-configuration

String

No

CloudBees registry configuration file containing the registries to use for loading images. Defaults to ${{ cloudbees.registries }}.

skip-image-validation

String

No

When true, source and destination image validation is skipped. Default is true.

artifact-name

String

No

The name of the artifact, used when registering in CloudBees Unify. Defaults to the destination image name without registry and tag parts.

component-id

String

No

The ID of the component associated with the artifact. Defaults to the component of the current workflow run (${{ cloudbees.component.id }}).

Outputs: artifact-id (String), digest (String: image digest of the destination image), image (String: image reference of the destination image including digest).

Promote an image in JFrog Artifactory

Use the cloudbees-io/jfrog-artifactory-promote-image@v1 action to move or copy a Docker image between JFrog Artifactory repositories.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs and outputs

Table 11. Input details
Input name Data type Required? Description

source-image-name

String

Yes

The JFrog Artifactory source image name.

source-repository-name

String

Yes

The JFrog Artifactory source repository name.

source-tag

String

Yes

The JFrog Artifactory source tag.

url

String

Yes

The JFrog Artifactory server URL.

token

String

Required only if username and password are not specified.

The JFrog Artifactory token.

username

String

Required only if token is not specified.

The JFrog Artifactory username.

password

String

Required only if token is not specified.

The JFrog Artifactory password.

target-image-name

String

Required only if target-repository-name and target-tag are not specified.

The JFrog Artifactory target image name.

target-repository-name

String

Required only if target-image-name and target-tag are not specified.

The JFrog Artifactory target repository name.

target-tag

String

Required only if target-repository-name and target-image-name are not specified.

The JFrog Artifactory target tag.

copy

String

No

Specifies whether to move or copy the image. Default ('') moves the image; true copies it.

Output: artifact-id (String): the unique identifier of the artifact reported to CloudBees Unify.

SBOM generation

The following action generates a software bill of materials from a container image or filesystem artifact.

Generate an SBOM with Syft

Use the cloudbees-io/syft-sbom-plugin@v1 action to generate an SBOM using the Anchore Syft scanner.

All CloudBees action repositories are listed at CloudBees, Inc. on GitHub.

Inputs

Table 12. Input details
Input name Data type Required? Description

binary-tar-path

String

Yes

The path of the binary to be scanned.

The binary file must be in the TAR format.