Support icon attribute on resource definitions
Resolves #303. Allows the language server to recognize the `icon` attribute supported on resources in Concourse 5.x
This commit is contained in:
@@ -236,6 +236,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
addProp(t_resource, "check_every", t_duration);
|
||||
addProp(t_resource, "tags", t_strings);
|
||||
addProp(t_resource, "webhook_token", t_ne_string);
|
||||
addProp(t_resource, "icon", t_ne_string);
|
||||
|
||||
AbstractType t_image_resource = f.ybean("ImageResource");
|
||||
{
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional* If specified, it must be the name of a [Material Design Icon](https://materialdesignicons.com) and will be rendered alongside the resource's name in the Concourse UI.
|
||||
@@ -1591,6 +1591,7 @@ public class ConcourseEditorTest {
|
||||
"resources:\n" +
|
||||
"- name: sts4\n" +
|
||||
" type: git\n" +
|
||||
" icon: foo\n" +
|
||||
" check_every: 5m\n" +
|
||||
" webhook_token: bladayadayaaa\n" +
|
||||
" source:\n" +
|
||||
@@ -1599,6 +1600,7 @@ public class ConcourseEditorTest {
|
||||
|
||||
editor.assertHoverContains("name", "The name of the resource");
|
||||
editor.assertHoverContains("type", "The type of the resource. Each worker advertises");
|
||||
editor.assertHoverContains("icon", "name of a [Material Design Icon]");
|
||||
editor.assertHoverContains("source", 2, "The location of the resource");
|
||||
editor.assertHoverContains("webhook_token", "web hooks can be sent to trigger an immediate *check* of the resource");
|
||||
editor.assertHoverContains("check_every", "The interval on which to check for new versions");
|
||||
@@ -3509,6 +3511,7 @@ public class ConcourseEditorTest {
|
||||
editor.assertCompletionLabels(
|
||||
//For the 'exact' context:
|
||||
"check_every",
|
||||
"icon",
|
||||
"tags",
|
||||
"webhook_token",
|
||||
//"name", exists
|
||||
|
||||
Reference in New Issue
Block a user