artifact:remove-tag
About 285 wordsLess than 1 minute
artifact:remove-tag
When to use it: use it to clean up outdated artifact tags by convention - for example deleting the tags pointing at an old version once a new one is released, or periodically clearing temporary tags. Deleting artifacts is a sensitive operation, and this task performs it inside the platform, so no credentials need to be requested.
Applicable Events
pushcommit.addtag_pushtag_deploypull_request.mergedapi_triggerweb_triggercrontabbranch.create
Parameters
The list below gives an overview of all artifact:remove-tag parameters.
- name: Artifact package name
- tags: List of tags to remove
- type: Artifact type; only Docker and Helm are supported (default
docker)
Detailed descriptions for each parameter are provided below.
name
- type:
String - required:
true
Artifact package name.
tags
- type:
Array<string> - required:
true
List of tag names to remove.
type
- type:
String - required:
false - default:
docker
Artifact type, currently only supports Docker and Helm
Configuration Examples
.cnb.yml
main:
push:
- stages:
- name: remove tag
type: artifact:remove-tag
options:
# Package name
# Package name example 1, repository with the same name artifact: reponame
# Package name example 2, repository with a different name artifact: reponame/name
name: reponame/name
tags:
- tag1
- tag2
type: docker