Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support multi-stage dockerbuilds via imagebuilder #18741

Merged
merged 5 commits into from
Mar 9, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ update:
$(MAKE) build
hack/update-generated-completions.sh
hack/update-generated-docs.sh
hack/update-generated-swagger-spec.sh
.PHONY: update

# Update all generated artifacts for the API
Expand All @@ -136,7 +135,7 @@ update:
update-api:
hack/update-generated-conversions.sh
hack/update-generated-defaulters.sh
hack/update-generated-swagger-descriptions.sh
hack/update-generated-deep-copies.sh
hack/update-generated-openapi.sh
$(MAKE) build
hack/update-generated-swagger-spec.sh
Expand Down
8 changes: 5 additions & 3 deletions api/docs/apis-build.openshift.io/v1.Build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,17 @@ Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-gu
</div><div style="margin-left:13px;"> <span title="(string) ref is the branch/tag/ref to build.">ref</span>:
</div><div style="margin-left:13px;"> <span title="(string) uri points to the source that will be built. The structure of the source will depend on the type of build to run">uri</span>:
</div></details><details><summary> <span title="(array) images describes a set of images to be used to provide source for the build">images</span>:
</summary><details><summary> - <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) API version of the referent.">apiVersion</span>:
</summary><details><summary> - <span title="(array) A list of image names that this source will be used in place of during a multi-stage Docker image build. For instance, a Dockerfile that uses &#34;COPY --from=nginx:latest&#34; will first check for an image source that has &#34;nginx:latest&#34; in this field before attempting to pull directly. If the Dockerfile does not reference an image source it is ignored. This field and paths may both be set, in which case the contents will be used twice.">as</span>:
</summary><div style="margin-left:13px;"> - - <span title="(string)">[string]</span>:
</div></details><details><summary> <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> <span title="(string) API version of the referent.">apiVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: &#34;spec.containers{name}&#34; (where &#34;name&#34; refers to the name of the container that triggered the event) or if no container name is specified &#34;spec.containers[2]&#34; (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.">fieldPath</span>:
</div><div style="margin-left:13px;"> <span title="(string) Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">kind</span>:
</div><div style="margin-left:13px;"> <span title="(string) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names">name</span>:
</div><div style="margin-left:13px;"> <span title="(string) Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">namespace</span>:
</div><div style="margin-left:13px;"> <span title="(string) Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency">resourceVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids">uid</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image.">paths</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image. This content will be copied into the build context prior to starting the build. If no paths are set, the build context will not be altered.">paths</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) destinationDir is the relative directory within the build directory where files copied from the image are placed.">destinationDir</span>:
</div><div style="margin-left:13px;"> <span title="(string) sourcePath is the absolute path of the file or directory inside the image to copy to the build directory. If the source path ends in /. then the content of the directory will be copied, but the directory itself will not be created at the destination.">sourcePath</span>:
</div></details><details><summary> <span title="(v1.LocalObjectReference) pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.">pullSecret</span>:
Expand Down
8 changes: 5 additions & 3 deletions api/docs/apis-build.openshift.io/v1.BuildConfig.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,17 @@ Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-gu
</div><div style="margin-left:13px;"> <span title="(string) ref is the branch/tag/ref to build.">ref</span>:
</div><div style="margin-left:13px;"> <span title="(string) uri points to the source that will be built. The structure of the source will depend on the type of build to run">uri</span>:
</div></details><details><summary> <span title="(array) images describes a set of images to be used to provide source for the build">images</span>:
</summary><details><summary> - <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) API version of the referent.">apiVersion</span>:
</summary><details><summary> - <span title="(array) A list of image names that this source will be used in place of during a multi-stage Docker image build. For instance, a Dockerfile that uses &#34;COPY --from=nginx:latest&#34; will first check for an image source that has &#34;nginx:latest&#34; in this field before attempting to pull directly. If the Dockerfile does not reference an image source it is ignored. This field and paths may both be set, in which case the contents will be used twice.">as</span>:
</summary><div style="margin-left:13px;"> - - <span title="(string)">[string]</span>:
</div></details><details><summary> <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> <span title="(string) API version of the referent.">apiVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: &#34;spec.containers{name}&#34; (where &#34;name&#34; refers to the name of the container that triggered the event) or if no container name is specified &#34;spec.containers[2]&#34; (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.">fieldPath</span>:
</div><div style="margin-left:13px;"> <span title="(string) Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">kind</span>:
</div><div style="margin-left:13px;"> <span title="(string) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names">name</span>:
</div><div style="margin-left:13px;"> <span title="(string) Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">namespace</span>:
</div><div style="margin-left:13px;"> <span title="(string) Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency">resourceVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids">uid</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image.">paths</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image. This content will be copied into the build context prior to starting the build. If no paths are set, the build context will not be altered.">paths</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) destinationDir is the relative directory within the build directory where files copied from the image are placed.">destinationDir</span>:
</div><div style="margin-left:13px;"> <span title="(string) sourcePath is the absolute path of the file or directory inside the image to copy to the build directory. If the source path ends in /. then the content of the directory will be copied, but the directory itself will not be created at the destination.">sourcePath</span>:
</div></details><details><summary> <span title="(v1.LocalObjectReference) pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.">pullSecret</span>:
Expand Down
8 changes: 5 additions & 3 deletions api/docs/oapi/v1.Build.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,17 @@ Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-gu
</div><div style="margin-left:13px;"> <span title="(string) ref is the branch/tag/ref to build.">ref</span>:
</div><div style="margin-left:13px;"> <span title="(string) uri points to the source that will be built. The structure of the source will depend on the type of build to run">uri</span>:
</div></details><details><summary> <span title="(array) images describes a set of images to be used to provide source for the build">images</span>:
</summary><details><summary> - <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) API version of the referent.">apiVersion</span>:
</summary><details><summary> - <span title="(array) A list of image names that this source will be used in place of during a multi-stage Docker image build. For instance, a Dockerfile that uses &#34;COPY --from=nginx:latest&#34; will first check for an image source that has &#34;nginx:latest&#34; in this field before attempting to pull directly. If the Dockerfile does not reference an image source it is ignored. This field and paths may both be set, in which case the contents will be used twice.">as</span>:
</summary><div style="margin-left:13px;"> - - <span title="(string)">[string]</span>:
</div></details><details><summary> <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> <span title="(string) API version of the referent.">apiVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: &#34;spec.containers{name}&#34; (where &#34;name&#34; refers to the name of the container that triggered the event) or if no container name is specified &#34;spec.containers[2]&#34; (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.">fieldPath</span>:
</div><div style="margin-left:13px;"> <span title="(string) Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">kind</span>:
</div><div style="margin-left:13px;"> <span title="(string) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names">name</span>:
</div><div style="margin-left:13px;"> <span title="(string) Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">namespace</span>:
</div><div style="margin-left:13px;"> <span title="(string) Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency">resourceVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids">uid</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image.">paths</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image. This content will be copied into the build context prior to starting the build. If no paths are set, the build context will not be altered.">paths</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) destinationDir is the relative directory within the build directory where files copied from the image are placed.">destinationDir</span>:
</div><div style="margin-left:13px;"> <span title="(string) sourcePath is the absolute path of the file or directory inside the image to copy to the build directory. If the source path ends in /. then the content of the directory will be copied, but the directory itself will not be created at the destination.">sourcePath</span>:
</div></details><details><summary> <span title="(v1.LocalObjectReference) pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.">pullSecret</span>:
Expand Down
8 changes: 5 additions & 3 deletions api/docs/oapi/v1.BuildConfig.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -146,15 +146,17 @@ Populated by the system. Read-only. More info: http://kubernetes.io/docs/user-gu
</div><div style="margin-left:13px;"> <span title="(string) ref is the branch/tag/ref to build.">ref</span>:
</div><div style="margin-left:13px;"> <span title="(string) uri points to the source that will be built. The structure of the source will depend on the type of build to run">uri</span>:
</div></details><details><summary> <span title="(array) images describes a set of images to be used to provide source for the build">images</span>:
</summary><details><summary> - <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) API version of the referent.">apiVersion</span>:
</summary><details><summary> - <span title="(array) A list of image names that this source will be used in place of during a multi-stage Docker image build. For instance, a Dockerfile that uses &#34;COPY --from=nginx:latest&#34; will first check for an image source that has &#34;nginx:latest&#34; in this field before attempting to pull directly. If the Dockerfile does not reference an image source it is ignored. This field and paths may both be set, in which case the contents will be used twice.">as</span>:
</summary><div style="margin-left:13px;"> - - <span title="(string)">[string]</span>:
</div></details><details><summary> <span title="(v1.ObjectReference) from is a reference to an ImageStreamTag, ImageStreamImage, or DockerImage to copy source from.">from</span>:
</summary><div style="margin-left:13px;"> <span title="(string) API version of the referent.">apiVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) If referring to a piece of an object instead of an entire object, this string should contain a valid JSON/Go field access statement, such as desiredState.manifest.containers[2]. For example, if the object reference is to a container within a pod, this would take on a value like: &#34;spec.containers{name}&#34; (where &#34;name&#34; refers to the name of the container that triggered the event) or if no container name is specified &#34;spec.containers[2]&#34; (container with index 2 in this pod). This syntax is chosen only to have some well-defined way of referencing a part of an object.">fieldPath</span>:
</div><div style="margin-left:13px;"> <span title="(string) Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#types-kinds">kind</span>:
</div><div style="margin-left:13px;"> <span title="(string) Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names">name</span>:
</div><div style="margin-left:13px;"> <span title="(string) Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/">namespace</span>:
</div><div style="margin-left:13px;"> <span title="(string) Specific resourceVersion to which this reference is made, if any. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#concurrency-control-and-consistency">resourceVersion</span>:
</div><div style="margin-left:13px;"> <span title="(string) UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids">uid</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image.">paths</span>:
</div></details><details><summary> <span title="(array) paths is a list of source and destination paths to copy from the image. This content will be copied into the build context prior to starting the build. If no paths are set, the build context will not be altered.">paths</span>:
</summary><div style="margin-left:13px;"> - <span title="(string) destinationDir is the relative directory within the build directory where files copied from the image are placed.">destinationDir</span>:
</div><div style="margin-left:13px;"> <span title="(string) sourcePath is the absolute path of the file or directory inside the image to copy to the build directory. If the source path ends in /. then the content of the directory will be copied, but the directory itself will not be created at the destination.">sourcePath</span>:
</div></details><details><summary> <span title="(v1.LocalObjectReference) pullSecret is a reference to a secret to be used to pull the image from a registry If the image is pulled from the OpenShift registry, this field does not need to be set.">pullSecret</span>:
Expand Down
Loading