Add missing attributes to GitGetParams schema
See: https://github.com/spring-projects/sts4/issues/64
This commit is contained in:
@@ -454,7 +454,10 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
AbstractType get = f.ybean("GitGetParams");
|
||||
addProp(get, "depth", t_pos_integer);
|
||||
addProp(get, "submodules", f.yany("GitSubmodules").addHints("all", "none"));
|
||||
addProp(get, "submodule_recursive", t_boolean);
|
||||
addProp(get, "submodule_remote", t_boolean);
|
||||
addProp(get, "disable_git_lfs", t_boolean);
|
||||
addProp(get, "clean_tags", t_boolean);
|
||||
addProp(get, "fetch", t_strings).isDeprecated(true); //Warning: t_strings is just a guess. This property is undocumented. The example I've seen seem to use list of git branch/tag names.
|
||||
|
||||
AbstractType put = f.ybean("GitPutParams");
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. If `true` all incoming tags will be deleted. This is useful if you want to push tags, but have reasonable doubts that the tags cached with the resource are outdated. The default value is `false`.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. If `false`, a flat submodules checkout is performed. If not specified, or if `true` is explicitly specified, a recursive checkout is performed.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. If `true`, the submodules are checked out for the specified remote branch specified in the `.gitmodules` file of the repository. If not specified, or if `false` is explicitly specified, the tracked sub-module revision of the repository is used to check out the submodules.
|
||||
@@ -1208,10 +1208,16 @@ public class ConcourseEditorTest {
|
||||
assertContextualCompletions(context,
|
||||
"<*>"
|
||||
, // ===>
|
||||
"clean_tags: <*>"
|
||||
,
|
||||
"depth: <*>"
|
||||
,
|
||||
"disable_git_lfs: <*>"
|
||||
,
|
||||
"submodule_recursive: <*>"
|
||||
,
|
||||
"submodule_remote: <*>"
|
||||
,
|
||||
"submodules:\n"+
|
||||
" <*>"
|
||||
,
|
||||
@@ -1243,12 +1249,19 @@ public class ConcourseEditorTest {
|
||||
" - get: my-git\n" +
|
||||
" params:\n" +
|
||||
" depth: -1\n" +
|
||||
" disable_git_lfs: not-bool\n" +
|
||||
" submodules: none"
|
||||
" submodules: none\n" +
|
||||
" disable_git_lfs: not-bool-a\n" +
|
||||
" submodule_recursive: not-bool-b\n" +
|
||||
" submodule_remote: not-bool-c\n" +
|
||||
" clean_tags: not-bool-d\n"
|
||||
);
|
||||
|
||||
editor.assertHoverContains("depth", "using the `--depth` option");
|
||||
editor.assertHoverContains("submodules", "If `none`, submodules will not be fetched");
|
||||
editor.assertHoverContains("submodule_recursive", "If `false`, a flat submodules checkout is performed");
|
||||
editor.assertHoverContains("submodule_remote", "If `true`, the submodules are checked out for");
|
||||
editor.assertHoverContains("disable_git_lfs", "will not fetch Git LFS files");
|
||||
editor.assertHoverContains("clean_tags", "If `true` all incoming tags will be deleted");
|
||||
}
|
||||
|
||||
@Test public void gitResourceGetParamsReconcile() throws Exception {
|
||||
@@ -1262,11 +1275,17 @@ public class ConcourseEditorTest {
|
||||
" - get: my-git\n" +
|
||||
" params:\n" +
|
||||
" depth: -1\n" +
|
||||
" disable_git_lfs: not-bool\n"
|
||||
" disable_git_lfs: not-bool-a\n" +
|
||||
" submodule_recursive: not-bool-b\n" +
|
||||
" submodule_remote: not-bool-c\n" +
|
||||
" clean_tags: not-bool-d\n"
|
||||
);
|
||||
editor.assertProblems(
|
||||
"-1|must be positive",
|
||||
"not-bool|'boolean'"
|
||||
"not-bool-a|'boolean'",
|
||||
"not-bool-b|'boolean'",
|
||||
"not-bool-c|'boolean'",
|
||||
"not-bool-d|'boolean'"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1414,8 +1433,8 @@ public class ConcourseEditorTest {
|
||||
" plan:\n" +
|
||||
" - put: my-git\n" +
|
||||
" get_params:\n" +
|
||||
" depth: 1\n" +
|
||||
" submodules: none\n" +
|
||||
" depth: 1\n" +
|
||||
" disable_git_lfs: true\n"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user