Skip to content

Commit e15307f

Browse files
committed
Add `skip_downloads' attribute to RegistryImageGetParams schema
See #523
1 parent 4b3e8c0 commit e15307f

File tree

4 files changed

+20
-29
lines changed

4 files changed

+20
-29
lines changed

concourse/experimental-pipeline.yml

Lines changed: 12 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,17 @@
11
resources:
2-
- name: jvm-launch-utils-git
3-
type: git
2+
- name: docker-base
3+
type: registry-image
44
source:
5-
uri: [email protected]:spring-projects/sts4.git
6-
private_key: ((rsa_id))
7-
branch: ((branch))
8-
paths:
9-
- nodejs-packages/jvm-launch-utils
10-
- name: tasks
11-
type: git
12-
source:
13-
uri: [email protected]:spring-projects/sts4.git
14-
private_key: ((rsa_id))
15-
branch: ((branch))
5+
repository: alpine
166
jobs:
177
- name: publish-jvm-launch-utils
188
plan:
19-
- aggregate:
20-
- get: jvm-launch-utils-git
21-
trigger: true
22-
- get: tasks
23-
- task: make-noise
24-
config:
25-
platform: linux
26-
image_resource:
27-
type: docker-image
28-
source:
29-
repository: ubuntu:18.04
30-
run:
31-
path: echo
32-
args:
33-
- "Hello world!"
9+
- get: docker-base
10+
trigger: true
11+
params:
12+
skip_download: true
13+
- put: docker-base
14+
get_params:
15+
skip_download: true
16+
params:
17+
image: blah

headless-services/concourse-language-server/src/main/java/org/springframework/ide/vscode/concourse/PipelineYmlSchema.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -617,6 +617,7 @@ private void initializeDefaultResourceTypes() {
617617

618618
AbstractType get = f.ybean("RegistryImageGetParams");
619619
addProp(get, "format", f.yenum("RegistryImageFormat", "rootfs", "oci"));
620+
addProp(get, "skip_download", t_boolean);
620621

621622
AbstractType put = f.ybean("RegistryImagePutParams");
622623
addProp(put, "image", t_ne_string).isPrimary(true);
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*Optional*. Default false. Skip downloading the image. Useful only to trigger a job without using the object.

headless-services/concourse-language-server/src/test/java/org/springframework/ide/vscode/concourse/ConcourseEditorTest.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,6 +1808,7 @@ public void resourceTypeAttributeReconcile() throws Exception {
18081808
" params:\n" +
18091809
" foo_param: bar\n"+
18101810
" format: rootfs\n" +
1811+
" skip_download: should-skip-dl\n" +
18111812
" tags: tags-list\n" +
18121813
" unique_version_history: is-unique-hist\n" +
18131814
" source:\n" +
@@ -1817,6 +1818,7 @@ public void resourceTypeAttributeReconcile() throws Exception {
18171818
"bad-duration|Duration",
18181819
"is-priviliged|boolean",
18191820
"foo_param|Unknown",
1821+
"should-skip-dl|boolean",
18201822
"tags-list|Sequence",
18211823
"is-unique-hist|boolean"
18221824
);
@@ -2273,15 +2275,18 @@ public void resourceAttributeHovers() throws Exception {
22732275
" - get: my-docker-image\n" +
22742276
" params:\n" +
22752277
" format: bad-format\n" +
2278+
" skip_download: is-download\n" +
22762279
" bogus: bad"
22772280
);
22782281

22792282
editor.assertProblems(
22802283
"bad-format|Valid values are: [oci, rootfs]",
2284+
"is-download|boolean",
22812285
"bogus|Unknown property"
22822286
);
22832287

22842288
editor.assertHoverContains("format", "The format to fetch as");
2289+
editor.assertHoverContains("skip_download", "Skip downloading the image");
22852290
}
22862291

22872292
@Test public void registryImageResourcePutParamsReconcileAndHovers() throws Exception {
@@ -5961,7 +5966,7 @@ public void PT_163752179_completions_confused_by_empty_lines() throws Exception
59615966
editor.assertCompletionLabels(c -> c.getLabel().startsWith("cache"), "cache", "cache_from", "cache_tag");
59625967
}
59635968
}
5964-
5969+
59655970
//////////////////////////////////////////////////////////////////////////////
59665971

59675972
private void assertContextualCompletions(String conText, String textBefore, String... textAfter) throws Exception {

0 commit comments

Comments
 (0)