Add `skip_downloads' attribute to RegistryImageGetParams schema
See https://github.com/spring-projects/sts4/issues/523
This commit is contained in:
@@ -1,33 +1,17 @@
|
||||
resources:
|
||||
- name: jvm-launch-utils-git
|
||||
type: git
|
||||
- name: docker-base
|
||||
type: registry-image
|
||||
source:
|
||||
uri: git@github.com:spring-projects/sts4.git
|
||||
private_key: ((rsa_id))
|
||||
branch: ((branch))
|
||||
paths:
|
||||
- nodejs-packages/jvm-launch-utils
|
||||
- name: tasks
|
||||
type: git
|
||||
source:
|
||||
uri: git@github.com:spring-projects/sts4.git
|
||||
private_key: ((rsa_id))
|
||||
branch: ((branch))
|
||||
repository: alpine
|
||||
jobs:
|
||||
- name: publish-jvm-launch-utils
|
||||
plan:
|
||||
- aggregate:
|
||||
- get: jvm-launch-utils-git
|
||||
trigger: true
|
||||
- get: tasks
|
||||
- task: make-noise
|
||||
config:
|
||||
platform: linux
|
||||
image_resource:
|
||||
type: docker-image
|
||||
source:
|
||||
repository: ubuntu:18.04
|
||||
run:
|
||||
path: echo
|
||||
args:
|
||||
- "Hello world!"
|
||||
- get: docker-base
|
||||
trigger: true
|
||||
params:
|
||||
skip_download: true
|
||||
- put: docker-base
|
||||
get_params:
|
||||
skip_download: true
|
||||
params:
|
||||
image: blah
|
||||
|
||||
@@ -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