Skip to content

cloudbees-io/label-artifact-version

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CloudBees action: Manage artifact version labels

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.

Inputs

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

artifact-id

String

Yes

The unique identifier of an artifact version reported to the CloudBees platform.

labels

String

Yes

A comma-separated list of artifact labels.

operation

String

No

The labeling activity to be performed. The following options are valid:

  • ADD, to apply label(s).

  • REMOVE, to remove label(s). The default is ADD.

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-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

License

This code is made available under the MIT license.

References

About

Add or remove label(s) to an existing artifact version

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •