No errors for fetch param in git resource
This commit is contained in:
@@ -417,6 +417,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
addProp(get, "depth", t_pos_integer);
|
||||
addProp(get, "submodules", f.yany("GitSubmodules").addHints("all", "none"));
|
||||
addProp(get, "disable_git_lfs", t_boolean);
|
||||
addProp(get, "fetch", t_strings); //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");
|
||||
addProp(put, "repository", t_ne_string).isPrimary(true);
|
||||
|
||||
@@ -1133,6 +1133,9 @@ public class ConcourseEditorTest {
|
||||
,
|
||||
"disable_git_lfs: <*>"
|
||||
,
|
||||
"fetch:\n" +
|
||||
" - <*>"
|
||||
,
|
||||
"submodules:\n"+
|
||||
" <*>"
|
||||
);
|
||||
@@ -3739,6 +3742,28 @@ public class ConcourseEditorTest {
|
||||
);
|
||||
}
|
||||
|
||||
@Test public void gitResourceFetchParameter() throws Exception {
|
||||
Editor editor = harness.newEditor(
|
||||
"resources:\n" +
|
||||
" - name: cf-networking-dev\n" +
|
||||
" type: git\n" +
|
||||
" source:\n" +
|
||||
" uri: git@github.com:cloudfoundry-incubator/cf-networking-release.git\n" +
|
||||
" branch: develop\n" +
|
||||
" ignore_paths:\n" +
|
||||
" - docs\n" +
|
||||
" private_key: {{cf-networking-deploy-key}}\n" +
|
||||
"jobs:\n" +
|
||||
"- name: foo\n" +
|
||||
" plan:\n" +
|
||||
" - get: cf-networking-dev\n" +
|
||||
" params:\n" +
|
||||
" fetch: [master]\n" +
|
||||
" submodules: none\n"
|
||||
);
|
||||
editor.assertProblems(/*NONE*/);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void assertContextualCompletions(String conText, String textBefore, String... textAfter) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user