Add 'tags' property in 'resource' type in concourse editor schema.
This commit is contained in:
@@ -230,6 +230,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
addProp(t_resource, "type", t_resource_type_name).isRequired(true);
|
||||
addProp(t_resource, "source", resourceSource);
|
||||
addProp(t_resource, "check_every", t_duration);
|
||||
addProp(t_resource, "tags", t_strings);
|
||||
addProp(t_resource, "webhook_token", t_ne_string);
|
||||
|
||||
AbstractType t_image_resource = f.ybean("ImageResource");
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
*Optional*. A list of tags to determine which workers the checks will be performed on. You'll want to specify this if
|
||||
the source is internal to a worker's network, for example. See also [tags](https://concourse-ci.org/tags-step-modifier.html) step modifier.
|
||||
|
||||
@@ -272,6 +272,21 @@ public class ConcourseEditorTest {
|
||||
);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void resource_tags() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
"- name: abc\n" +
|
||||
" type: git\n" +
|
||||
" tags:\n"+
|
||||
" - sometag\n" +
|
||||
" - othertag\n"
|
||||
);
|
||||
editor.assertProblems("abc|Unused");
|
||||
|
||||
editor.assertHoverContains("tags", "determine which workers");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void primaryStepCompletions() throws Exception {
|
||||
assertContextualCompletions(
|
||||
@@ -3336,6 +3351,7 @@ public class ConcourseEditorTest {
|
||||
editor.assertCompletionLabels(
|
||||
//For the 'exact' context:
|
||||
"check_every",
|
||||
"tags",
|
||||
"webhook_token",
|
||||
//"name", exists
|
||||
//"source", exists
|
||||
|
||||
Reference in New Issue
Block a user