set-artifact-names
- Last updated on August 26, 2025
- •
- 1 minute to read
This task assigns names to single artifacts and artifact groups. All artifacts for which you want to set a name must be listed in inputArtifacts
.
Parameters
- Key-Value Pairs – Each parameter is a key-value pair, where:
- Key is the artifact name (e.g.,
"result"
) or a collection (e.g.,"result*"
). - Value is the assigned name, supporting argument interpolation.
- Key is the artifact name (e.g.,
- Collections – If a collection is specified (e.g.,
"result*"
), the name is assigned to each element in the collection with the element index appended (e.g.,result1
becomes"collection name (1)"
). - Override Support – You can override the name for a specific element in a collection (e.g.,
"result1": "collection name override"
).
Note
If no name is specified for an artifact, its existing name is retained.
Examples
Basic naming
This example demonstrates how to set names for both a single artifact and a collection.
{
"description": "Set names for preview and result files",
"name": "set-basic-names",
"type": "set-artifact-names",
"inputArtifacts": [
"preview",
"result*"
],
"parameters": {
"preview": "{{project.items.@.fields.previewFileName?}}",
"result*": "rendered_page_*"
}
}
Collection with override
This example shows how to assign a name to a collection and override the name for a specific element.
{
"description": "Set names for a collection with an override",
"name": "set-collection-names",
"type": "set-artifact-names",
"inputArtifacts": [
"output*"
],
"parameters": {
"output*": "final_output",
"output1": "final_output_cover"
}
}
Dynamic naming
This example uses interpolation to dynamically name artifacts based on project data.
{
"description": "Set dynamic names using project data",
"name": "set-dynamic-names",
"type": "set-artifact-names",
"inputArtifacts": [
"design",
"pages*"
],
"parameters": {
"design": "{{project.name}}_design",
"pages*": "{{project.name}}_page"
}
}