Add  'tags' property in 'resource' type in concourse
editor schema.
This commit is contained in:
Kris De Volder
2018-08-09 08:36:08 -07:00
parent 2e77214118
commit c5b6a72b3a
3 changed files with 20 additions and 0 deletions

View File

@@ -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");

View File

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

View File

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