Use this action to add and remove labels on existing artifact versions in the CloudBees platform. To learn more about organizing your artifacts using labels, refer to Artifact labels.
All CloudBees action repositories are listed at CloudBees, Inc. on GitHub. |
Inputs
Input name | Data type | Required? | Description |
---|---|---|---|
|
String |
Yes |
The unique identifier of an artifact version reported to the CloudBees platform. |
|
String |
Yes |
A comma-separated list of artifact labels. |
|
String |
No |
The labelling activity to be performed. The following options are valid:
|
Usage examples
The following basic example adds the labels For Production
and Testing Passed
to an existing artifact version:
jobs: add_labels_to_artifact_version: steps: - name: add_labels_to_artifact_version uses: cloudbees-io/label-artifact-version@v1 with: artifact-id: 1234abcd-56ef-78ab-90cd-abcdab123456 labels: For Production,Testing Passed
In the following example, an artifact version has been labelled with Label1
, Label2
, and Label3
.
Invoking this action removes the Label2
and Label3
labels, so that the artifact version remains labelled only with Label1
.
steps: - name: Unlabel an artifact version uses: cloudbees-io/label-artifact-version@v1 with: artifact-id: 1234abcd-56ef-78ab-90cd-abcdab123456 labels: Label2,Label3 operation: REMOVE