Add `skip_downloads' attribute to RegistryImageGetParams schema
See https://github.com/spring-projects/sts4/issues/523
This commit is contained in:
@@ -617,6 +617,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
|
||||
AbstractType get = f.ybean("RegistryImageGetParams");
|
||||
addProp(get, "format", f.yenum("RegistryImageFormat", "rootfs", "oci"));
|
||||
addProp(get, "skip_download", t_boolean);
|
||||
|
||||
AbstractType put = f.ybean("RegistryImagePutParams");
|
||||
addProp(put, "image", t_ne_string).isPrimary(true);
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Default false. Skip downloading the image. Useful only to trigger a job without using the object.
|
||||
@@ -1808,6 +1808,7 @@ public class ConcourseEditorTest {
|
||||
" params:\n" +
|
||||
" foo_param: bar\n"+
|
||||
" format: rootfs\n" +
|
||||
" skip_download: should-skip-dl\n" +
|
||||
" tags: tags-list\n" +
|
||||
" unique_version_history: is-unique-hist\n" +
|
||||
" source:\n" +
|
||||
@@ -1817,6 +1818,7 @@ public class ConcourseEditorTest {
|
||||
"bad-duration|Duration",
|
||||
"is-priviliged|boolean",
|
||||
"foo_param|Unknown",
|
||||
"should-skip-dl|boolean",
|
||||
"tags-list|Sequence",
|
||||
"is-unique-hist|boolean"
|
||||
);
|
||||
@@ -2273,15 +2275,18 @@ public class ConcourseEditorTest {
|
||||
" - get: my-docker-image\n" +
|
||||
" params:\n" +
|
||||
" format: bad-format\n" +
|
||||
" skip_download: is-download\n" +
|
||||
" bogus: bad"
|
||||
);
|
||||
|
||||
editor.assertProblems(
|
||||
"bad-format|Valid values are: [oci, rootfs]",
|
||||
"is-download|boolean",
|
||||
"bogus|Unknown property"
|
||||
);
|
||||
|
||||
editor.assertHoverContains("format", "The format to fetch as");
|
||||
editor.assertHoverContains("skip_download", "Skip downloading the image");
|
||||
}
|
||||
|
||||
@Test public void registryImageResourcePutParamsReconcileAndHovers() throws Exception {
|
||||
@@ -5961,7 +5966,7 @@ public class ConcourseEditorTest {
|
||||
editor.assertCompletionLabels(c -> c.getLabel().startsWith("cache"), "cache", "cache_from", "cache_tag");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
private void assertContextualCompletions(String conText, String textBefore, String... textAfter) throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user