Add support for new properties in DockerImagePutParams
- additional_tags - cache_from - load_bases - target_name
This commit is contained in:
@@ -498,18 +498,18 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
addProp(get, "skip_download", t_boolean);
|
||||
|
||||
AbstractType put = f.ybean("DockerImagePutParams");
|
||||
//TODO 'additional_tags'
|
||||
addProp(put, "additional_tags", t_ne_string);
|
||||
addProp(put, "build", t_ne_string);
|
||||
addProp(put, "build_args", t_string_params);
|
||||
addProp(put, "build_args_file", t_ne_string);
|
||||
addProp(put, "cache", t_boolean);
|
||||
//TODO 'cache_from'
|
||||
addProp(put, "cache_from", t_strings);
|
||||
addProp(put, "cache_tag", t_ne_string);
|
||||
addProp(put, "dockerfile", t_ne_string);
|
||||
addProp(put, "import_file", t_ne_string);
|
||||
addProp(put, "load", t_ne_string);
|
||||
addProp(put, "load_base", t_ne_string);
|
||||
//TODO 'load_bases'
|
||||
addProp(put, "load_bases", t_strings);
|
||||
addProp(put, "load_file", t_ne_string);
|
||||
addProp(put, "load_repository", t_ne_string);
|
||||
addProp(put, "load_tag", t_ne_string);
|
||||
@@ -518,7 +518,7 @@ public class PipelineYmlSchema implements YamlSchema {
|
||||
addProp(put, "tag", t_ne_string);
|
||||
addProp(put, "tag_as_latest", t_boolean);
|
||||
addProp(put, "tag_prefix", t_ne_string);
|
||||
//TODO 'target_name'
|
||||
addProp(put, "target_name", t_ne_string);
|
||||
|
||||
resourceTypes.def("docker-image", source, get, put);
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Path to a space separated list of tags. The Docker build will additionally be pushed with those tags.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. An array of images to consider as cache, in order to reuse build steps from a previous build. The array elements are paths to directories generated by a get step with `save: true`. This has a similar aim of cache, but it loads the images from disk instead of pulling them from the network, so that Concourse resource caching can be used. It also allows more than one image to be specified, which is useful for multi-stage Dockerfiles. If you want to cache an image used in a `FROM` step, you should put it in `load_bases` instead.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Same as `load_base`, but takes an array to load multiple images.
|
||||
@@ -0,0 +1 @@
|
||||
*Optional*. Specify the name of the target build stage. Only supported for multi-stage Docker builds.
|
||||
@@ -1710,12 +1710,15 @@ public class ConcourseEditorTest {
|
||||
" plan:\n" +
|
||||
" - put: my-docker-image\n" +
|
||||
" params:\n" +
|
||||
" additional_tags: path/to/tags\n" +
|
||||
" build: path/to/docker/dir\n" +
|
||||
" load: path/to/image\n" +
|
||||
" dockerfile: path/to/Dockerfile\n"+
|
||||
" cache: cache-it\n" +
|
||||
" cache_tag: the-cache-tag\n" +
|
||||
" cache_from: cache-from-value\n" +
|
||||
" load_base: path/to/base-image\n" +
|
||||
" load_bases: load-bases-value\n" +
|
||||
" load_file: path/to/file-to-load\n" +
|
||||
" load_repository: some-repo\n" +
|
||||
" load_tag: some-tag\n" +
|
||||
@@ -1727,6 +1730,7 @@ public class ConcourseEditorTest {
|
||||
" tag_as_latest: tag-latest\n" +
|
||||
" build_args: the-build-args\n" +
|
||||
" build_args_file: path/to/file-with-build-args.json\n" +
|
||||
" target_name: some-build-stage\n" +
|
||||
" get_params:\n" +
|
||||
" save: save-it\n" +
|
||||
" rootfs: tar-it\n" +
|
||||
@@ -1735,6 +1739,8 @@ public class ConcourseEditorTest {
|
||||
|
||||
editor.assertProblems(
|
||||
"cache-it|'boolean'",
|
||||
"cache-from-value|Expecting a 'Sequence'",
|
||||
"load-bases-value|Expecting a 'Sequence'",
|
||||
"pull_repository|Deprecated",
|
||||
"pull_tag|Deprecated",
|
||||
"tag-latest|'boolean'",
|
||||
@@ -1764,10 +1770,13 @@ public class ConcourseEditorTest {
|
||||
editor.assertHoverContains("tag_as_latest", "tagged as `latest`");
|
||||
editor.assertHoverContains("build_args", "map of Docker build arguments");
|
||||
editor.assertHoverContains("build_args_file", "JSON file containing");
|
||||
|
||||
editor.assertHoverContains("save", "docker save");
|
||||
editor.assertHoverContains("rootfs", "a `.tar` file of the image");
|
||||
editor.assertHoverContains("skip_download", "Skip `docker pull`");
|
||||
editor.assertHoverContains("additional_tags", "Path to a space separated list of tags");
|
||||
editor.assertHoverContains("cache_from", "An array of images to consider as cache");
|
||||
editor.assertHoverContains("load_bases", "Same as `load_base`, but takes an array");
|
||||
editor.assertHoverContains("target_name", "Specify the name of the target build stage");
|
||||
}
|
||||
|
||||
@Test public void s3ResourceSourceReconcileAndHovers() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user