Skip to content

Commit 764e322

Browse files
committed
Add tags field to Bolt task metadata schema
This commit adds the `tags` field to Bolt task metadata. A description of why a `tags` field would be useful is included in the `tasks/README.md` update.
1 parent 3722883 commit 764e322

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

tasks/README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ The preferred style of the keys should be `snake_case`.
8484

8585
**remote**: Default `false`. All implementation of this task operate on a remote target using the `_target` metaparam.(rev 4)
8686

87+
**tags**: An array of strings used for arbitrary tags without inherent, semantic meaning to a task runner. Useful for categorizing tasks.
8788

8889
#### Example Task Metadata
8990

@@ -114,7 +115,8 @@ The preferred style of the keys should be `snake_case`.
114115
{"name": "foo_sh.sh", "requirements": ["shell"], "input_method": "environment"},
115116
{"name": "foo_ps1.ps1", "requirements": ["powershell"], "files": ["my_util/files/util/win_tools.ps1"]}
116117
],
117-
"files": ["my_module/lib/puppet_x/helpful_code.rb", "kitchensink/files/task_helpers/"]
118+
"files": ["my_module/lib/puppet_x/helpful_code.rb", "kitchensink/files/task_helpers/"],
119+
"tags": ["tag1", "Tag 2", "Three"]
118120
}
119121
```
120122

tasks/task.json

+7
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,13 @@
7777
"items": {
7878
"type": "object"
7979
}
80+
},
81+
"tags": {
82+
"type": "array",
83+
"items": {
84+
"type": "string"
85+
},
86+
"description": "Arbitrary tags without inherent, semantic meaning."
8087
}
8188
},
8289
"definitions": {

0 commit comments

Comments
 (0)