Use this action to report to the CloudBees platform that an artifact version has been created from a workflow run. Register a build artifact to enable traceability, including if a branch and/or repository is checked out that is different from the workflow repository branch. A unique artifact ID is output from using this action.
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
Input name | Data type | Required? | Description |
---|---|---|---|
|
String |
Yes |
The name of the artifact reported to the CloudBees platform. |
|
String |
Yes |
The URL where the artifact version is located.
For example, |
|
String |
Yes |
The version of the artifact reported to the CloudBees platform. |
|
String |
Only required if a different repository/branch.[1] |
The commit ID from the source repository. |
|
String |
Only required if a different repository/branch.[1] |
The commit URL from the source repository. |
|
String |
Only required if a different repository/branch.[1] |
The ref or branch of the artifact repository. |
|
String |
Only required if a different repository/branch.[1] |
The artifact repository URL. |
|
String |
No, but it is recommended to help track artifact versions across repositories. Refer to history for more information. |
The hash or checksum that uniquely identifies the artifact version. |
|
String |
No |
A comma-separated list of artifact labels. |
[1] By default, the CloudBees platform 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.
Outputs
Output name | Data type | Description |
---|---|---|
|
String |
The unique identifier of the artifact reported to the CloudBees platform. |
Usage examples
Basic example
The following is a basic example of using the action:
jobs: register_build_artifact: uses: cloudbees-io/register-build-artifact@v1 with: name: myApp url: docker.io/myapp/myimg:1.0.0 version: 1.0.0
Using the action output
The following example accesses the artifact-id
value in a downstream step using the outputs
context.
Using optional inputs
The following example specifies the artifact digest and labels:
jobs: register_build_artifact: uses: https://github.com/cloudbees-io/register-build-artifact@v1 with: name: myApp version: 1.0.0 url: docker.io/myapp/myimg:1.0.0 digest: sha256:1234567890abcdef1234567abcdef1234 labels: label1, label2