Use this action to report artifact-related data to an environment from a CloudBees platform workflow run, for artifact traceability purposes.
This action version (v2.0) is the most recent release of the action.
Previous releases are deprecated.
Version 2.0 replaces multiple required inputs with a single parameter, |
Prerequisites
Before using this action, you must first register the artifact you plan to deploy to an environment. This registration saves the artifact information to the CloudBees platform.
Do one of the following to save your artifact information to the platform:
-
Use the Register a build artifact action in your workflow in a step prior to using this action.
-
Add a publishing step to your workflow prior to using this action. For example, use one of the following CloudBees actions:
-
Manually create an artifact version in the UI.
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
Input name | Data type | Required? | Description |
---|---|---|---|
|
String |
Yes |
The unique identifier of the artifact ID output from the CloudBees platform. |
|
String |
Required if no job-level |
The environment where the deployment is located.
The |
|
String |
No |
A comma-separated list of artifact labels. |
Usage examples
Basic example
The following is a basic example of using the action:
jobs: register_artifact_version_to_test_env: environment: test_env steps: - name: Register deployed artifact uses: cloudbees-io/register-deployed-artifact@v2 with: artifact_id: 1234abcd-56ef-ab78-9012-cdef78903456 target-environment: test_env
Full workflow example with Kaniko
This example publishes an image with Kaniko, and then reports the data to the platform.
Full workflow example with registering a build artifact
The following workflow uses the Register a build artifact action to register the build artifact to the platform.
Then it deploys the artifact to the Docker test
target environment and publishes evidence to the platform.