GitHub action:Register build artifact

1 minute read

Use this GitHub action to report build artifact data generated by a GitHub workflow run to the CloudBees platform for artifact traceability purposes.

Inputs

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

cloudbees-url

String

Yes

The CloudBees platform URL. Typically, this value is "https://api.cloudbees.io".

cloudbees-pat

String

Yes

The CloudBees platform personal access token.

component-id

String

Yes

The CloudBees platform component identifier. This multi-hexadecimal UUID can be found by:

  1. Navigating to a component on the CloudBees platform.

  2. Locating the ID value in the component URL after componentId=.

name

String

Yes

The name of the artifact to send to the CloudBees platform for artifact traceability purposes.

version

String

Yes

The version of the artifact to send to the CloudBees platform for artifact traceability purposes.

url

String

Yes

The URL where the artifact version can be pulled for deployment.

digest

String

No

The artifact digest that uniquely identifies the artifact.

Usage example

In your YAML file, add:

steps: - name: <step-name> uses: cloudbees-gha-cbp/register-build-artifact@v1 with: component-id: <component-id> name: <artifact-name> version: <artifact-version> url: <artifact-repo-url> digest: <artifact-digest> cloudbees-url: <cloudbees-url> cloudbees-pat: ${{ <secrets.CloudBees-platform-PAT> }}