Use this action to create, update, and remove labels on existing artifact versions in the CloudBees platform. To learn more about organizing your artifacts using labels, refer to Artifact labels.
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 labeling activity to be performed. The following options are valid:
|
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-ef123412abcd
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-ef123412abcd
labels: Label2,Label3
operation: REMOVE
This code is made available under the MIT license.
-
Learn more about using actions in CloudBees workflows.
-
Learn about the CloudBees platform.