diff --git a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml index aeb71fad1..cda25a565 100644 --- a/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspaces.v1beta1.yaml @@ -4187,6 +4187,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4236,6 +4237,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4281,6 +4283,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4339,6 +4342,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4392,6 +4396,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin - required: @@ -4409,6 +4415,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin - Custom type: string @@ -4604,6 +4611,120 @@ spec: - componentClass - embeddedResource type: object + image: + description: Allows specifying the definition of an image + for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} in + the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry + required for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the + Dockerfile from when using the Devfile Registry + as Dockerfile src. To ensure the Dockerfile + gets resolved consistently in different environments, + it is recommended to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + required: + - id + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than + one remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. + Default branch is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the + Git repository when using git as Dockerfile + src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be + initialized in the git project. Projects must + have at least one remote configured while + StarterProjects & Image Component's Git source + can only have at most one remote configured. + type: object + required: + - remotes + type: object + rootRequired: + description: "Specify if a privileged builder pod + is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can + be a full URL or a relative URI from the current + devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + required: + - imageName + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For @@ -4874,6 +4995,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4921,6 +5043,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4981,6 +5104,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -5032,6 +5156,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant free-form @@ -5045,6 +5171,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring devworkspace-related @@ -5228,6 +5355,126 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to + the dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The + src in the OCI registry required + for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL + to pull the Dockerfile from when + using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets + resolved consistently in different + environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the + project should be checked out. Required + if there are more than one remote + configured + properties: + remote: + description: The remote name should + be used as init. Required if + there are more than one remote + configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, + tag or commit id. Default branch + is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the git + project. Projects must have at least + one remote configured while StarterProjects + & Image Component's Git source can + only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI + from the current devfile as the base + URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given @@ -5623,6 +5870,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5669,6 +5917,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5728,6 +5977,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -5778,6 +6028,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin properties: @@ -5793,6 +6045,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin type: string container: @@ -5968,6 +6221,118 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition of an + image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the + dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} + in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that + contains a Dockerfile. The src in the + OCI registry required for the Dockerfile + build will be downloaded for building + the image. + type: string + registryUrl: + description: Devfile Registry URL to pull + the Dockerfile from when using the Devfile + Registry as Dockerfile src. To ensure + the Dockerfile gets resolved consistently + in different environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project + should be checked out. Required if there + are more than one remote configured + properties: + remote: + description: The remote name should + be used as init. Required if there + are more than one remote configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, tag or + commit id. Default branch is used + if missing or specified revision is + not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using git as + Dockerfile src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should + be initialized in the git project. Projects + must have at least one remote configured + while StarterProjects & Image Component's + Git source can only have at most one remote + configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged builder + pod is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI from + the current devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. @@ -6244,6 +6609,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -6291,6 +6657,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -6353,6 +6720,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -6407,6 +6775,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant @@ -6420,6 +6790,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring @@ -6615,6 +6986,130 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply + to the dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile + Registry source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. + The src in the OCI registry + required for the Dockerfile + build will be downloaded for + building the image. + type: string + registryUrl: + description: Devfile Registry + URL to pull the Dockerfile from + when using the Devfile Registry + as Dockerfile src. To ensure + the Dockerfile gets resolved + consistently in different environments, + it is recommended to always + specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what + the project should be checked + out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name + should be used as init. + Required if there are more + than one remote configured + type: string + revision: + description: The revision + to checkout from. Should + be branch name, tag or commit + id. Default branch is used + if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the + git project. Projects must have + at least one remote configured + while StarterProjects & Image + Component's Git source can only + have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative + URI from the current devfile as + the base URI. + type: string + type: object + imageName: + description: Name of the image for the + resulting outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given @@ -6999,8 +7494,9 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least - one remote configured while StarterProjects can - only have at most one remote configured. + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. type: object type: object name: @@ -7077,8 +7573,9 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least - one remote configured while StarterProjects can - only have at most one remote configured. + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. type: object type: object name: @@ -7183,8 +7680,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object required: - remotes @@ -7270,8 +7767,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object required: - remotes diff --git a/crds/workspace.devfile.io_devworkspaces.yaml b/crds/workspace.devfile.io_devworkspaces.yaml index 55e1e5093..95b16f85e 100644 --- a/crds/workspace.devfile.io_devworkspaces.yaml +++ b/crds/workspace.devfile.io_devworkspaces.yaml @@ -4185,6 +4185,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4234,6 +4235,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4279,6 +4281,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4337,6 +4340,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4390,6 +4394,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin - required: @@ -4407,6 +4413,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin - Custom type: string @@ -4605,6 +4612,120 @@ spec: - componentClass - embeddedResource type: object + image: + description: Allows specifying the definition of an image + for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} in + the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry + required for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the + Dockerfile from when using the Devfile Registry + as Dockerfile src. To ensure the Dockerfile + gets resolved consistently in different environments, + it is recommended to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + required: + - id + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than + one remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. + Default branch is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the + Git repository when using git as Dockerfile + src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be + initialized in the git project. Projects must + have at least one remote configured while + StarterProjects & Image Component's Git source + can only have at most one remote configured. + type: object + required: + - remotes + type: object + rootRequired: + description: "Specify if a privileged builder pod + is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can + be a full URL or a relative URI from the current + devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + required: + - imageName + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For @@ -4879,6 +5000,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4926,6 +5048,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4986,6 +5109,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -5037,6 +5161,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant free-form @@ -5050,6 +5176,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring devworkspace-related @@ -5233,6 +5360,126 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to + the dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The + src in the OCI registry required + for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL + to pull the Dockerfile from when + using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets + resolved consistently in different + environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the + project should be checked out. Required + if there are more than one remote + configured + properties: + remote: + description: The remote name should + be used as init. Required if + there are more than one remote + configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, + tag or commit id. Default branch + is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the git + project. Projects must have at least + one remote configured while StarterProjects + & Image Component's Git source can + only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI + from the current devfile as the base + URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given @@ -5628,6 +5875,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5674,6 +5922,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5733,6 +5982,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -5783,6 +6033,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin properties: @@ -5798,6 +6050,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin type: string container: @@ -5973,6 +6226,118 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition of an + image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the + dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} + in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that + contains a Dockerfile. The src in the + OCI registry required for the Dockerfile + build will be downloaded for building + the image. + type: string + registryUrl: + description: Devfile Registry URL to pull + the Dockerfile from when using the Devfile + Registry as Dockerfile src. To ensure + the Dockerfile gets resolved consistently + in different environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project + should be checked out. Required if there + are more than one remote configured + properties: + remote: + description: The remote name should + be used as init. Required if there + are more than one remote configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, tag or + commit id. Default branch is used + if missing or specified revision is + not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using git as + Dockerfile src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should + be initialized in the git project. Projects + must have at least one remote configured + while StarterProjects & Image Component's + Git source can only have at most one remote + configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged builder + pod is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI from + the current devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. @@ -6249,6 +6614,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -6296,6 +6662,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -6358,6 +6725,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -6412,6 +6780,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant @@ -6425,6 +6795,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring @@ -6620,6 +6991,130 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply + to the dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile + Registry source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. + The src in the OCI registry + required for the Dockerfile + build will be downloaded for + building the image. + type: string + registryUrl: + description: Devfile Registry + URL to pull the Dockerfile from + when using the Devfile Registry + as Dockerfile src. To ensure + the Dockerfile gets resolved + consistently in different environments, + it is recommended to always + specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what + the project should be checked + out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name + should be used as init. + Required if there are more + than one remote configured + type: string + revision: + description: The revision + to checkout from. Should + be branch name, tag or commit + id. Default branch is used + if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the + git project. Projects must have + at least one remote configured + while StarterProjects & Image + Component's Git source can only + have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative + URI from the current devfile as + the base URI. + type: string + type: object + imageName: + description: Name of the image for the + resulting outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given @@ -7004,8 +7499,9 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least - one remote configured while StarterProjects can - only have at most one remote configured. + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. type: object type: object name: @@ -7082,8 +7578,9 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least - one remote configured while StarterProjects can - only have at most one remote configured. + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. type: object type: object name: @@ -7188,8 +7685,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object required: - remotes @@ -7275,8 +7772,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object required: - remotes diff --git a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml index 66719ce21..db000a11e 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.v1beta1.yaml @@ -3960,6 +3960,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4007,6 +4008,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4051,6 +4053,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4106,6 +4109,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4156,6 +4160,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin - required: @@ -4173,6 +4179,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin - Custom type: string @@ -4361,6 +4368,119 @@ spec: - componentClass - embeddedResource type: object + image: + description: Allows specifying the definition of an image for + outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish build + context. Defaults to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry required + for the Dockerfile build will be downloaded for + building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the Dockerfile + from when using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets resolved consistently + in different environments, it is recommended to + always specify the `devfileRegistryUrl` when `Id` + is used. + type: string + required: + - id + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the Git + repository when using git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Projects must have at least + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. + type: object + required: + - remotes + type: object + rootRequired: + description: "Specify if a privileged builder pod is + required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can be + a full URL or a relative URI from the current devfile + as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + required: + - imageName + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows @@ -4622,6 +4742,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4668,6 +4789,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4727,6 +4849,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -4778,6 +4901,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant free-form @@ -4791,6 +4916,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring devworkspace-related @@ -4967,6 +5093,120 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition of an + image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type + build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the + dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} + in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The src + in the OCI registry required for the + Dockerfile build will be downloaded + for building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull + the Dockerfile from when using the Devfile + Registry as Dockerfile src. To ensure + the Dockerfile gets resolved consistently + in different environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project + should be checked out. Required if there + are more than one remote configured + properties: + remote: + description: The remote name should + be used as init. Required if there + are more than one remote configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, tag + or commit id. Default branch is + used if missing or specified revision + is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using git + as Dockerfile src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should + be initialized in the git project. Projects + must have at least one remote configured + while StarterProjects & Image Component's + Git source can only have at most one + remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged builder + pod is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI from + the current devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. @@ -5344,6 +5584,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5388,6 +5629,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5444,6 +5686,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -5493,6 +5736,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin properties: @@ -5508,6 +5753,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin type: string container: @@ -5677,6 +5923,114 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition of an image + for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} in + the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry + required for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the + Dockerfile from when using the Devfile Registry + as Dockerfile src. To ensure the Dockerfile + gets resolved consistently in different environments, + it is recommended to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than + one remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. + Default branch is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the + Git repository when using git as Dockerfile + src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be + initialized in the git project. Projects must + have at least one remote configured while + StarterProjects & Image Component's Git source + can only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged builder pod + is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can + be a full URL or a relative URI from the current + devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For @@ -5945,6 +6299,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5992,6 +6347,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -6052,6 +6408,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -6103,6 +6460,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant free-form @@ -6116,6 +6475,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring devworkspace-related @@ -6299,6 +6659,126 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to + the dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The + src in the OCI registry required + for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL + to pull the Dockerfile from when + using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets + resolved consistently in different + environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the + project should be checked out. Required + if there are more than one remote + configured + properties: + remote: + description: The remote name should + be used as init. Required if + there are more than one remote + configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, + tag or commit id. Default branch + is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the git + project. Projects must have at least + one remote configured while StarterProjects + & Image Component's Git source can + only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI + from the current devfile as the base + URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given @@ -6666,8 +7146,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object type: object name: @@ -6743,8 +7223,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object type: object name: @@ -6846,8 +7326,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one remote - configured while StarterProjects can only have at most - one remote configured. + configured while StarterProjects & Image Component's Git + source can only have at most one remote configured. type: object required: - remotes @@ -6931,8 +7411,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one remote - configured while StarterProjects can only have at most - one remote configured. + configured while StarterProjects & Image Component's Git + source can only have at most one remote configured. type: object required: - remotes diff --git a/crds/workspace.devfile.io_devworkspacetemplates.yaml b/crds/workspace.devfile.io_devworkspacetemplates.yaml index 9f99201de..329899038 100644 --- a/crds/workspace.devfile.io_devworkspacetemplates.yaml +++ b/crds/workspace.devfile.io_devworkspacetemplates.yaml @@ -3958,6 +3958,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4005,6 +4006,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4049,6 +4051,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4104,6 +4107,7 @@ spec: - run - test - debug + - deploy type: string required: - kind @@ -4154,6 +4158,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin - required: @@ -4171,6 +4177,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin - Custom type: string @@ -4362,6 +4369,119 @@ spec: - componentClass - embeddedResource type: object + image: + description: Allows specifying the definition of an image for + outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish build + context. Defaults to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry required + for the Dockerfile build will be downloaded for + building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the Dockerfile + from when using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets resolved consistently + in different environments, it is recommended to + always specify the `devfileRegistryUrl` when `Id` + is used. + type: string + required: + - id + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more than + one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than one + remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. Default + branch is used if missing or specified revision + is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the Git + repository when using git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be initialized + in the git project. Projects must have at least + one remote configured while StarterProjects & + Image Component's Git source can only have at + most one remote configured. + type: object + required: + - remotes + type: object + rootRequired: + description: "Specify if a privileged builder pod is + required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can be + a full URL or a relative URI from the current devfile + as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + required: + - imageName + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows @@ -4627,6 +4747,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4673,6 +4794,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -4732,6 +4854,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -4783,6 +4906,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant free-form @@ -4796,6 +4921,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring devworkspace-related @@ -4972,6 +5098,120 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition of an + image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type + build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the + dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} + in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The src + in the OCI registry required for the + Dockerfile build will be downloaded + for building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull + the Dockerfile from when using the Devfile + Registry as Dockerfile src. To ensure + the Dockerfile gets resolved consistently + in different environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project + should be checked out. Required if there + are more than one remote configured + properties: + remote: + description: The remote name should + be used as init. Required if there + are more than one remote configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, tag + or commit id. Default branch is + used if missing or specified revision + is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using git + as Dockerfile src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should + be initialized in the git project. Projects + must have at least one remote configured + while StarterProjects & Image Component's + Git source can only have at most one + remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged builder + pod is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI from + the current devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. @@ -5349,6 +5589,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5393,6 +5634,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5449,6 +5691,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -5498,6 +5741,8 @@ spec: - openshift - required: - volume + - required: + - image - required: - plugin properties: @@ -5513,6 +5758,7 @@ spec: - Kubernetes - Openshift - Volume + - Image - Plugin type: string container: @@ -5682,6 +5928,114 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition of an image + for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to the dockerfile + build. + items: + type: string + type: array + buildContext: + description: Path of source directory to establish + build context. Defaults to ${PROJECT_ROOT} in + the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry source + properties: + id: + description: Id in a devfile registry that contains + a Dockerfile. The src in the OCI registry + required for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL to pull the + Dockerfile from when using the Devfile Registry + as Dockerfile src. To ensure the Dockerfile + gets resolved consistently in different environments, + it is recommended to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the project should + be checked out. Required if there are more + than one remote configured + properties: + remote: + description: The remote name should be used + as init. Required if there are more than + one remote configured + type: string + revision: + description: The revision to checkout from. + Should be branch name, tag or commit id. + Default branch is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile in the + Git repository when using git as Dockerfile + src. Defaults to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which should be + initialized in the git project. Projects must + have at least one remote configured while + StarterProjects & Image Component's Git source + can only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged builder pod + is required. \n Default value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. It can + be a full URL or a relative URI from the current + devfile as the base URI. + type: string + type: object + imageName: + description: Name of the image for the resulting outerloop + build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For @@ -5950,6 +6304,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -5997,6 +6352,7 @@ spec: - run - test - debug + - deploy type: string type: object label: @@ -6057,6 +6413,7 @@ spec: - run - test - debug + - deploy type: string type: object hotReloadCapable: @@ -6108,6 +6465,8 @@ spec: - openshift - required: - volume + - required: + - image properties: attributes: description: Map of implementation-dependant free-form @@ -6121,6 +6480,7 @@ spec: - Kubernetes - Openshift - Volume + - Image type: string container: description: Allows adding and configuring devworkspace-related @@ -6304,6 +6664,126 @@ spec: type: object type: array type: object + image: + description: Allows specifying the definition + of an image for outer loop builds + oneOf: + - required: + - dockerfile + properties: + dockerfile: + description: Allows specifying dockerfile + type build + oneOf: + - required: + - uri + - required: + - devfileRegistry + - required: + - git + properties: + args: + description: The arguments to supply to + the dockerfile build. + items: + type: string + type: array + buildContext: + description: Path of source directory + to establish build context. Defaults + to ${PROJECT_ROOT} in the container + type: string + devfileRegistry: + description: Dockerfile's Devfile Registry + source + properties: + id: + description: Id in a devfile registry + that contains a Dockerfile. The + src in the OCI registry required + for the Dockerfile build will be + downloaded for building the image. + type: string + registryUrl: + description: Devfile Registry URL + to pull the Dockerfile from when + using the Devfile Registry as Dockerfile + src. To ensure the Dockerfile gets + resolved consistently in different + environments, it is recommended + to always specify the `devfileRegistryUrl` + when `Id` is used. + type: string + type: object + git: + description: Dockerfile's Git source + properties: + checkoutFrom: + description: Defines from what the + project should be checked out. Required + if there are more than one remote + configured + properties: + remote: + description: The remote name should + be used as init. Required if + there are more than one remote + configured + type: string + revision: + description: The revision to checkout + from. Should be branch name, + tag or commit id. Default branch + is used if missing or specified + revision is not found. + type: string + type: object + fileLocation: + description: Location of the Dockerfile + in the Git repository when using + git as Dockerfile src. Defaults + to Dockerfile. + type: string + remotes: + additionalProperties: + type: string + description: The remotes map which + should be initialized in the git + project. Projects must have at least + one remote configured while StarterProjects + & Image Component's Git source can + only have at most one remote configured. + type: object + type: object + rootRequired: + description: "Specify if a privileged + builder pod is required. \n Default + value is `false`" + type: boolean + srcType: + description: Type of Dockerfile src + enum: + - Uri + - DevfileRegistry + - Git + type: string + uri: + description: URI Reference of a Dockerfile. + It can be a full URL or a relative URI + from the current devfile as the base + URI. + type: string + type: object + imageName: + description: Name of the image for the resulting + outerloop build + type: string + imageType: + description: Type of image + enum: + - Dockerfile + type: string + type: object kubernetes: description: Allows importing into the devworkspace the Kubernetes resources defined in a given @@ -6671,8 +7151,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object type: object name: @@ -6748,8 +7228,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one - remote configured while StarterProjects can only have - at most one remote configured. + remote configured while StarterProjects & Image Component's + Git source can only have at most one remote configured. type: object type: object name: @@ -6851,8 +7331,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one remote - configured while StarterProjects can only have at most - one remote configured. + configured while StarterProjects & Image Component's Git + source can only have at most one remote configured. type: object required: - remotes @@ -6936,8 +7416,8 @@ spec: type: string description: The remotes map which should be initialized in the git project. Projects must have at least one remote - configured while StarterProjects can only have at most - one remote configured. + configured while StarterProjects & Image Component's Git + source can only have at most one remote configured. type: object required: - remotes diff --git a/pkg/apis/workspaces/v1alpha1/commands_conversion.go b/pkg/apis/workspaces/v1alpha1/commands_conversion.go index 90afd7dd7..878b448d6 100644 --- a/pkg/apis/workspaces/v1alpha1/commands_conversion.go +++ b/pkg/apis/workspaces/v1alpha1/commands_conversion.go @@ -40,8 +40,36 @@ func convertCommandTo_v1alpha2(src *Command, dest *v1alpha2.Command) error { return nil } +// getGroup returns the group the command belongs to +func getGroup(dc v1alpha2.Command) *v1alpha2.CommandGroup { + switch { + case dc.Composite != nil: + return dc.Composite.Group + case dc.Exec != nil: + return dc.Exec.Group + case dc.Apply != nil: + return dc.Apply.Group + case dc.Custom != nil: + return dc.Custom.Group + + default: + return nil + } +} + func convertCommandFrom_v1alpha2(src *v1alpha2.Command, dest *Command) error { + if src == nil { + return nil + } + id := src.Key() + + srcCmdGroup := getGroup(*src) + if srcCmdGroup != nil && srcCmdGroup.Kind == v1alpha2.DeployCommandGroupKind { + // skip converting deploy kind commands as deploy kind commands are not supported in v1alpha1 + return nil + } + jsonCommand, err := json.Marshal(src) if err != nil { return err diff --git a/pkg/apis/workspaces/v1alpha1/commands_conversion_test.go b/pkg/apis/workspaces/v1alpha1/commands_conversion_test.go index 24cb00957..d33e6e801 100644 --- a/pkg/apis/workspaces/v1alpha1/commands_conversion_test.go +++ b/pkg/apis/workspaces/v1alpha1/commands_conversion_test.go @@ -33,3 +33,30 @@ func TestCommandConversion_v1alpha1(t *testing.T) { } } } + +func TestCommandConversionFrom_v1alpha2(t *testing.T) { + + src := &v1alpha2.Command{ + Id: "test1", + CommandUnion: v1alpha2.CommandUnion{ + Exec: &v1alpha2.ExecCommand{ + LabeledCommand: v1alpha2.LabeledCommand{ + BaseCommand: v1alpha2.BaseCommand{ + Group: &v1alpha2.CommandGroup{ + Kind: v1alpha2.DeployCommandGroupKind, + }, + }, + }, + }, + }, + } + + output := &Command{} + + err := convertCommandFrom_v1alpha2(src, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + + assert.Equal(t, &Command{}, output, "Conversion from v1alpha2 should be skipped for deploy kind command") +} diff --git a/pkg/apis/workspaces/v1alpha1/components_conversion.go b/pkg/apis/workspaces/v1alpha1/components_conversion.go index 566f7193e..0398eb256 100644 --- a/pkg/apis/workspaces/v1alpha1/components_conversion.go +++ b/pkg/apis/workspaces/v1alpha1/components_conversion.go @@ -31,6 +31,9 @@ func convertComponentFrom_v1alpha2(src *v1alpha2.Component, dest *Component) err if src.Plugin != nil { // Need to handle plugin components separately. return convertPluginComponentFrom_v1alpha2(src, dest) + } else if src.Image != nil { + // Skip converting an Image component since v1alpha1 does not have an Image component + return nil } name := src.Key() jsonComponent, err := json.Marshal(src) diff --git a/pkg/apis/workspaces/v1alpha1/components_conversion_test.go b/pkg/apis/workspaces/v1alpha1/components_conversion_test.go index e658b7ab6..95be9ca7b 100644 --- a/pkg/apis/workspaces/v1alpha1/components_conversion_test.go +++ b/pkg/apis/workspaces/v1alpha1/components_conversion_test.go @@ -36,3 +36,25 @@ func TestComponentConversion_v1alpha1(t *testing.T) { } } } + +func TestComponentConversionFrom_v1alpha2(t *testing.T) { + + src := &v1alpha2.Component{ + Name: "test1", + ComponentUnion: v1alpha2.ComponentUnion{ + Image: &v1alpha2.ImageComponent{ + Image: v1alpha2.Image{ + ImageName: "image:latest", + }, + }, + }, + } + output := &Component{} + + err := convertComponentFrom_v1alpha2(src, output) + if !assert.NoError(t, err, "Should not return error when converting from v1alpha2") { + return + } + + assert.Equal(t, &Component{}, output, "Conversion from v1alpha2 should be skipped for Image Component") +} diff --git a/pkg/apis/workspaces/v1alpha2/commands.go b/pkg/apis/workspaces/v1alpha2/commands.go index fe6883e79..6698a1d30 100644 --- a/pkg/apis/workspaces/v1alpha2/commands.go +++ b/pkg/apis/workspaces/v1alpha2/commands.go @@ -18,14 +18,15 @@ const ( ) // CommandGroupKind describes the kind of command group. -// +kubebuilder:validation:Enum=build;run;test;debug +// +kubebuilder:validation:Enum=build;run;test;debug;deploy type CommandGroupKind string const ( - BuildCommandGroupKind CommandGroupKind = "build" - RunCommandGroupKind CommandGroupKind = "run" - TestCommandGroupKind CommandGroupKind = "test" - DebugCommandGroupKind CommandGroupKind = "debug" + BuildCommandGroupKind CommandGroupKind = "build" + RunCommandGroupKind CommandGroupKind = "run" + TestCommandGroupKind CommandGroupKind = "test" + DebugCommandGroupKind CommandGroupKind = "debug" + DeployCommandGroupKind CommandGroupKind = "deploy" ) type CommandGroup struct { diff --git a/pkg/apis/workspaces/v1alpha2/component_image.go b/pkg/apis/workspaces/v1alpha2/component_image.go new file mode 100644 index 000000000..c6e7e6b77 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha2/component_image.go @@ -0,0 +1,38 @@ +package v1alpha2 + +// ImageType describes the type of image. +// Only one of the following image type may be specified. +// +kubebuilder:validation:Enum=Dockerfile +type ImageType string + +const ( + DockerfileImageType ImageType = "Dockerfile" +) + +type BaseImage struct { +} + +// Component that allows the developer to build a runtime image for outerloop +type ImageComponent struct { + BaseComponent `json:",inline"` + Image `json:",inline"` +} + +type Image struct { + // Name of the image for the resulting outerloop build + ImageName string `json:"imageName"` + ImageUnion `json:",inline"` +} + +// +union +type ImageUnion struct { + // Type of image + // + // +unionDiscriminator + // +optional + ImageType ImageType `json:"imageType,omitempty"` + + // Allows specifying dockerfile type build + // +optional + Dockerfile *DockerfileImage `json:"dockerfile,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha2/component_image_dockerfile.go b/pkg/apis/workspaces/v1alpha2/component_image_dockerfile.go new file mode 100644 index 000000000..4743825e2 --- /dev/null +++ b/pkg/apis/workspaces/v1alpha2/component_image_dockerfile.go @@ -0,0 +1,81 @@ +package v1alpha2 + +// DockerfileSrcType describes the type of +// the src for the Dockerfile outerloop build. +// Only one of the following location type may be specified. +// +kubebuilder:validation:Enum=Uri;DevfileRegistry;Git +type DockerfileSrcType string + +const ( + UriLikeDockerfileSrcType DockerfileSrcType = "Uri" + DevfileRegistryLikeDockerfileSrcType DockerfileSrcType = "DevfileRegistry" + GitLikeDockerfileSrcType DockerfileSrcType = "Git" +) + +// Dockerfile Image type to specify the outerloop build using a Dockerfile +type DockerfileImage struct { + BaseImage `json:",inline"` + DockerfileSrc `json:",inline"` + Dockerfile `json:",inline"` +} + +// +union +type DockerfileSrc struct { + // Type of Dockerfile src + // + + // +unionDiscriminator + // +optional + SrcType DockerfileSrcType `json:"srcType,omitempty"` + + // URI Reference of a Dockerfile. + // It can be a full URL or a relative URI from the current devfile as the base URI. + // +optional + Uri string `json:"uri,omitempty"` + + // Dockerfile's Devfile Registry source + // +optional + DevfileRegistry *DockerfileDevfileRegistrySource `json:"devfileRegistry,omitempty"` + + // Dockerfile's Git source + // +optional + Git *DockerfileGitProjectSource `json:"git,omitempty"` +} + +type Dockerfile struct { + // Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container + // +optional + BuildContext string `json:"buildContext,omitempty"` + + // The arguments to supply to the dockerfile build. + // +optional + Args []string `json:"args,omitempty" patchStrategy:"replace"` + + // Specify if a privileged builder pod is required. + // + // Default value is `false` + // +optional + RootRequired *bool `json:"rootRequired,omitempty"` +} + +type DockerfileDevfileRegistrySource struct { + // Id in a devfile registry that contains a Dockerfile. The src in the OCI registry + // required for the Dockerfile build will be downloaded for building the image. + Id string `json:"id"` + + // Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. + // To ensure the Dockerfile gets resolved consistently in different environments, + // it is recommended to always specify the `devfileRegistryUrl` when `Id` is used. + // +optional + RegistryUrl string `json:"registryUrl,omitempty"` +} + +type DockerfileGitProjectSource struct { + // Git src for the Dockerfile build. The src required for the Dockerfile build will need to be + // cloned for building the image. + GitProjectSource `json:",inline"` + + // Location of the Dockerfile in the Git repository when using git as Dockerfile src. + // Defaults to Dockerfile. + // +optional + FileLocation string `json:"fileLocation,omitempty"` +} diff --git a/pkg/apis/workspaces/v1alpha2/components.go b/pkg/apis/workspaces/v1alpha2/components.go index 208499234..9356aa655 100644 --- a/pkg/apis/workspaces/v1alpha2/components.go +++ b/pkg/apis/workspaces/v1alpha2/components.go @@ -7,7 +7,7 @@ import ( // ComponentType describes the type of component. // Only one of the following component type may be specified. -// +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume;Plugin;Custom +// +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume;Image;Plugin;Custom type ComponentType string const ( @@ -16,6 +16,7 @@ const ( OpenshiftComponentType ComponentType = "Openshift" PluginComponentType ComponentType = "Plugin" VolumeComponentType ComponentType = "Volume" + ImageComponentType ComponentType = "Image" CustomComponentType ComponentType = "Custom" ) @@ -72,6 +73,10 @@ type ComponentUnion struct { // +optional Volume *VolumeComponent `json:"volume,omitempty"` + // Allows specifying the definition of an image for outer loop builds + // +optional + Image *ImageComponent `json:"image,omitempty"` + // Allows importing a plugin. // // Plugins are mainly imported devfiles that contribute components, commands diff --git a/pkg/apis/workspaces/v1alpha2/projects.go b/pkg/apis/workspaces/v1alpha2/projects.go index eafa40ae0..9348d4d68 100644 --- a/pkg/apis/workspaces/v1alpha2/projects.go +++ b/pkg/apis/workspaces/v1alpha2/projects.go @@ -110,7 +110,7 @@ type GitLikeProjectSource struct { CheckoutFrom *CheckoutFrom `json:"checkoutFrom,omitempty"` // The remotes map which should be initialized in the git project. - // Projects must have at least one remote configured while StarterProjects can only have at most one remote configured. + // Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured. Remotes map[string]string `json:"remotes"` } diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go b/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go index 983f3ec20..ee9afdfbb 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.deepcopy.go @@ -213,6 +213,66 @@ func (in *BaseComponentPluginOverrideParentOverride) DeepCopy() *BaseComponentPl return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BaseImage) DeepCopyInto(out *BaseImage) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseImage. +func (in *BaseImage) DeepCopy() *BaseImage { + if in == nil { + return nil + } + out := new(BaseImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BaseImageParentOverride) DeepCopyInto(out *BaseImageParentOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseImageParentOverride. +func (in *BaseImageParentOverride) DeepCopy() *BaseImageParentOverride { + if in == nil { + return nil + } + out := new(BaseImageParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BaseImagePluginOverride) DeepCopyInto(out *BaseImagePluginOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseImagePluginOverride. +func (in *BaseImagePluginOverride) DeepCopy() *BaseImagePluginOverride { + if in == nil { + return nil + } + out := new(BaseImagePluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *BaseImagePluginOverrideParentOverride) DeepCopyInto(out *BaseImagePluginOverrideParentOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new BaseImagePluginOverrideParentOverride. +func (in *BaseImagePluginOverrideParentOverride) DeepCopy() *BaseImagePluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(BaseImagePluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *CheckoutFrom) DeepCopyInto(out *CheckoutFrom) { *out = *in @@ -243,6 +303,36 @@ func (in *CheckoutFromParentOverride) DeepCopy() *CheckoutFromParentOverride { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CheckoutFromPluginOverride) DeepCopyInto(out *CheckoutFromPluginOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckoutFromPluginOverride. +func (in *CheckoutFromPluginOverride) DeepCopy() *CheckoutFromPluginOverride { + if in == nil { + return nil + } + out := new(CheckoutFromPluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CheckoutFromPluginOverrideParentOverride) DeepCopyInto(out *CheckoutFromPluginOverrideParentOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CheckoutFromPluginOverrideParentOverride. +func (in *CheckoutFromPluginOverrideParentOverride) DeepCopy() *CheckoutFromPluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(CheckoutFromPluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Command) DeepCopyInto(out *Command) { *out = *in @@ -570,6 +660,36 @@ func (in *CommonProjectSourceParentOverride) DeepCopy() *CommonProjectSourcePare return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CommonProjectSourcePluginOverride) DeepCopyInto(out *CommonProjectSourcePluginOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonProjectSourcePluginOverride. +func (in *CommonProjectSourcePluginOverride) DeepCopy() *CommonProjectSourcePluginOverride { + if in == nil { + return nil + } + out := new(CommonProjectSourcePluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *CommonProjectSourcePluginOverrideParentOverride) DeepCopyInto(out *CommonProjectSourcePluginOverrideParentOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CommonProjectSourcePluginOverrideParentOverride. +func (in *CommonProjectSourcePluginOverrideParentOverride) DeepCopy() *CommonProjectSourcePluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(CommonProjectSourcePluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Component) DeepCopyInto(out *Component) { *out = *in @@ -685,6 +805,11 @@ func (in *ComponentUnion) DeepCopyInto(out *ComponentUnion) { *out = new(VolumeComponent) (*in).DeepCopyInto(*out) } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(ImageComponent) + (*in).DeepCopyInto(*out) + } if in.Plugin != nil { in, out := &in.Plugin, &out.Plugin *out = new(PluginComponent) @@ -730,6 +855,11 @@ func (in *ComponentUnionParentOverride) DeepCopyInto(out *ComponentUnionParentOv *out = new(VolumeComponentParentOverride) (*in).DeepCopyInto(*out) } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(ImageComponentParentOverride) + (*in).DeepCopyInto(*out) + } if in.Plugin != nil { in, out := &in.Plugin, &out.Plugin *out = new(PluginComponentParentOverride) @@ -770,6 +900,11 @@ func (in *ComponentUnionPluginOverride) DeepCopyInto(out *ComponentUnionPluginOv *out = new(VolumeComponentPluginOverride) (*in).DeepCopyInto(*out) } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(ImageComponentPluginOverride) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentUnionPluginOverride. @@ -805,6 +940,11 @@ func (in *ComponentUnionPluginOverrideParentOverride) DeepCopyInto(out *Componen *out = new(VolumeComponentPluginOverrideParentOverride) (*in).DeepCopyInto(*out) } + if in.Image != nil { + in, out := &in.Image, &out.Image + *out = new(ImageComponentPluginOverrideParentOverride) + (*in).DeepCopyInto(*out) + } } // DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ComponentUnionPluginOverrideParentOverride. @@ -1536,301 +1676,697 @@ func (in *DevWorkspaceTemplateSpecContent) DeepCopy() *DevWorkspaceTemplateSpecC } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Endpoint) DeepCopyInto(out *Endpoint) { +func (in *Dockerfile) DeepCopyInto(out *Dockerfile) { *out = *in - if in.Secure != nil { - in, out := &in.Secure, &out.Secure + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RootRequired != nil { + in, out := &in.RootRequired, &out.RootRequired *out = new(bool) **out = **in } - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make(attributes.Attributes, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. -func (in *Endpoint) DeepCopy() *Endpoint { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Dockerfile. +func (in *Dockerfile) DeepCopy() *Dockerfile { if in == nil { return nil } - out := new(Endpoint) + out := new(Dockerfile) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointParentOverride) DeepCopyInto(out *EndpointParentOverride) { +func (in *DockerfileDevfileRegistrySource) DeepCopyInto(out *DockerfileDevfileRegistrySource) { *out = *in - if in.Secure != nil { - in, out := &in.Secure, &out.Secure - *out = new(bool) - **out = **in - } - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make(attributes.Attributes, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointParentOverride. -func (in *EndpointParentOverride) DeepCopy() *EndpointParentOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileDevfileRegistrySource. +func (in *DockerfileDevfileRegistrySource) DeepCopy() *DockerfileDevfileRegistrySource { if in == nil { return nil } - out := new(EndpointParentOverride) + out := new(DockerfileDevfileRegistrySource) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPluginOverride) DeepCopyInto(out *EndpointPluginOverride) { +func (in *DockerfileDevfileRegistrySourceParentOverride) DeepCopyInto(out *DockerfileDevfileRegistrySourceParentOverride) { *out = *in - if in.Secure != nil { - in, out := &in.Secure, &out.Secure - *out = new(bool) - **out = **in - } - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make(attributes.Attributes, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPluginOverride. -func (in *EndpointPluginOverride) DeepCopy() *EndpointPluginOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileDevfileRegistrySourceParentOverride. +func (in *DockerfileDevfileRegistrySourceParentOverride) DeepCopy() *DockerfileDevfileRegistrySourceParentOverride { if in == nil { return nil } - out := new(EndpointPluginOverride) + out := new(DockerfileDevfileRegistrySourceParentOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EndpointPluginOverrideParentOverride) DeepCopyInto(out *EndpointPluginOverrideParentOverride) { +func (in *DockerfileDevfileRegistrySourcePluginOverride) DeepCopyInto(out *DockerfileDevfileRegistrySourcePluginOverride) { *out = *in - if in.Secure != nil { - in, out := &in.Secure, &out.Secure - *out = new(bool) - **out = **in - } - if in.Attributes != nil { - in, out := &in.Attributes, &out.Attributes - *out = make(attributes.Attributes, len(*in)) - for key, val := range *in { - (*out)[key] = *val.DeepCopy() - } - } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPluginOverrideParentOverride. -func (in *EndpointPluginOverrideParentOverride) DeepCopy() *EndpointPluginOverrideParentOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileDevfileRegistrySourcePluginOverride. +func (in *DockerfileDevfileRegistrySourcePluginOverride) DeepCopy() *DockerfileDevfileRegistrySourcePluginOverride { if in == nil { return nil } - out := new(EndpointPluginOverrideParentOverride) + out := new(DockerfileDevfileRegistrySourcePluginOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVar) DeepCopyInto(out *EnvVar) { +func (in *DockerfileDevfileRegistrySourcePluginOverrideParentOverride) DeepCopyInto(out *DockerfileDevfileRegistrySourcePluginOverrideParentOverride) { *out = *in } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar. -func (in *EnvVar) DeepCopy() *EnvVar { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileDevfileRegistrySourcePluginOverrideParentOverride. +func (in *DockerfileDevfileRegistrySourcePluginOverrideParentOverride) DeepCopy() *DockerfileDevfileRegistrySourcePluginOverrideParentOverride { if in == nil { return nil } - out := new(EnvVar) + out := new(DockerfileDevfileRegistrySourcePluginOverrideParentOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVarParentOverride) DeepCopyInto(out *EnvVarParentOverride) { +func (in *DockerfileGitProjectSource) DeepCopyInto(out *DockerfileGitProjectSource) { *out = *in + in.GitProjectSource.DeepCopyInto(&out.GitProjectSource) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarParentOverride. -func (in *EnvVarParentOverride) DeepCopy() *EnvVarParentOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileGitProjectSource. +func (in *DockerfileGitProjectSource) DeepCopy() *DockerfileGitProjectSource { if in == nil { return nil } - out := new(EnvVarParentOverride) + out := new(DockerfileGitProjectSource) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVarPluginOverride) DeepCopyInto(out *EnvVarPluginOverride) { +func (in *DockerfileGitProjectSourceParentOverride) DeepCopyInto(out *DockerfileGitProjectSourceParentOverride) { *out = *in + in.GitProjectSourceParentOverride.DeepCopyInto(&out.GitProjectSourceParentOverride) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarPluginOverride. -func (in *EnvVarPluginOverride) DeepCopy() *EnvVarPluginOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileGitProjectSourceParentOverride. +func (in *DockerfileGitProjectSourceParentOverride) DeepCopy() *DockerfileGitProjectSourceParentOverride { if in == nil { return nil } - out := new(EnvVarPluginOverride) + out := new(DockerfileGitProjectSourceParentOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *EnvVarPluginOverrideParentOverride) DeepCopyInto(out *EnvVarPluginOverrideParentOverride) { +func (in *DockerfileGitProjectSourcePluginOverride) DeepCopyInto(out *DockerfileGitProjectSourcePluginOverride) { *out = *in + in.GitProjectSourcePluginOverride.DeepCopyInto(&out.GitProjectSourcePluginOverride) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarPluginOverrideParentOverride. -func (in *EnvVarPluginOverrideParentOverride) DeepCopy() *EnvVarPluginOverrideParentOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileGitProjectSourcePluginOverride. +func (in *DockerfileGitProjectSourcePluginOverride) DeepCopy() *DockerfileGitProjectSourcePluginOverride { if in == nil { return nil } - out := new(EnvVarPluginOverrideParentOverride) + out := new(DockerfileGitProjectSourcePluginOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *Events) DeepCopyInto(out *Events) { +func (in *DockerfileGitProjectSourcePluginOverrideParentOverride) DeepCopyInto(out *DockerfileGitProjectSourcePluginOverrideParentOverride) { *out = *in - in.DevWorkspaceEvents.DeepCopyInto(&out.DevWorkspaceEvents) + in.GitProjectSourcePluginOverrideParentOverride.DeepCopyInto(&out.GitProjectSourcePluginOverrideParentOverride) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Events. -func (in *Events) DeepCopy() *Events { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileGitProjectSourcePluginOverrideParentOverride. +func (in *DockerfileGitProjectSourcePluginOverrideParentOverride) DeepCopy() *DockerfileGitProjectSourcePluginOverrideParentOverride { if in == nil { return nil } - out := new(Events) + out := new(DockerfileGitProjectSourcePluginOverrideParentOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecCommand) DeepCopyInto(out *ExecCommand) { +func (in *DockerfileImage) DeepCopyInto(out *DockerfileImage) { *out = *in - in.LabeledCommand.DeepCopyInto(&out.LabeledCommand) - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVar, len(*in)) - copy(*out, *in) - } - if in.HotReloadCapable != nil { - in, out := &in.HotReloadCapable, &out.HotReloadCapable - *out = new(bool) - **out = **in - } + out.BaseImage = in.BaseImage + in.DockerfileSrc.DeepCopyInto(&out.DockerfileSrc) + in.Dockerfile.DeepCopyInto(&out.Dockerfile) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommand. -func (in *ExecCommand) DeepCopy() *ExecCommand { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileImage. +func (in *DockerfileImage) DeepCopy() *DockerfileImage { if in == nil { return nil } - out := new(ExecCommand) + out := new(DockerfileImage) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecCommandParentOverride) DeepCopyInto(out *ExecCommandParentOverride) { +func (in *DockerfileImageParentOverride) DeepCopyInto(out *DockerfileImageParentOverride) { *out = *in - in.LabeledCommandParentOverride.DeepCopyInto(&out.LabeledCommandParentOverride) - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVarParentOverride, len(*in)) - copy(*out, *in) - } - if in.HotReloadCapable != nil { - in, out := &in.HotReloadCapable, &out.HotReloadCapable - *out = new(bool) - **out = **in - } + out.BaseImageParentOverride = in.BaseImageParentOverride + in.DockerfileSrcParentOverride.DeepCopyInto(&out.DockerfileSrcParentOverride) + in.DockerfileParentOverride.DeepCopyInto(&out.DockerfileParentOverride) } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommandParentOverride. -func (in *ExecCommandParentOverride) DeepCopy() *ExecCommandParentOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileImageParentOverride. +func (in *DockerfileImageParentOverride) DeepCopy() *DockerfileImageParentOverride { if in == nil { return nil } - out := new(ExecCommandParentOverride) + out := new(DockerfileImageParentOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecCommandPluginOverride) DeepCopyInto(out *ExecCommandPluginOverride) { +func (in *DockerfileImagePluginOverride) DeepCopyInto(out *DockerfileImagePluginOverride) { *out = *in - in.LabeledCommandPluginOverride.DeepCopyInto(&out.LabeledCommandPluginOverride) - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVarPluginOverride, len(*in)) - copy(*out, *in) - } - if in.HotReloadCapable != nil { - in, out := &in.HotReloadCapable, &out.HotReloadCapable - *out = new(bool) - **out = **in + out.BaseImagePluginOverride = in.BaseImagePluginOverride + in.DockerfileSrcPluginOverride.DeepCopyInto(&out.DockerfileSrcPluginOverride) + in.DockerfilePluginOverride.DeepCopyInto(&out.DockerfilePluginOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileImagePluginOverride. +func (in *DockerfileImagePluginOverride) DeepCopy() *DockerfileImagePluginOverride { + if in == nil { + return nil } + out := new(DockerfileImagePluginOverride) + in.DeepCopyInto(out) + return out } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommandPluginOverride. -func (in *ExecCommandPluginOverride) DeepCopy() *ExecCommandPluginOverride { +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerfileImagePluginOverrideParentOverride) DeepCopyInto(out *DockerfileImagePluginOverrideParentOverride) { + *out = *in + out.BaseImagePluginOverrideParentOverride = in.BaseImagePluginOverrideParentOverride + in.DockerfileSrcPluginOverrideParentOverride.DeepCopyInto(&out.DockerfileSrcPluginOverrideParentOverride) + in.DockerfilePluginOverrideParentOverride.DeepCopyInto(&out.DockerfilePluginOverrideParentOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileImagePluginOverrideParentOverride. +func (in *DockerfileImagePluginOverrideParentOverride) DeepCopy() *DockerfileImagePluginOverrideParentOverride { if in == nil { return nil } - out := new(ExecCommandPluginOverride) + out := new(DockerfileImagePluginOverrideParentOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *ExecCommandPluginOverrideParentOverride) DeepCopyInto(out *ExecCommandPluginOverrideParentOverride) { +func (in *DockerfileParentOverride) DeepCopyInto(out *DockerfileParentOverride) { *out = *in - in.LabeledCommandPluginOverrideParentOverride.DeepCopyInto(&out.LabeledCommandPluginOverrideParentOverride) - if in.Env != nil { - in, out := &in.Env, &out.Env - *out = make([]EnvVarPluginOverrideParentOverride, len(*in)) + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) copy(*out, *in) } - if in.HotReloadCapable != nil { - in, out := &in.HotReloadCapable, &out.HotReloadCapable + if in.RootRequired != nil { + in, out := &in.RootRequired, &out.RootRequired *out = new(bool) **out = **in } } -// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommandPluginOverrideParentOverride. -func (in *ExecCommandPluginOverrideParentOverride) DeepCopy() *ExecCommandPluginOverrideParentOverride { +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileParentOverride. +func (in *DockerfileParentOverride) DeepCopy() *DockerfileParentOverride { if in == nil { return nil } - out := new(ExecCommandPluginOverrideParentOverride) + out := new(DockerfileParentOverride) in.DeepCopyInto(out) return out } // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. -func (in *GitLikeProjectSource) DeepCopyInto(out *GitLikeProjectSource) { +func (in *DockerfilePluginOverride) DeepCopyInto(out *DockerfilePluginOverride) { *out = *in - out.CommonProjectSource = in.CommonProjectSource - if in.CheckoutFrom != nil { - in, out := &in.CheckoutFrom, &out.CheckoutFrom - *out = new(CheckoutFrom) - **out = **in + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RootRequired != nil { + in, out := &in.RootRequired, &out.RootRequired + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfilePluginOverride. +func (in *DockerfilePluginOverride) DeepCopy() *DockerfilePluginOverride { + if in == nil { + return nil + } + out := new(DockerfilePluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerfilePluginOverrideParentOverride) DeepCopyInto(out *DockerfilePluginOverrideParentOverride) { + *out = *in + if in.Args != nil { + in, out := &in.Args, &out.Args + *out = make([]string, len(*in)) + copy(*out, *in) + } + if in.RootRequired != nil { + in, out := &in.RootRequired, &out.RootRequired + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfilePluginOverrideParentOverride. +func (in *DockerfilePluginOverrideParentOverride) DeepCopy() *DockerfilePluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(DockerfilePluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerfileSrc) DeepCopyInto(out *DockerfileSrc) { + *out = *in + if in.DevfileRegistry != nil { + in, out := &in.DevfileRegistry, &out.DevfileRegistry + *out = new(DockerfileDevfileRegistrySource) + **out = **in + } + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(DockerfileGitProjectSource) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileSrc. +func (in *DockerfileSrc) DeepCopy() *DockerfileSrc { + if in == nil { + return nil + } + out := new(DockerfileSrc) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerfileSrcParentOverride) DeepCopyInto(out *DockerfileSrcParentOverride) { + *out = *in + if in.DevfileRegistry != nil { + in, out := &in.DevfileRegistry, &out.DevfileRegistry + *out = new(DockerfileDevfileRegistrySourceParentOverride) + **out = **in + } + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(DockerfileGitProjectSourceParentOverride) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileSrcParentOverride. +func (in *DockerfileSrcParentOverride) DeepCopy() *DockerfileSrcParentOverride { + if in == nil { + return nil + } + out := new(DockerfileSrcParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerfileSrcPluginOverride) DeepCopyInto(out *DockerfileSrcPluginOverride) { + *out = *in + if in.DevfileRegistry != nil { + in, out := &in.DevfileRegistry, &out.DevfileRegistry + *out = new(DockerfileDevfileRegistrySourcePluginOverride) + **out = **in + } + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(DockerfileGitProjectSourcePluginOverride) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileSrcPluginOverride. +func (in *DockerfileSrcPluginOverride) DeepCopy() *DockerfileSrcPluginOverride { + if in == nil { + return nil + } + out := new(DockerfileSrcPluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *DockerfileSrcPluginOverrideParentOverride) DeepCopyInto(out *DockerfileSrcPluginOverrideParentOverride) { + *out = *in + if in.DevfileRegistry != nil { + in, out := &in.DevfileRegistry, &out.DevfileRegistry + *out = new(DockerfileDevfileRegistrySourcePluginOverrideParentOverride) + **out = **in + } + if in.Git != nil { + in, out := &in.Git, &out.Git + *out = new(DockerfileGitProjectSourcePluginOverrideParentOverride) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new DockerfileSrcPluginOverrideParentOverride. +func (in *DockerfileSrcPluginOverrideParentOverride) DeepCopy() *DockerfileSrcPluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(DockerfileSrcPluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Endpoint) DeepCopyInto(out *Endpoint) { + *out = *in + if in.Secure != nil { + in, out := &in.Secure, &out.Secure + *out = new(bool) + **out = **in + } + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(attributes.Attributes, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Endpoint. +func (in *Endpoint) DeepCopy() *Endpoint { + if in == nil { + return nil + } + out := new(Endpoint) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointParentOverride) DeepCopyInto(out *EndpointParentOverride) { + *out = *in + if in.Secure != nil { + in, out := &in.Secure, &out.Secure + *out = new(bool) + **out = **in + } + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(attributes.Attributes, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointParentOverride. +func (in *EndpointParentOverride) DeepCopy() *EndpointParentOverride { + if in == nil { + return nil + } + out := new(EndpointParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointPluginOverride) DeepCopyInto(out *EndpointPluginOverride) { + *out = *in + if in.Secure != nil { + in, out := &in.Secure, &out.Secure + *out = new(bool) + **out = **in + } + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(attributes.Attributes, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPluginOverride. +func (in *EndpointPluginOverride) DeepCopy() *EndpointPluginOverride { + if in == nil { + return nil + } + out := new(EndpointPluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EndpointPluginOverrideParentOverride) DeepCopyInto(out *EndpointPluginOverrideParentOverride) { + *out = *in + if in.Secure != nil { + in, out := &in.Secure, &out.Secure + *out = new(bool) + **out = **in + } + if in.Attributes != nil { + in, out := &in.Attributes, &out.Attributes + *out = make(attributes.Attributes, len(*in)) + for key, val := range *in { + (*out)[key] = *val.DeepCopy() + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointPluginOverrideParentOverride. +func (in *EndpointPluginOverrideParentOverride) DeepCopy() *EndpointPluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(EndpointPluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvVar) DeepCopyInto(out *EnvVar) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVar. +func (in *EnvVar) DeepCopy() *EnvVar { + if in == nil { + return nil + } + out := new(EnvVar) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvVarParentOverride) DeepCopyInto(out *EnvVarParentOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarParentOverride. +func (in *EnvVarParentOverride) DeepCopy() *EnvVarParentOverride { + if in == nil { + return nil + } + out := new(EnvVarParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvVarPluginOverride) DeepCopyInto(out *EnvVarPluginOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarPluginOverride. +func (in *EnvVarPluginOverride) DeepCopy() *EnvVarPluginOverride { + if in == nil { + return nil + } + out := new(EnvVarPluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *EnvVarPluginOverrideParentOverride) DeepCopyInto(out *EnvVarPluginOverrideParentOverride) { + *out = *in +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EnvVarPluginOverrideParentOverride. +func (in *EnvVarPluginOverrideParentOverride) DeepCopy() *EnvVarPluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(EnvVarPluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Events) DeepCopyInto(out *Events) { + *out = *in + in.DevWorkspaceEvents.DeepCopyInto(&out.DevWorkspaceEvents) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Events. +func (in *Events) DeepCopy() *Events { + if in == nil { + return nil + } + out := new(Events) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCommand) DeepCopyInto(out *ExecCommand) { + *out = *in + in.LabeledCommand.DeepCopyInto(&out.LabeledCommand) + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]EnvVar, len(*in)) + copy(*out, *in) + } + if in.HotReloadCapable != nil { + in, out := &in.HotReloadCapable, &out.HotReloadCapable + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommand. +func (in *ExecCommand) DeepCopy() *ExecCommand { + if in == nil { + return nil + } + out := new(ExecCommand) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCommandParentOverride) DeepCopyInto(out *ExecCommandParentOverride) { + *out = *in + in.LabeledCommandParentOverride.DeepCopyInto(&out.LabeledCommandParentOverride) + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]EnvVarParentOverride, len(*in)) + copy(*out, *in) + } + if in.HotReloadCapable != nil { + in, out := &in.HotReloadCapable, &out.HotReloadCapable + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommandParentOverride. +func (in *ExecCommandParentOverride) DeepCopy() *ExecCommandParentOverride { + if in == nil { + return nil + } + out := new(ExecCommandParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCommandPluginOverride) DeepCopyInto(out *ExecCommandPluginOverride) { + *out = *in + in.LabeledCommandPluginOverride.DeepCopyInto(&out.LabeledCommandPluginOverride) + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]EnvVarPluginOverride, len(*in)) + copy(*out, *in) + } + if in.HotReloadCapable != nil { + in, out := &in.HotReloadCapable, &out.HotReloadCapable + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommandPluginOverride. +func (in *ExecCommandPluginOverride) DeepCopy() *ExecCommandPluginOverride { + if in == nil { + return nil + } + out := new(ExecCommandPluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ExecCommandPluginOverrideParentOverride) DeepCopyInto(out *ExecCommandPluginOverrideParentOverride) { + *out = *in + in.LabeledCommandPluginOverrideParentOverride.DeepCopyInto(&out.LabeledCommandPluginOverrideParentOverride) + if in.Env != nil { + in, out := &in.Env, &out.Env + *out = make([]EnvVarPluginOverrideParentOverride, len(*in)) + copy(*out, *in) + } + if in.HotReloadCapable != nil { + in, out := &in.HotReloadCapable, &out.HotReloadCapable + *out = new(bool) + **out = **in + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExecCommandPluginOverrideParentOverride. +func (in *ExecCommandPluginOverrideParentOverride) DeepCopy() *ExecCommandPluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(ExecCommandPluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitLikeProjectSource) DeepCopyInto(out *GitLikeProjectSource) { + *out = *in + out.CommonProjectSource = in.CommonProjectSource + if in.CheckoutFrom != nil { + in, out := &in.CheckoutFrom, &out.CheckoutFrom + *out = new(CheckoutFrom) + **out = **in } if in.Remotes != nil { in, out := &in.Remotes, &out.Remotes @@ -1879,6 +2415,62 @@ func (in *GitLikeProjectSourceParentOverride) DeepCopy() *GitLikeProjectSourcePa return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitLikeProjectSourcePluginOverride) DeepCopyInto(out *GitLikeProjectSourcePluginOverride) { + *out = *in + out.CommonProjectSourcePluginOverride = in.CommonProjectSourcePluginOverride + if in.CheckoutFrom != nil { + in, out := &in.CheckoutFrom, &out.CheckoutFrom + *out = new(CheckoutFromPluginOverride) + **out = **in + } + if in.Remotes != nil { + in, out := &in.Remotes, &out.Remotes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLikeProjectSourcePluginOverride. +func (in *GitLikeProjectSourcePluginOverride) DeepCopy() *GitLikeProjectSourcePluginOverride { + if in == nil { + return nil + } + out := new(GitLikeProjectSourcePluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitLikeProjectSourcePluginOverrideParentOverride) DeepCopyInto(out *GitLikeProjectSourcePluginOverrideParentOverride) { + *out = *in + out.CommonProjectSourcePluginOverrideParentOverride = in.CommonProjectSourcePluginOverrideParentOverride + if in.CheckoutFrom != nil { + in, out := &in.CheckoutFrom, &out.CheckoutFrom + *out = new(CheckoutFromPluginOverrideParentOverride) + **out = **in + } + if in.Remotes != nil { + in, out := &in.Remotes, &out.Remotes + *out = make(map[string]string, len(*in)) + for key, val := range *in { + (*out)[key] = val + } + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitLikeProjectSourcePluginOverrideParentOverride. +func (in *GitLikeProjectSourcePluginOverrideParentOverride) DeepCopy() *GitLikeProjectSourcePluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(GitLikeProjectSourcePluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *GitProjectSource) DeepCopyInto(out *GitProjectSource) { *out = *in @@ -1911,6 +2503,250 @@ func (in *GitProjectSourceParentOverride) DeepCopy() *GitProjectSourceParentOver return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitProjectSourcePluginOverride) DeepCopyInto(out *GitProjectSourcePluginOverride) { + *out = *in + in.GitLikeProjectSourcePluginOverride.DeepCopyInto(&out.GitLikeProjectSourcePluginOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitProjectSourcePluginOverride. +func (in *GitProjectSourcePluginOverride) DeepCopy() *GitProjectSourcePluginOverride { + if in == nil { + return nil + } + out := new(GitProjectSourcePluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *GitProjectSourcePluginOverrideParentOverride) DeepCopyInto(out *GitProjectSourcePluginOverrideParentOverride) { + *out = *in + in.GitLikeProjectSourcePluginOverrideParentOverride.DeepCopyInto(&out.GitLikeProjectSourcePluginOverrideParentOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new GitProjectSourcePluginOverrideParentOverride. +func (in *GitProjectSourcePluginOverrideParentOverride) DeepCopy() *GitProjectSourcePluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(GitProjectSourcePluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *Image) DeepCopyInto(out *Image) { + *out = *in + in.ImageUnion.DeepCopyInto(&out.ImageUnion) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Image. +func (in *Image) DeepCopy() *Image { + if in == nil { + return nil + } + out := new(Image) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageComponent) DeepCopyInto(out *ImageComponent) { + *out = *in + out.BaseComponent = in.BaseComponent + in.Image.DeepCopyInto(&out.Image) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageComponent. +func (in *ImageComponent) DeepCopy() *ImageComponent { + if in == nil { + return nil + } + out := new(ImageComponent) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageComponentParentOverride) DeepCopyInto(out *ImageComponentParentOverride) { + *out = *in + out.BaseComponentParentOverride = in.BaseComponentParentOverride + in.ImageParentOverride.DeepCopyInto(&out.ImageParentOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageComponentParentOverride. +func (in *ImageComponentParentOverride) DeepCopy() *ImageComponentParentOverride { + if in == nil { + return nil + } + out := new(ImageComponentParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageComponentPluginOverride) DeepCopyInto(out *ImageComponentPluginOverride) { + *out = *in + out.BaseComponentPluginOverride = in.BaseComponentPluginOverride + in.ImagePluginOverride.DeepCopyInto(&out.ImagePluginOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageComponentPluginOverride. +func (in *ImageComponentPluginOverride) DeepCopy() *ImageComponentPluginOverride { + if in == nil { + return nil + } + out := new(ImageComponentPluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageComponentPluginOverrideParentOverride) DeepCopyInto(out *ImageComponentPluginOverrideParentOverride) { + *out = *in + out.BaseComponentPluginOverrideParentOverride = in.BaseComponentPluginOverrideParentOverride + in.ImagePluginOverrideParentOverride.DeepCopyInto(&out.ImagePluginOverrideParentOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageComponentPluginOverrideParentOverride. +func (in *ImageComponentPluginOverrideParentOverride) DeepCopy() *ImageComponentPluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(ImageComponentPluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageParentOverride) DeepCopyInto(out *ImageParentOverride) { + *out = *in + in.ImageUnionParentOverride.DeepCopyInto(&out.ImageUnionParentOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageParentOverride. +func (in *ImageParentOverride) DeepCopy() *ImageParentOverride { + if in == nil { + return nil + } + out := new(ImageParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImagePluginOverride) DeepCopyInto(out *ImagePluginOverride) { + *out = *in + in.ImageUnionPluginOverride.DeepCopyInto(&out.ImageUnionPluginOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePluginOverride. +func (in *ImagePluginOverride) DeepCopy() *ImagePluginOverride { + if in == nil { + return nil + } + out := new(ImagePluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImagePluginOverrideParentOverride) DeepCopyInto(out *ImagePluginOverrideParentOverride) { + *out = *in + in.ImageUnionPluginOverrideParentOverride.DeepCopyInto(&out.ImageUnionPluginOverrideParentOverride) +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImagePluginOverrideParentOverride. +func (in *ImagePluginOverrideParentOverride) DeepCopy() *ImagePluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(ImagePluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageUnion) DeepCopyInto(out *ImageUnion) { + *out = *in + if in.Dockerfile != nil { + in, out := &in.Dockerfile, &out.Dockerfile + *out = new(DockerfileImage) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageUnion. +func (in *ImageUnion) DeepCopy() *ImageUnion { + if in == nil { + return nil + } + out := new(ImageUnion) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageUnionParentOverride) DeepCopyInto(out *ImageUnionParentOverride) { + *out = *in + if in.Dockerfile != nil { + in, out := &in.Dockerfile, &out.Dockerfile + *out = new(DockerfileImageParentOverride) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageUnionParentOverride. +func (in *ImageUnionParentOverride) DeepCopy() *ImageUnionParentOverride { + if in == nil { + return nil + } + out := new(ImageUnionParentOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageUnionPluginOverride) DeepCopyInto(out *ImageUnionPluginOverride) { + *out = *in + if in.Dockerfile != nil { + in, out := &in.Dockerfile, &out.Dockerfile + *out = new(DockerfileImagePluginOverride) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageUnionPluginOverride. +func (in *ImageUnionPluginOverride) DeepCopy() *ImageUnionPluginOverride { + if in == nil { + return nil + } + out := new(ImageUnionPluginOverride) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ImageUnionPluginOverrideParentOverride) DeepCopyInto(out *ImageUnionPluginOverrideParentOverride) { + *out = *in + if in.Dockerfile != nil { + in, out := &in.Dockerfile, &out.Dockerfile + *out = new(DockerfileImagePluginOverrideParentOverride) + (*in).DeepCopyInto(*out) + } +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ImageUnionPluginOverrideParentOverride. +func (in *ImageUnionPluginOverrideParentOverride) DeepCopy() *ImageUnionPluginOverrideParentOverride { + if in == nil { + return nil + } + out := new(ImageUnionPluginOverrideParentOverride) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ImportReference) DeepCopyInto(out *ImportReference) { *out = *in diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go b/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go index 0b0027180..4886db49e 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.parent_overrides.go @@ -142,7 +142,7 @@ type CommandParentOverride struct { // +union type ComponentUnionParentOverride struct { - // +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume;Plugin + // +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume;Image;Plugin // Type of component // // +unionDiscriminator @@ -172,6 +172,10 @@ type ComponentUnionParentOverride struct { // +optional Volume *VolumeComponentParentOverride `json:"volume,omitempty"` + // Allows specifying the definition of an image for outer loop builds + // +optional + Image *ImageComponentParentOverride `json:"image,omitempty"` + // Allows importing a plugin. // // Plugins are mainly imported devfiles that contribute components, commands @@ -262,6 +266,12 @@ type VolumeComponentParentOverride struct { VolumeParentOverride `json:",inline"` } +// Component that allows the developer to build a runtime image for outerloop +type ImageComponentParentOverride struct { + BaseComponentParentOverride `json:",inline"` + ImageParentOverride `json:",inline"` +} + type PluginComponentParentOverride struct { BaseComponentParentOverride `json:",inline"` ImportReferenceParentOverride `json:",inline"` @@ -510,6 +520,14 @@ type VolumeParentOverride struct { Ephemeral *bool `json:"ephemeral,omitempty"` } +type ImageParentOverride struct { + + // +optional + // Name of the image for the resulting outerloop build + ImageName string `json:"imageName,omitempty"` + ImageUnionParentOverride `json:",inline"` +} + type ImportReferenceParentOverride struct { ImportReferenceUnionParentOverride `json:",inline"` @@ -549,7 +567,7 @@ type GitLikeProjectSourceParentOverride struct { // +optional // The remotes map which should be initialized in the git project. - // Projects must have at least one remote configured while StarterProjects can only have at most one remote configured. + // Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured. Remotes map[string]string `json:"remotes,omitempty"` } @@ -616,6 +634,21 @@ type K8sLikeComponentLocationParentOverride struct { Inlined string `json:"inlined,omitempty"` } +// +union +type ImageUnionParentOverride struct { + + // +kubebuilder:validation:Enum=Dockerfile + // Type of image + // + // +unionDiscriminator + // +optional + ImageType ImageTypeParentOverride `json:"imageType,omitempty"` + + // Allows specifying dockerfile type build + // +optional + Dockerfile *DockerfileImageParentOverride `json:"dockerfile,omitempty"` +} + // Location from where the an import reference is retrieved // +union type ImportReferenceUnionParentOverride struct { @@ -706,6 +739,17 @@ type BaseCommandParentOverride struct { // Only one of the following component type may be specified. type K8sLikeComponentLocationTypeParentOverride string +// ImageType describes the type of image. +// Only one of the following image type may be specified. +type ImageTypeParentOverride string + +// Dockerfile Image type to specify the outerloop build using a Dockerfile +type DockerfileImageParentOverride struct { + BaseImageParentOverride `json:",inline"` + DockerfileSrcParentOverride `json:",inline"` + DockerfileParentOverride `json:",inline"` +} + // ImportReferenceType describes the type of location // from where the referenced template structure should be retrieved. // Only one of the following parent locations may be specified. @@ -722,7 +766,7 @@ type KubernetesCustomResourceImportReferenceParentOverride struct { // +union type ComponentUnionPluginOverrideParentOverride struct { - // +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume + // +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume;Image // Type of component // // +unionDiscriminator @@ -751,6 +795,10 @@ type ComponentUnionPluginOverrideParentOverride struct { // shared by several other components // +optional Volume *VolumeComponentPluginOverrideParentOverride `json:"volume,omitempty"` + + // Allows specifying the definition of an image for outer loop builds + // +optional + Image *ImageComponentPluginOverrideParentOverride `json:"image,omitempty"` } // +union @@ -797,6 +845,50 @@ type CommandGroupParentOverride struct { IsDefault *bool `json:"isDefault,omitempty"` } +type BaseImageParentOverride struct { +} + +// +union +type DockerfileSrcParentOverride struct { + + // +kubebuilder:validation:Enum=Uri;DevfileRegistry;Git + // Type of Dockerfile src + // + + // +unionDiscriminator + // +optional + SrcType DockerfileSrcTypeParentOverride `json:"srcType,omitempty"` + + // URI Reference of a Dockerfile. + // It can be a full URL or a relative URI from the current devfile as the base URI. + // +optional + Uri string `json:"uri,omitempty"` + + // Dockerfile's Devfile Registry source + // +optional + DevfileRegistry *DockerfileDevfileRegistrySourceParentOverride `json:"devfileRegistry,omitempty"` + + // Dockerfile's Git source + // +optional + Git *DockerfileGitProjectSourceParentOverride `json:"git,omitempty"` +} + +type DockerfileParentOverride struct { + + // Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container + // +optional + BuildContext string `json:"buildContext,omitempty"` + + // The arguments to supply to the dockerfile build. + // +optional + Args []string `json:"args,omitempty" patchStrategy:"replace"` + + // Specify if a privileged builder pod is required. + // + // Default value is `false` + // +optional + RootRequired *bool `json:"rootRequired,omitempty"` +} + // ComponentType describes the type of component. // Only one of the following component type may be specified. type ComponentTypePluginOverrideParentOverride string @@ -824,6 +916,12 @@ type VolumeComponentPluginOverrideParentOverride struct { VolumePluginOverrideParentOverride `json:",inline"` } +// Component that allows the developer to build a runtime image for outerloop +type ImageComponentPluginOverrideParentOverride struct { + BaseComponentPluginOverrideParentOverride `json:",inline"` + ImagePluginOverrideParentOverride `json:",inline"` +} + // CommandType describes the type of command. // Only one of the following command type may be specified. type CommandTypePluginOverrideParentOverride string @@ -892,9 +990,40 @@ type CompositeCommandPluginOverrideParentOverride struct { } // CommandGroupKind describes the kind of command group. -// +kubebuilder:validation:Enum=build;run;test;debug +// +kubebuilder:validation:Enum=build;run;test;debug;deploy type CommandGroupKindParentOverride string +// DockerfileSrcType describes the type of +// the src for the Dockerfile outerloop build. +// Only one of the following location type may be specified. +type DockerfileSrcTypeParentOverride string + +type DockerfileDevfileRegistrySourceParentOverride struct { + + // +optional + // Id in a devfile registry that contains a Dockerfile. The src in the OCI registry + // required for the Dockerfile build will be downloaded for building the image. + Id string `json:"id,omitempty"` + + // Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. + // To ensure the Dockerfile gets resolved consistently in different environments, + // it is recommended to always specify the `devfileRegistryUrl` when `Id` is used. + // +optional + RegistryUrl string `json:"registryUrl,omitempty"` +} + +type DockerfileGitProjectSourceParentOverride struct { + + // Git src for the Dockerfile build. The src required for the Dockerfile build will need to be + // cloned for building the image. + GitProjectSourceParentOverride `json:",inline"` + + // Location of the Dockerfile in the Git repository when using git as Dockerfile src. + // Defaults to Dockerfile. + // +optional + FileLocation string `json:"fileLocation,omitempty"` +} + // DevWorkspace component: Anything that will bring additional features / tooling / behaviour / context // to the devworkspace, in order to make working in it easier. type BaseComponentPluginOverrideParentOverride struct { @@ -1053,6 +1182,14 @@ type VolumePluginOverrideParentOverride struct { Ephemeral *bool `json:"ephemeral,omitempty"` } +type ImagePluginOverrideParentOverride struct { + + // +optional + // Name of the image for the resulting outerloop build + ImageName string `json:"imageName,omitempty"` + ImageUnionPluginOverrideParentOverride `json:",inline"` +} + type LabeledCommandPluginOverrideParentOverride struct { BaseCommandPluginOverrideParentOverride `json:",inline"` @@ -1114,6 +1251,21 @@ type K8sLikeComponentLocationPluginOverrideParentOverride struct { Inlined string `json:"inlined,omitempty"` } +// +union +type ImageUnionPluginOverrideParentOverride struct { + + // +kubebuilder:validation:Enum=Dockerfile + // Type of image + // + // +unionDiscriminator + // +optional + ImageType ImageTypePluginOverrideParentOverride `json:"imageType,omitempty"` + + // Allows specifying dockerfile type build + // +optional + Dockerfile *DockerfileImagePluginOverrideParentOverride `json:"dockerfile,omitempty"` +} + type BaseCommandPluginOverrideParentOverride struct { // +optional @@ -1126,6 +1278,17 @@ type BaseCommandPluginOverrideParentOverride struct { // Only one of the following component type may be specified. type K8sLikeComponentLocationTypePluginOverrideParentOverride string +// ImageType describes the type of image. +// Only one of the following image type may be specified. +type ImageTypePluginOverrideParentOverride string + +// Dockerfile Image type to specify the outerloop build using a Dockerfile +type DockerfileImagePluginOverrideParentOverride struct { + BaseImagePluginOverrideParentOverride `json:",inline"` + DockerfileSrcPluginOverrideParentOverride `json:",inline"` + DockerfilePluginOverrideParentOverride `json:",inline"` +} + type CommandGroupPluginOverrideParentOverride struct { // +optional @@ -1137,8 +1300,115 @@ type CommandGroupPluginOverrideParentOverride struct { IsDefault *bool `json:"isDefault,omitempty"` } +type BaseImagePluginOverrideParentOverride struct { +} + +// +union +type DockerfileSrcPluginOverrideParentOverride struct { + + // +kubebuilder:validation:Enum=Uri;DevfileRegistry;Git + // Type of Dockerfile src + // + + // +unionDiscriminator + // +optional + SrcType DockerfileSrcTypePluginOverrideParentOverride `json:"srcType,omitempty"` + + // URI Reference of a Dockerfile. + // It can be a full URL or a relative URI from the current devfile as the base URI. + // +optional + Uri string `json:"uri,omitempty"` + + // Dockerfile's Devfile Registry source + // +optional + DevfileRegistry *DockerfileDevfileRegistrySourcePluginOverrideParentOverride `json:"devfileRegistry,omitempty"` + + // Dockerfile's Git source + // +optional + Git *DockerfileGitProjectSourcePluginOverrideParentOverride `json:"git,omitempty"` +} + +type DockerfilePluginOverrideParentOverride struct { + + // Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container + // +optional + BuildContext string `json:"buildContext,omitempty"` + + // The arguments to supply to the dockerfile build. + // +optional + Args []string `json:"args,omitempty" patchStrategy:"replace"` + + // Specify if a privileged builder pod is required. + // + // Default value is `false` + // +optional + RootRequired *bool `json:"rootRequired,omitempty"` +} + // CommandGroupKind describes the kind of command group. -// +kubebuilder:validation:Enum=build;run;test;debug +// +kubebuilder:validation:Enum=build;run;test;debug;deploy type CommandGroupKindPluginOverrideParentOverride string +// DockerfileSrcType describes the type of +// the src for the Dockerfile outerloop build. +// Only one of the following location type may be specified. +type DockerfileSrcTypePluginOverrideParentOverride string + +type DockerfileDevfileRegistrySourcePluginOverrideParentOverride struct { + + // +optional + // Id in a devfile registry that contains a Dockerfile. The src in the OCI registry + // required for the Dockerfile build will be downloaded for building the image. + Id string `json:"id,omitempty"` + + // Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. + // To ensure the Dockerfile gets resolved consistently in different environments, + // it is recommended to always specify the `devfileRegistryUrl` when `Id` is used. + // +optional + RegistryUrl string `json:"registryUrl,omitempty"` +} + +type DockerfileGitProjectSourcePluginOverrideParentOverride struct { + + // Git src for the Dockerfile build. The src required for the Dockerfile build will need to be + // cloned for building the image. + GitProjectSourcePluginOverrideParentOverride `json:",inline"` + + // Location of the Dockerfile in the Git repository when using git as Dockerfile src. + // Defaults to Dockerfile. + // +optional + FileLocation string `json:"fileLocation,omitempty"` +} + +type GitProjectSourcePluginOverrideParentOverride struct { + GitLikeProjectSourcePluginOverrideParentOverride `json:",inline"` +} + +type GitLikeProjectSourcePluginOverrideParentOverride struct { + CommonProjectSourcePluginOverrideParentOverride `json:",inline"` + + // Defines from what the project should be checked out. Required if there are more than one remote configured + // +optional + CheckoutFrom *CheckoutFromPluginOverrideParentOverride `json:"checkoutFrom,omitempty"` + + // +optional + // The remotes map which should be initialized in the git project. + // Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured. + Remotes map[string]string `json:"remotes,omitempty"` +} + +type CommonProjectSourcePluginOverrideParentOverride struct { +} + +type CheckoutFromPluginOverrideParentOverride struct { + + // The revision to checkout from. Should be branch name, tag or commit id. + // Default branch is used if missing or specified revision is not found. + // +optional + Revision string `json:"revision,omitempty"` + + // The remote name should be used as init. Required if there are more than one remote configured + // +optional + Remote string `json:"remote,omitempty"` +} + func (overrides ParentOverrides) isOverride() {} diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go b/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go index 416cacef2..93ccf8102 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.plugin_overrides.go @@ -65,7 +65,7 @@ type CommandPluginOverride struct { // +union type ComponentUnionPluginOverride struct { - // +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume + // +kubebuilder:validation:Enum=Container;Kubernetes;Openshift;Volume;Image // Type of component // // +unionDiscriminator @@ -94,6 +94,10 @@ type ComponentUnionPluginOverride struct { // shared by several other components // +optional Volume *VolumeComponentPluginOverride `json:"volume,omitempty"` + + // Allows specifying the definition of an image for outer loop builds + // +optional + Image *ImageComponentPluginOverride `json:"image,omitempty"` } // +union @@ -156,6 +160,12 @@ type VolumeComponentPluginOverride struct { VolumePluginOverride `json:",inline"` } +// Component that allows the developer to build a runtime image for outerloop +type ImageComponentPluginOverride struct { + BaseComponentPluginOverride `json:",inline"` + ImagePluginOverride `json:",inline"` +} + // CommandType describes the type of command. // Only one of the following command type may be specified. type CommandTypePluginOverride string @@ -380,6 +390,14 @@ type VolumePluginOverride struct { Ephemeral *bool `json:"ephemeral,omitempty"` } +type ImagePluginOverride struct { + + // +optional + // Name of the image for the resulting outerloop build + ImageName string `json:"imageName,omitempty"` + ImageUnionPluginOverride `json:",inline"` +} + type LabeledCommandPluginOverride struct { BaseCommandPluginOverride `json:",inline"` @@ -440,6 +458,21 @@ type K8sLikeComponentLocationPluginOverride struct { Inlined string `json:"inlined,omitempty"` } +// +union +type ImageUnionPluginOverride struct { + + // +kubebuilder:validation:Enum=Dockerfile + // Type of image + // + // +unionDiscriminator + // +optional + ImageType ImageTypePluginOverride `json:"imageType,omitempty"` + + // Allows specifying dockerfile type build + // +optional + Dockerfile *DockerfileImagePluginOverride `json:"dockerfile,omitempty"` +} + type BaseCommandPluginOverride struct { // +optional @@ -452,6 +485,17 @@ type BaseCommandPluginOverride struct { // Only one of the following component type may be specified. type K8sLikeComponentLocationTypePluginOverride string +// ImageType describes the type of image. +// Only one of the following image type may be specified. +type ImageTypePluginOverride string + +// Dockerfile Image type to specify the outerloop build using a Dockerfile +type DockerfileImagePluginOverride struct { + BaseImagePluginOverride `json:",inline"` + DockerfileSrcPluginOverride `json:",inline"` + DockerfilePluginOverride `json:",inline"` +} + type CommandGroupPluginOverride struct { // +optional @@ -463,8 +507,115 @@ type CommandGroupPluginOverride struct { IsDefault *bool `json:"isDefault,omitempty"` } +type BaseImagePluginOverride struct { +} + +// +union +type DockerfileSrcPluginOverride struct { + + // +kubebuilder:validation:Enum=Uri;DevfileRegistry;Git + // Type of Dockerfile src + // + + // +unionDiscriminator + // +optional + SrcType DockerfileSrcTypePluginOverride `json:"srcType,omitempty"` + + // URI Reference of a Dockerfile. + // It can be a full URL or a relative URI from the current devfile as the base URI. + // +optional + Uri string `json:"uri,omitempty"` + + // Dockerfile's Devfile Registry source + // +optional + DevfileRegistry *DockerfileDevfileRegistrySourcePluginOverride `json:"devfileRegistry,omitempty"` + + // Dockerfile's Git source + // +optional + Git *DockerfileGitProjectSourcePluginOverride `json:"git,omitempty"` +} + +type DockerfilePluginOverride struct { + + // Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container + // +optional + BuildContext string `json:"buildContext,omitempty"` + + // The arguments to supply to the dockerfile build. + // +optional + Args []string `json:"args,omitempty" patchStrategy:"replace"` + + // Specify if a privileged builder pod is required. + // + // Default value is `false` + // +optional + RootRequired *bool `json:"rootRequired,omitempty"` +} + // CommandGroupKind describes the kind of command group. -// +kubebuilder:validation:Enum=build;run;test;debug +// +kubebuilder:validation:Enum=build;run;test;debug;deploy type CommandGroupKindPluginOverride string +// DockerfileSrcType describes the type of +// the src for the Dockerfile outerloop build. +// Only one of the following location type may be specified. +type DockerfileSrcTypePluginOverride string + +type DockerfileDevfileRegistrySourcePluginOverride struct { + + // +optional + // Id in a devfile registry that contains a Dockerfile. The src in the OCI registry + // required for the Dockerfile build will be downloaded for building the image. + Id string `json:"id,omitempty"` + + // Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. + // To ensure the Dockerfile gets resolved consistently in different environments, + // it is recommended to always specify the `devfileRegistryUrl` when `Id` is used. + // +optional + RegistryUrl string `json:"registryUrl,omitempty"` +} + +type DockerfileGitProjectSourcePluginOverride struct { + + // Git src for the Dockerfile build. The src required for the Dockerfile build will need to be + // cloned for building the image. + GitProjectSourcePluginOverride `json:",inline"` + + // Location of the Dockerfile in the Git repository when using git as Dockerfile src. + // Defaults to Dockerfile. + // +optional + FileLocation string `json:"fileLocation,omitempty"` +} + +type GitProjectSourcePluginOverride struct { + GitLikeProjectSourcePluginOverride `json:",inline"` +} + +type GitLikeProjectSourcePluginOverride struct { + CommonProjectSourcePluginOverride `json:",inline"` + + // Defines from what the project should be checked out. Required if there are more than one remote configured + // +optional + CheckoutFrom *CheckoutFromPluginOverride `json:"checkoutFrom,omitempty"` + + // +optional + // The remotes map which should be initialized in the git project. + // Projects must have at least one remote configured while StarterProjects & Image Component's Git source can only have at most one remote configured. + Remotes map[string]string `json:"remotes,omitempty"` +} + +type CommonProjectSourcePluginOverride struct { +} + +type CheckoutFromPluginOverride struct { + + // The revision to checkout from. Should be branch name, tag or commit id. + // Default branch is used if missing or specified revision is not found. + // +optional + Revision string `json:"revision,omitempty"` + + // The remote name should be used as init. Required if there are more than one remote configured + // +optional + Remote string `json:"remote,omitempty"` +} + func (overrides PluginOverrides) isOverride() {} diff --git a/pkg/apis/workspaces/v1alpha2/zz_generated.union_definitions.go b/pkg/apis/workspaces/v1alpha2/zz_generated.union_definitions.go index 50116cb1b..3efd841ae 100644 --- a/pkg/apis/workspaces/v1alpha2/zz_generated.union_definitions.go +++ b/pkg/apis/workspaces/v1alpha2/zz_generated.union_definitions.go @@ -27,6 +27,48 @@ type CommandUnionVisitor struct { Custom func(*CustomCommand) error } +var imageUnion reflect.Type = reflect.TypeOf(ImageUnionVisitor{}) + +func (union ImageUnion) Visit(visitor ImageUnionVisitor) error { + return visitUnion(union, visitor) +} +func (union *ImageUnion) discriminator() *string { + return (*string)(&union.ImageType) +} +func (union *ImageUnion) Normalize() error { + return normalizeUnion(union, imageUnion) +} +func (union *ImageUnion) Simplify() { + simplifyUnion(union, imageUnion) +} + +// +k8s:deepcopy-gen=false +type ImageUnionVisitor struct { + Dockerfile func(*DockerfileImage) error +} + +var dockerfileSrc reflect.Type = reflect.TypeOf(DockerfileSrcVisitor{}) + +func (union DockerfileSrc) Visit(visitor DockerfileSrcVisitor) error { + return visitUnion(union, visitor) +} +func (union *DockerfileSrc) discriminator() *string { + return (*string)(&union.SrcType) +} +func (union *DockerfileSrc) Normalize() error { + return normalizeUnion(union, dockerfileSrc) +} +func (union *DockerfileSrc) Simplify() { + simplifyUnion(union, dockerfileSrc) +} + +// +k8s:deepcopy-gen=false +type DockerfileSrcVisitor struct { + Uri func(string) error + DevfileRegistry func(*DockerfileDevfileRegistrySource) error + Git func(*DockerfileGitProjectSource) error +} + var k8sLikeComponentLocation reflect.Type = reflect.TypeOf(K8sLikeComponentLocationVisitor{}) func (union K8sLikeComponentLocation) Visit(visitor K8sLikeComponentLocationVisitor) error { @@ -69,6 +111,7 @@ type ComponentUnionVisitor struct { Kubernetes func(*KubernetesComponent) error Openshift func(*OpenshiftComponent) error Volume func(*VolumeComponent) error + Image func(*ImageComponent) error Plugin func(*PluginComponent) error Custom func(*CustomComponent) error } @@ -138,6 +181,7 @@ type ComponentUnionParentOverrideVisitor struct { Kubernetes func(*KubernetesComponentParentOverride) error Openshift func(*OpenshiftComponentParentOverride) error Volume func(*VolumeComponentParentOverride) error + Image func(*ImageComponentParentOverride) error Plugin func(*PluginComponentParentOverride) error } @@ -205,6 +249,26 @@ type K8sLikeComponentLocationParentOverrideVisitor struct { Inlined func(string) error } +var imageUnionParentOverride reflect.Type = reflect.TypeOf(ImageUnionParentOverrideVisitor{}) + +func (union ImageUnionParentOverride) Visit(visitor ImageUnionParentOverrideVisitor) error { + return visitUnion(union, visitor) +} +func (union *ImageUnionParentOverride) discriminator() *string { + return (*string)(&union.ImageType) +} +func (union *ImageUnionParentOverride) Normalize() error { + return normalizeUnion(union, imageUnionParentOverride) +} +func (union *ImageUnionParentOverride) Simplify() { + simplifyUnion(union, imageUnionParentOverride) +} + +// +k8s:deepcopy-gen=false +type ImageUnionParentOverrideVisitor struct { + Dockerfile func(*DockerfileImageParentOverride) error +} + var importReferenceUnionParentOverride reflect.Type = reflect.TypeOf(ImportReferenceUnionParentOverrideVisitor{}) func (union ImportReferenceUnionParentOverride) Visit(visitor ImportReferenceUnionParentOverrideVisitor) error { @@ -248,6 +312,7 @@ type ComponentUnionPluginOverrideParentOverrideVisitor struct { Kubernetes func(*KubernetesComponentPluginOverrideParentOverride) error Openshift func(*OpenshiftComponentPluginOverrideParentOverride) error Volume func(*VolumeComponentPluginOverrideParentOverride) error + Image func(*ImageComponentPluginOverrideParentOverride) error } var commandUnionPluginOverrideParentOverride reflect.Type = reflect.TypeOf(CommandUnionPluginOverrideParentOverrideVisitor{}) @@ -272,6 +337,28 @@ type CommandUnionPluginOverrideParentOverrideVisitor struct { Composite func(*CompositeCommandPluginOverrideParentOverride) error } +var dockerfileSrcParentOverride reflect.Type = reflect.TypeOf(DockerfileSrcParentOverrideVisitor{}) + +func (union DockerfileSrcParentOverride) Visit(visitor DockerfileSrcParentOverrideVisitor) error { + return visitUnion(union, visitor) +} +func (union *DockerfileSrcParentOverride) discriminator() *string { + return (*string)(&union.SrcType) +} +func (union *DockerfileSrcParentOverride) Normalize() error { + return normalizeUnion(union, dockerfileSrcParentOverride) +} +func (union *DockerfileSrcParentOverride) Simplify() { + simplifyUnion(union, dockerfileSrcParentOverride) +} + +// +k8s:deepcopy-gen=false +type DockerfileSrcParentOverrideVisitor struct { + Uri func(string) error + DevfileRegistry func(*DockerfileDevfileRegistrySourceParentOverride) error + Git func(*DockerfileGitProjectSourceParentOverride) error +} + var k8sLikeComponentLocationPluginOverrideParentOverride reflect.Type = reflect.TypeOf(K8sLikeComponentLocationPluginOverrideParentOverrideVisitor{}) func (union K8sLikeComponentLocationPluginOverrideParentOverride) Visit(visitor K8sLikeComponentLocationPluginOverrideParentOverrideVisitor) error { @@ -293,6 +380,48 @@ type K8sLikeComponentLocationPluginOverrideParentOverrideVisitor struct { Inlined func(string) error } +var imageUnionPluginOverrideParentOverride reflect.Type = reflect.TypeOf(ImageUnionPluginOverrideParentOverrideVisitor{}) + +func (union ImageUnionPluginOverrideParentOverride) Visit(visitor ImageUnionPluginOverrideParentOverrideVisitor) error { + return visitUnion(union, visitor) +} +func (union *ImageUnionPluginOverrideParentOverride) discriminator() *string { + return (*string)(&union.ImageType) +} +func (union *ImageUnionPluginOverrideParentOverride) Normalize() error { + return normalizeUnion(union, imageUnionPluginOverrideParentOverride) +} +func (union *ImageUnionPluginOverrideParentOverride) Simplify() { + simplifyUnion(union, imageUnionPluginOverrideParentOverride) +} + +// +k8s:deepcopy-gen=false +type ImageUnionPluginOverrideParentOverrideVisitor struct { + Dockerfile func(*DockerfileImagePluginOverrideParentOverride) error +} + +var dockerfileSrcPluginOverrideParentOverride reflect.Type = reflect.TypeOf(DockerfileSrcPluginOverrideParentOverrideVisitor{}) + +func (union DockerfileSrcPluginOverrideParentOverride) Visit(visitor DockerfileSrcPluginOverrideParentOverrideVisitor) error { + return visitUnion(union, visitor) +} +func (union *DockerfileSrcPluginOverrideParentOverride) discriminator() *string { + return (*string)(&union.SrcType) +} +func (union *DockerfileSrcPluginOverrideParentOverride) Normalize() error { + return normalizeUnion(union, dockerfileSrcPluginOverrideParentOverride) +} +func (union *DockerfileSrcPluginOverrideParentOverride) Simplify() { + simplifyUnion(union, dockerfileSrcPluginOverrideParentOverride) +} + +// +k8s:deepcopy-gen=false +type DockerfileSrcPluginOverrideParentOverrideVisitor struct { + Uri func(string) error + DevfileRegistry func(*DockerfileDevfileRegistrySourcePluginOverrideParentOverride) error + Git func(*DockerfileGitProjectSourcePluginOverrideParentOverride) error +} + var componentUnionPluginOverride reflect.Type = reflect.TypeOf(ComponentUnionPluginOverrideVisitor{}) func (union ComponentUnionPluginOverride) Visit(visitor ComponentUnionPluginOverrideVisitor) error { @@ -314,6 +443,7 @@ type ComponentUnionPluginOverrideVisitor struct { Kubernetes func(*KubernetesComponentPluginOverride) error Openshift func(*OpenshiftComponentPluginOverride) error Volume func(*VolumeComponentPluginOverride) error + Image func(*ImageComponentPluginOverride) error } var commandUnionPluginOverride reflect.Type = reflect.TypeOf(CommandUnionPluginOverrideVisitor{}) @@ -358,3 +488,45 @@ type K8sLikeComponentLocationPluginOverrideVisitor struct { Uri func(string) error Inlined func(string) error } + +var imageUnionPluginOverride reflect.Type = reflect.TypeOf(ImageUnionPluginOverrideVisitor{}) + +func (union ImageUnionPluginOverride) Visit(visitor ImageUnionPluginOverrideVisitor) error { + return visitUnion(union, visitor) +} +func (union *ImageUnionPluginOverride) discriminator() *string { + return (*string)(&union.ImageType) +} +func (union *ImageUnionPluginOverride) Normalize() error { + return normalizeUnion(union, imageUnionPluginOverride) +} +func (union *ImageUnionPluginOverride) Simplify() { + simplifyUnion(union, imageUnionPluginOverride) +} + +// +k8s:deepcopy-gen=false +type ImageUnionPluginOverrideVisitor struct { + Dockerfile func(*DockerfileImagePluginOverride) error +} + +var dockerfileSrcPluginOverride reflect.Type = reflect.TypeOf(DockerfileSrcPluginOverrideVisitor{}) + +func (union DockerfileSrcPluginOverride) Visit(visitor DockerfileSrcPluginOverrideVisitor) error { + return visitUnion(union, visitor) +} +func (union *DockerfileSrcPluginOverride) discriminator() *string { + return (*string)(&union.SrcType) +} +func (union *DockerfileSrcPluginOverride) Normalize() error { + return normalizeUnion(union, dockerfileSrcPluginOverride) +} +func (union *DockerfileSrcPluginOverride) Simplify() { + simplifyUnion(union, dockerfileSrcPluginOverride) +} + +// +k8s:deepcopy-gen=false +type DockerfileSrcPluginOverrideVisitor struct { + Uri func(string) error + DevfileRegistry func(*DockerfileDevfileRegistrySourcePluginOverride) error + Git func(*DockerfileGitProjectSourcePluginOverride) error +} diff --git a/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/main.yaml b/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/main.yaml index b1ac1a152..f8097ac81 100644 --- a/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/main.yaml +++ b/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/main.yaml @@ -8,3 +8,8 @@ components: - container: image: "aDifferentValue" name: "existing-in-parent" + - image: + imageName: "myimage:main" + dockerfile: + uri: "uri/Dockerfile" + name: "existing-in-parent-2" diff --git a/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/parent.yaml b/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/parent.yaml index 045d2b33a..905ff8617 100644 --- a/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/parent.yaml +++ b/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/parent.yaml @@ -6,3 +6,8 @@ components: - container: image: "aValue" name: "existing-in-parent" + - image: + imageName: "myimage:parent" + dockerfile: + uri: "uri/Dockerfile" + name: "existing-in-parent-2" diff --git a/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/result-error.txt b/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/result-error.txt index 358f7a5b9..2e57bab37 100644 --- a/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/result-error.txt +++ b/pkg/utils/overriding/test-fixtures/merges/duplicate-with-parent/result-error.txt @@ -1,4 +1,4 @@ 3 errors occurred: - * Some Components are already defined in parent: existing-in-parent. If you want to override them, you should do it in the parent scope. + * Some Components are already defined in parent: existing-in-parent, existing-in-parent-2. If you want to override them, you should do it in the parent scope. * Some Variables are already defined in parent: objectVariable. If you want to override them, you should do it in the parent scope. * Some Attributes are already defined in parent: mainAttribute. If you want to override them, you should do it in the parent scope. diff --git a/pkg/utils/overriding/test-fixtures/merges/no-duplicate/parent.yaml b/pkg/utils/overriding/test-fixtures/merges/no-duplicate/parent.yaml index 5e5637f72..01270ae44 100644 --- a/pkg/utils/overriding/test-fixtures/merges/no-duplicate/parent.yaml +++ b/pkg/utils/overriding/test-fixtures/merges/no-duplicate/parent.yaml @@ -6,3 +6,8 @@ components: - container: image: "aValue" name: "parent-component" + - image: + imageName: "myimage:xyz" + dockerfile: + uri: "uri/Dockerfile" + name: "parent-component-2" diff --git a/pkg/utils/overriding/test-fixtures/merges/no-duplicate/result.yaml b/pkg/utils/overriding/test-fixtures/merges/no-duplicate/result.yaml index fe10426e2..da4cfe0d7 100644 --- a/pkg/utils/overriding/test-fixtures/merges/no-duplicate/result.yaml +++ b/pkg/utils/overriding/test-fixtures/merges/no-duplicate/result.yaml @@ -10,6 +10,11 @@ components: - container: image: "aValue" name: "parent-component" + - image: + imageName: "myimage:xyz" + dockerfile: + uri: "uri/Dockerfile" + name: "parent-component-2" - container: image: "aValue" name: "plugin-component" diff --git a/pkg/utils/overriding/test-fixtures/patches/image-component-union/original.yaml b/pkg/utils/overriding/test-fixtures/patches/image-component-union/original.yaml new file mode 100644 index 000000000..648ab8e7f --- /dev/null +++ b/pkg/utils/overriding/test-fixtures/patches/image-component-union/original.yaml @@ -0,0 +1,17 @@ +components: + - name: unchanged-component + kubernetes: + inlined: "componentToUpdateInline" + endpoints: + - name: endpoint-name + targetPort: 8080 + - name: component-to-update + image: + imageName: "myimage:xyz" + dockerfile: + uri: "uri/Dockerfile" + buildContext: /FOO/BAR + args: + - "-f" + - "/dev/null" + rootRequired: false diff --git a/pkg/utils/overriding/test-fixtures/patches/image-component-union/patch.yaml b/pkg/utils/overriding/test-fixtures/patches/image-component-union/patch.yaml new file mode 100644 index 000000000..08e21c15a --- /dev/null +++ b/pkg/utils/overriding/test-fixtures/patches/image-component-union/patch.yaml @@ -0,0 +1,17 @@ +components: + - name: component-to-update + image: + imageName: "newimage:xyz" + dockerfile: + git: + fileLocation: "uri/Dockerfile" + checkoutFrom: + revision: "FOO" + remote: "foo" + remotes: + "foo": "BAR" + buildContext: /BAR/FOO + args: + - "sleep" + - "400" + rootRequired: true diff --git a/pkg/utils/overriding/test-fixtures/patches/image-component-union/result.yaml b/pkg/utils/overriding/test-fixtures/patches/image-component-union/result.yaml new file mode 100644 index 000000000..d911d7f30 --- /dev/null +++ b/pkg/utils/overriding/test-fixtures/patches/image-component-union/result.yaml @@ -0,0 +1,23 @@ +components: + - name: unchanged-component + kubernetes: + inlined: "componentToUpdateInline" + endpoints: + - name: endpoint-name + targetPort: 8080 + - name: component-to-update + image: + imageName: "newimage:xyz" + dockerfile: + git: + fileLocation: "uri/Dockerfile" + checkoutFrom: + revision: "FOO" + remote: "foo" + remotes: + "foo": "BAR" + buildContext: /BAR/FOO + args: + - "sleep" + - "400" + rootRequired: true diff --git a/pkg/validation/components.go b/pkg/validation/components.go index 8f0103b8e..10b3c89ad 100644 --- a/pkg/validation/components.go +++ b/pkg/validation/components.go @@ -22,6 +22,7 @@ const ( // 2. makes sure the volume components are unique // 3. checks the URI specified in openshift components and kubernetes components are with valid format // 4. makes sure the component name is unique +// 5. makes sure the image dockerfile component git src has at most one remote func ValidateComponents(components []v1alpha2.Component) (returnedErr error) { processedVolumes := make(map[string]bool) @@ -100,6 +101,14 @@ func ValidateComponents(components []v1alpha2.Component) (returnedErr error) { returnedErr = multierror.Append(returnedErr, resolveErrorMessageWithImportAttributes(endpointErr, component.Attributes)) } } + case component.Image != nil: + var gitSource v1alpha2.GitLikeProjectSource + if component.Image.Dockerfile != nil && component.Image.Dockerfile.Git != nil { + gitSource = component.Image.Dockerfile.Git.GitLikeProjectSource + if err := validateSingleRemoteGitSrc("component", component.Name, gitSource); err != nil { + returnedErr = multierror.Append(returnedErr, resolveErrorMessageWithImportAttributes(err, component.Attributes)) + } + } case component.Plugin != nil: if component.Plugin.RegistryUrl != "" { err := ValidateURI(component.Plugin.RegistryUrl) diff --git a/pkg/validation/components_test.go b/pkg/validation/components_test.go index 7d6bcb49c..d97349ae1 100644 --- a/pkg/validation/components_test.go +++ b/pkg/validation/components_test.go @@ -1,9 +1,10 @@ package validation import ( - "github.com/devfile/api/v2/pkg/attributes" "testing" + "github.com/devfile/api/v2/pkg/attributes" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" "github.com/hashicorp/go-multierror" "github.com/stretchr/testify/assert" @@ -80,6 +81,29 @@ func generateDummyKubernetesComponent(name string, endpoints []v1alpha2.Endpoint } } +// generateDummyImageComponent returns a dummy Image Dockerfile Component for testing +func generateDummyImageComponent(name string, src v1alpha2.DockerfileSrc) v1alpha2.Component { + + return v1alpha2.Component{ + Name: name, + ComponentUnion: v1alpha2.ComponentUnion{ + Image: &v1alpha2.ImageComponent{ + Image: v1alpha2.Image{ + ImageName: "image:latest", + ImageUnion: v1alpha2.ImageUnion{ + Dockerfile: &v1alpha2.DockerfileImage{ + DockerfileSrc: src, + Dockerfile: v1alpha2.Dockerfile{ + BuildContext: "/path", + }, + }, + }, + }, + }, + }, + } +} + // generateDummyPluginComponent returns a dummy Plugin component for testing func generateDummyPluginComponent(name, url string, compAttribute attributes.Attributes) v1alpha2.Component { @@ -128,6 +152,68 @@ func TestValidateComponents(t *testing.T) { }, } + twoRemotesGitSrc := v1alpha2.DockerfileSrc{ + Git: &v1alpha2.DockerfileGitProjectSource{ + GitProjectSource: v1alpha2.GitProjectSource{ + GitLikeProjectSource: v1alpha2.GitLikeProjectSource{ + Remotes: map[string]string{ + "a": "abc", + "x": "xyz", + }, + CheckoutFrom: &v1alpha2.CheckoutFrom{ + Remote: "a", + }, + }, + }, + }, + } + + zeroRemoteGitSrc := v1alpha2.DockerfileSrc{ + Git: &v1alpha2.DockerfileGitProjectSource{ + GitProjectSource: v1alpha2.GitProjectSource{ + GitLikeProjectSource: v1alpha2.GitLikeProjectSource{ + CheckoutFrom: &v1alpha2.CheckoutFrom{ + Remote: "a", + }, + }, + }, + }, + } + + invalidRemoteGitSrc := v1alpha2.DockerfileSrc{ + Git: &v1alpha2.DockerfileGitProjectSource{ + GitProjectSource: v1alpha2.GitProjectSource{ + GitLikeProjectSource: v1alpha2.GitLikeProjectSource{ + Remotes: map[string]string{ + "a": "abc", + }, + CheckoutFrom: &v1alpha2.CheckoutFrom{ + Remote: "b", + }, + }, + }, + }, + } + + validRemoteGitSrc := v1alpha2.DockerfileSrc{ + Git: &v1alpha2.DockerfileGitProjectSource{ + GitProjectSource: v1alpha2.GitProjectSource{ + GitLikeProjectSource: v1alpha2.GitLikeProjectSource{ + Remotes: map[string]string{ + "a": "abc", + }, + CheckoutFrom: &v1alpha2.CheckoutFrom{ + Remote: "a", + }, + }, + }, + }, + } + + validUriSrc := v1alpha2.DockerfileSrc{ + Uri: "uri", + } + endpointUrl18080 := generateDummyEndpoint("url1", 8080) endpointUrl18081 := generateDummyEndpoint("url1", 8081) endpointUrl28080 := generateDummyEndpoint("url2", 8080) @@ -139,6 +225,9 @@ func TestValidateComponents(t *testing.T) { sameEndpointNameErr := "devfile contains multiple endpoint entries with same name.*" sameTargetPortErr := "devfile contains multiple containers with same TargetPort.*" invalidURIErr := ".*invalid URI for request" + imageCompTwoRemoteErr := "component .* should have one remote only" + imageCompNoRemoteErr := "component .* should have at least one remote" + imageCompInvalidRemoteErr := "unable to find the checkout remote .* in the remotes for component .*" pluginOverridesFromMainDevfile := attributes.Attributes{}.PutString(ImportSourceAttribute, "uri: http://127.0.0.1:8080").PutString(PluginOverrideAttribute, "main devfile") @@ -246,6 +335,39 @@ func TestValidateComponents(t *testing.T) { }, wantErr: []string{duplicateComponentErr, invalidURIErr, invalidURIErrWithImportAttributes}, }, + { + name: "Invalid image dockerfile component with more than one remote", + components: []v1alpha2.Component{ + generateDummyImageComponent("name1", twoRemotesGitSrc), + }, + wantErr: []string{imageCompTwoRemoteErr}, + }, + { + name: "Invalid image dockerfile component with zero remote", + components: []v1alpha2.Component{ + generateDummyImageComponent("name1", zeroRemoteGitSrc), + }, + wantErr: []string{imageCompNoRemoteErr}, + }, + { + name: "Invalid image dockerfile component with wrong checkout", + components: []v1alpha2.Component{ + generateDummyImageComponent("name1", invalidRemoteGitSrc), + }, + wantErr: []string{imageCompInvalidRemoteErr}, + }, + { + name: "Valid image dockerfile component with correct remote", + components: []v1alpha2.Component{ + generateDummyImageComponent("name1", validRemoteGitSrc), + }, + }, + { + name: "Valid image dockerfile component with non git src", + components: []v1alpha2.Component{ + generateDummyImageComponent("name1", validUriSrc), + }, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { diff --git a/pkg/validation/errors.go b/pkg/validation/errors.go index 7e71578dc..efb42a8c8 100644 --- a/pkg/validation/errors.go +++ b/pkg/validation/errors.go @@ -2,6 +2,7 @@ package validation import ( "fmt" + "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" attributesAPI "github.com/devfile/api/v2/pkg/attributes" ) @@ -120,22 +121,24 @@ func (e *MissingProjectRemoteError) Error() string { return fmt.Sprintf("project %s should have at least one remote", e.projectName) } -//MissingStarterProjectRemoteError returns an error if the git remotes object under a starterProject is empty -type MissingStarterProjectRemoteError struct { - projectName string +//MissingRemoteError returns an error if the git remotes object is empty +type MissingRemoteError struct { + objectType string + objectName string } -func (e *MissingStarterProjectRemoteError) Error() string { - return fmt.Sprintf("starterProject %s should have at least one remote", e.projectName) +func (e *MissingRemoteError) Error() string { + return fmt.Sprintf("%s %s should have at least one remote", e.objectType, e.objectName) } -//MultipleStarterProjectRemoteError returns an error if multiple git remotes are specified. There can only be one remote. -type MultipleStarterProjectRemoteError struct { - projectName string +//MultipleRemoteError returns an error if multiple git remotes are specified. There can only be one remote. +type MultipleRemoteError struct { + objectType string + objectName string } -func (e *MultipleStarterProjectRemoteError) Error() string { - return fmt.Sprintf("starterProject %s should have one remote only", e.projectName) +func (e *MultipleRemoteError) Error() string { + return fmt.Sprintf("%s %s should have one remote only", e.objectType, e.objectName) } //MissingProjectCheckoutFromRemoteError returns an error if there are multiple git remotes but the checkoutFrom remote has not been specified @@ -149,12 +152,13 @@ func (e *MissingProjectCheckoutFromRemoteError) Error() string { //InvalidProjectCheckoutRemoteError returns an error if there is an unmatched, checkoutFrom remote specified type InvalidProjectCheckoutRemoteError struct { - projectName string + objectType string + objectName string checkoutRemote string } func (e *InvalidProjectCheckoutRemoteError) Error() string { - return fmt.Sprintf("unable to find the checkout remote %s in the remotes for project %s", e.checkoutRemote, e.projectName) + return fmt.Sprintf("unable to find the checkout remote %s in the remotes for %s %s", e.checkoutRemote, e.objectType, e.objectName) } // resolveErrorMessageWithImportAttributes returns an updated error message diff --git a/pkg/validation/projects.go b/pkg/validation/projects.go index 8fdd39bc3..4cbc875c0 100644 --- a/pkg/validation/projects.go +++ b/pkg/validation/projects.go @@ -17,22 +17,8 @@ func ValidateStarterProjects(starterProjects []v1alpha2.StarterProject) (returne continue } - switch len(gitSource.Remotes) { - case 0: - - newErr := resolveErrorMessageWithImportAttributes(&MissingStarterProjectRemoteError{projectName: starterProject.Name}, starterProject.Attributes) - returnedErr = multierror.Append(returnedErr, newErr) - case 1: - if gitSource.CheckoutFrom != nil && gitSource.CheckoutFrom.Remote != "" { - err := validateRemoteMap(gitSource.Remotes, gitSource.CheckoutFrom.Remote, starterProject.Name) - if err != nil { - newErr := resolveErrorMessageWithImportAttributes(err, starterProject.Attributes) - returnedErr = multierror.Append(returnedErr, newErr) - } - } - default: // len(gitSource.Remotes) >= 2 - - newErr := resolveErrorMessageWithImportAttributes(&MultipleStarterProjectRemoteError{projectName: starterProject.Name}, starterProject.Attributes) + if starterProjectErr := validateSingleRemoteGitSrc("starterProject", starterProject.Name, gitSource); starterProjectErr != nil { + newErr := resolveErrorMessageWithImportAttributes(starterProjectErr, starterProject.Attributes) returnedErr = multierror.Append(returnedErr, newErr) } } @@ -58,7 +44,7 @@ func ValidateProjects(projects []v1alpha2.Project) (returnedErr error) { returnedErr = multierror.Append(returnedErr, newErr) case 1: if gitSource.CheckoutFrom != nil && gitSource.CheckoutFrom.Remote != "" { - if err := validateRemoteMap(gitSource.Remotes, gitSource.CheckoutFrom.Remote, project.Name); err != nil { + if err := validateRemoteMap(gitSource.Remotes, gitSource.CheckoutFrom.Remote, "project", project.Name); err != nil { newErr := resolveErrorMessageWithImportAttributes(err, project.Attributes) returnedErr = multierror.Append(returnedErr, newErr) } @@ -70,7 +56,7 @@ func ValidateProjects(projects []v1alpha2.Project) (returnedErr error) { returnedErr = multierror.Append(returnedErr, newErr) continue } - if err := validateRemoteMap(gitSource.Remotes, gitSource.CheckoutFrom.Remote, project.Name); err != nil { + if err := validateRemoteMap(gitSource.Remotes, gitSource.CheckoutFrom.Remote, "project", project.Name); err != nil { newErr := resolveErrorMessageWithImportAttributes(err, project.Attributes) returnedErr = multierror.Append(returnedErr, newErr) } @@ -81,12 +67,28 @@ func ValidateProjects(projects []v1alpha2.Project) (returnedErr error) { } // validateRemoteMap checks if the checkout remote is present in the project remote map -func validateRemoteMap(remotes map[string]string, checkoutRemote, projectName string) error { +func validateRemoteMap(remotes map[string]string, checkoutRemote, objectType, objectName string) error { if _, ok := remotes[checkoutRemote]; !ok { - return &InvalidProjectCheckoutRemoteError{projectName: projectName, checkoutRemote: checkoutRemote} + return &InvalidProjectCheckoutRemoteError{objectName: objectName, objectType: objectType, checkoutRemote: checkoutRemote} } return nil } + +// validateSingleRemoteGitSrc validates a git src for a single remote only +func validateSingleRemoteGitSrc(objectType, objectName string, gitSource v1alpha2.GitLikeProjectSource) (err error) { + switch len(gitSource.Remotes) { + case 0: + err = &MissingRemoteError{objectType: objectType, objectName: objectName} + case 1: + if gitSource.CheckoutFrom != nil && gitSource.CheckoutFrom.Remote != "" { + err = validateRemoteMap(gitSource.Remotes, gitSource.CheckoutFrom.Remote, objectType, objectName) + } + default: // len(gitSource.Remotes) >= 2 + err = &MultipleRemoteError{objectType: objectType, objectName: objectName} + } + + return err +} diff --git a/pkg/validation/projects_test.go b/pkg/validation/projects_test.go index fff4d8e36..4ceb970d4 100644 --- a/pkg/validation/projects_test.go +++ b/pkg/validation/projects_test.go @@ -43,12 +43,12 @@ func generateDummyGitProject(name string, checkoutRemote *v1alpha2.CheckoutFrom, func TestValidateStarterProjects(t *testing.T) { oneRemoteErr := "starterProject .* should have one remote only" - wrongCheckoutErr := "unable to find the checkout remote .* in the remotes for project.*" + wrongCheckoutErr := "unable to find the checkout remote .* in the remotes for starterProject.*" atleastOneRemoteErr := "starterProject .* should have at least one remote" parentOverridesFromMainDevfile := attributes.Attributes{}.PutString(ImportSourceAttribute, "uri: http://127.0.0.1:8080").PutString(ParentOverrideAttribute, "main devfile") - wrongCheckoutErrWithImportAttributes := "unable to find the checkout remote .* in the remotes for project.*, imported from uri: http://127.0.0.1:8080, in parent overrides from main devfile" + wrongCheckoutErrWithImportAttributes := "unable to find the checkout remote .* in the remotes for starterProject.*, imported from uri: http://127.0.0.1:8080, in parent overrides from main devfile" tests := []struct { name string diff --git a/pkg/validation/validation-rule.md b/pkg/validation/validation-rule.md index fd88efa69..ac9c0f991 100644 --- a/pkg/validation/validation-rule.md +++ b/pkg/validation/validation-rule.md @@ -41,6 +41,9 @@ Common rules for all components types: #### Kubernetes & Openshift component - URI needs to be in valid URI format +#### Image component +- A Dockerfile Image component's git source cannot have more than one remote defined. If checkout remote is mentioned, validate it against the remote configured map + ### Events: 1. preStart and postStop events can only be Apply commands @@ -60,7 +63,3 @@ Common rules for all components types: ### projects - if more than one remote is configured, a checkout remote is mandatory - if checkout remote is mentioned, validate it against the starter project remote configured map - -### Architectures - -Architectures list support the following values - `amd64`, `arm64`, `ppc64le`, `s390x`. These values are determined by the .manifests[].platform["architecture"] field from an image's manifests and manually selected. diff --git a/pkg/validation/variables/test-fixtures/all/devfile-bad-output.yaml b/pkg/validation/variables/test-fixtures/all/devfile-bad-output.yaml index 3b275f83a..b74699647 100644 --- a/pkg/validation/variables/test-fixtures/all/devfile-bad-output.yaml +++ b/pkg/validation/variables/test-fixtures/all/devfile-bad-output.yaml @@ -57,6 +57,15 @@ components: - name: component4 openshift: uri: "{{foo}}" +- name: component5 + image: + imageName: "myimage:{{ tag }}" + dockerfile: + uri: "{{foo}}/Dockerfile" + buildContext: /{{foo}}/{{foo}} + args: + - "-f" + - "/dev/null" commands: - id: command1 exec: diff --git a/pkg/validation/variables/test-fixtures/all/devfile-bad.yaml b/pkg/validation/variables/test-fixtures/all/devfile-bad.yaml index 690025410..7b4c597b5 100644 --- a/pkg/validation/variables/test-fixtures/all/devfile-bad.yaml +++ b/pkg/validation/variables/test-fixtures/all/devfile-bad.yaml @@ -57,6 +57,15 @@ components: - name: component4 openshift: uri: "{{foo}}" +- name: component5 + image: + imageName: "myimage:{{ tag }}" + dockerfile: + uri: "{{foo}}/Dockerfile" + buildContext: /{{foo}}/{{foo}} + args: + - "-f" + - "{{ devnull }}" commands: - id: command1 exec: diff --git a/pkg/validation/variables/test-fixtures/all/devfile-good-output.yaml b/pkg/validation/variables/test-fixtures/all/devfile-good-output.yaml index 4cd2a463b..f37481478 100644 --- a/pkg/validation/variables/test-fixtures/all/devfile-good-output.yaml +++ b/pkg/validation/variables/test-fixtures/all/devfile-good-output.yaml @@ -42,6 +42,15 @@ components: - name: endpoint1 exposure: "public" targetPort: 9999 +- name: component3 + image: + imageName: "myimage:xyz" + dockerfile: + uri: "FOO/Dockerfile" + buildContext: /FOO/FOO + args: + - "-f" + - "/dev/null" commands: - id: command1 exec: diff --git a/pkg/validation/variables/test-fixtures/all/devfile-good.yaml b/pkg/validation/variables/test-fixtures/all/devfile-good.yaml index 76da2a3ac..1272fbab0 100644 --- a/pkg/validation/variables/test-fixtures/all/devfile-good.yaml +++ b/pkg/validation/variables/test-fixtures/all/devfile-good.yaml @@ -42,6 +42,15 @@ components: - name: endpoint1 exposure: "public" targetPort: 9999 +- name: component3 + image: + imageName: "myimage:{{ tag }}" + dockerfile: + uri: "{{foo}}/Dockerfile" + buildContext: /{{foo}}/{{foo}} + args: + - "-f" + - "{{ devnull }}" commands: - id: command1 exec: diff --git a/pkg/validation/variables/test-fixtures/components/image-dockerfile-git-output.yaml b/pkg/validation/variables/test-fixtures/components/image-dockerfile-git-output.yaml new file mode 100644 index 000000000..da723ec5b --- /dev/null +++ b/pkg/validation/variables/test-fixtures/components/image-dockerfile-git-output.yaml @@ -0,0 +1,11 @@ +imageName: "myimage:xyz" +dockerfile: + git: + fileLocation: "uri/Dockerfile" + checkoutFrom: + revision: "FOO" + remote: "BAR" + remotes: + "BAR": "foo" + buildContext: /FOO/BAR + rootRequired: true diff --git a/pkg/validation/variables/test-fixtures/components/image-dockerfile-git.yaml b/pkg/validation/variables/test-fixtures/components/image-dockerfile-git.yaml new file mode 100644 index 000000000..f27712dee --- /dev/null +++ b/pkg/validation/variables/test-fixtures/components/image-dockerfile-git.yaml @@ -0,0 +1,11 @@ +imageName: "myimage:{{ tag }}" +dockerfile: + git: + fileLocation: "{{ uri }}/Dockerfile" + checkoutFrom: + revision: "{{foo}}" + remote: "{{bar}}" + remotes: + "{{bar}}": "foo" + buildContext: /{{foo}}/{{bar}} + rootRequired: true diff --git a/pkg/validation/variables/test-fixtures/components/image-dockerfile-registry-output.yaml b/pkg/validation/variables/test-fixtures/components/image-dockerfile-registry-output.yaml new file mode 100644 index 000000000..826557933 --- /dev/null +++ b/pkg/validation/variables/test-fixtures/components/image-dockerfile-registry-output.yaml @@ -0,0 +1,7 @@ +imageName: "myimage:xyz" +dockerfile: + devfileRegistry: + id: "FOO/BAR" + registryUrl: "http://uri" + buildContext: /FOO/BAR + rootRequired: true diff --git a/pkg/validation/variables/test-fixtures/components/image-dockerfile-registry.yaml b/pkg/validation/variables/test-fixtures/components/image-dockerfile-registry.yaml new file mode 100644 index 000000000..4c695245f --- /dev/null +++ b/pkg/validation/variables/test-fixtures/components/image-dockerfile-registry.yaml @@ -0,0 +1,7 @@ +imageName: "myimage:{{ tag }}" +dockerfile: + devfileRegistry: + id: "{{foo}}/{{bar}}" + registryUrl: "http://{{ uri }}" + buildContext: /{{foo}}/{{bar}} + rootRequired: true diff --git a/pkg/validation/variables/test-fixtures/components/image-dockerfile-uri-output.yaml b/pkg/validation/variables/test-fixtures/components/image-dockerfile-uri-output.yaml new file mode 100644 index 000000000..4642bfdae --- /dev/null +++ b/pkg/validation/variables/test-fixtures/components/image-dockerfile-uri-output.yaml @@ -0,0 +1,7 @@ +imageName: "myimage:xyz" +dockerfile: + uri: "uri/Dockerfile" + buildContext: /FOO/BAR + args: + - "-f" + - "/dev/null" diff --git a/pkg/validation/variables/test-fixtures/components/image-dockerfile-uri.yaml b/pkg/validation/variables/test-fixtures/components/image-dockerfile-uri.yaml new file mode 100644 index 000000000..037843106 --- /dev/null +++ b/pkg/validation/variables/test-fixtures/components/image-dockerfile-uri.yaml @@ -0,0 +1,7 @@ +imageName: "myimage:{{ tag }}" +dockerfile: + uri: "{{uri}}/Dockerfile" + buildContext: /{{foo}}/{{bar}} + args: + - "-f" + - "{{ devnull }}" diff --git a/pkg/validation/variables/test-fixtures/components/image-empty.yaml b/pkg/validation/variables/test-fixtures/components/image-empty.yaml new file mode 100644 index 000000000..d8dd47d6c --- /dev/null +++ b/pkg/validation/variables/test-fixtures/components/image-empty.yaml @@ -0,0 +1 @@ +imageName: "myimage:xyz" diff --git a/pkg/validation/variables/variables_command.go b/pkg/validation/variables/variables_command.go index 8e9c08679..eb51b230a 100644 --- a/pkg/validation/variables/variables_command.go +++ b/pkg/validation/variables/variables_command.go @@ -41,31 +41,33 @@ func ValidateAndReplaceForCommands(variables map[string]string, commands []v1alp // validateAndReplaceForExecCommand validates the exec command data for global variable references and replaces them with the variable value func validateAndReplaceForExecCommand(variables map[string]string, exec *v1alpha2.ExecCommand) error { - var err error + if exec == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if exec != nil { - // Validate exec command line - if exec.CommandLine, err = validateAndReplaceDataWithVariable(exec.CommandLine, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate exec command line + if exec.CommandLine, err = validateAndReplaceDataWithVariable(exec.CommandLine, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate exec working dir - if exec.WorkingDir, err = validateAndReplaceDataWithVariable(exec.WorkingDir, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate exec working dir + if exec.WorkingDir, err = validateAndReplaceDataWithVariable(exec.WorkingDir, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate exec label - if exec.Label, err = validateAndReplaceDataWithVariable(exec.Label, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate exec label + if exec.Label, err = validateAndReplaceDataWithVariable(exec.Label, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate exec env - if len(exec.Env) > 0 { - if err = validateAndReplaceForEnv(variables, exec.Env); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate exec env + if len(exec.Env) > 0 { + if err = validateAndReplaceForEnv(variables, exec.Env); err != nil { + checkForInvalidError(invalidKeys, err) } } @@ -74,15 +76,17 @@ func validateAndReplaceForExecCommand(variables map[string]string, exec *v1alpha // validateAndReplaceForCompositeCommand validates the composite command data for global variable references and replaces them with the variable value func validateAndReplaceForCompositeCommand(variables map[string]string, composite *v1alpha2.CompositeCommand) error { - var err error + if composite == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if composite != nil { - // Validate composite label - if composite.Label, err = validateAndReplaceDataWithVariable(composite.Label, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate composite label + if composite.Label, err = validateAndReplaceDataWithVariable(composite.Label, variables); err != nil { + checkForInvalidError(invalidKeys, err) } return newInvalidKeysError(invalidKeys) @@ -90,15 +94,17 @@ func validateAndReplaceForCompositeCommand(variables map[string]string, composit // validateAndReplaceForApplyCommand validates the apply command data for global variable references and replaces them with the variable value func validateAndReplaceForApplyCommand(variables map[string]string, apply *v1alpha2.ApplyCommand) error { - var err error + if apply == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if apply != nil { - // Validate apply label - if apply.Label, err = validateAndReplaceDataWithVariable(apply.Label, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate apply label + if apply.Label, err = validateAndReplaceDataWithVariable(apply.Label, variables); err != nil { + checkForInvalidError(invalidKeys, err) } return newInvalidKeysError(invalidKeys) diff --git a/pkg/validation/variables/variables_command_test.go b/pkg/validation/variables/variables_command_test.go index d5f34ae18..b94d2667d 100644 --- a/pkg/validation/variables/variables_command_test.go +++ b/pkg/validation/variables/variables_command_test.go @@ -1,6 +1,7 @@ package variables import ( + "reflect" "testing" "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" @@ -30,6 +31,13 @@ func TestValidateAndReplaceExecCommand(t *testing.T) { variableFile: "test-fixtures/variables/variables-notreferenced.yaml", wantErr: true, }, + { + name: "Not an exec command", + testFile: "test-fixtures/components/volume.yaml", + outputFile: "test-fixtures/components/volume.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -39,7 +47,12 @@ func TestValidateAndReplaceExecCommand(t *testing.T) { testVariable := make(map[string]string) readFileToStruct(t, tt.variableFile, &testVariable) - err := validateAndReplaceForExecCommand(testVariable, &testExecCommand) + var err error + if reflect.DeepEqual(testExecCommand, v1alpha2.ExecCommand{}) { + err = validateAndReplaceForExecCommand(testVariable, nil) + } else { + err = validateAndReplaceForExecCommand(testVariable, &testExecCommand) + } _, ok := err.(*InvalidKeysError) if tt.wantErr && !ok { t.Errorf("Expected InvalidKeysError error from test but got %+v", err) @@ -77,6 +90,13 @@ func TestValidateAndReplaceCompositeCommand(t *testing.T) { variableFile: "test-fixtures/variables/variables-notreferenced.yaml", wantErr: true, }, + { + name: "Not a composite command", + testFile: "test-fixtures/components/volume.yaml", + outputFile: "test-fixtures/components/volume.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -86,7 +106,12 @@ func TestValidateAndReplaceCompositeCommand(t *testing.T) { testVariable := make(map[string]string) readFileToStruct(t, tt.variableFile, &testVariable) - err := validateAndReplaceForCompositeCommand(testVariable, &testCompositeCommand) + var err error + if reflect.DeepEqual(testCompositeCommand, v1alpha2.CompositeCommand{}) { + err = validateAndReplaceForCompositeCommand(testVariable, nil) + } else { + err = validateAndReplaceForCompositeCommand(testVariable, &testCompositeCommand) + } _, ok := err.(*InvalidKeysError) if tt.wantErr && !ok { t.Errorf("Expected InvalidKeysError error from test but got %+v", err) @@ -124,6 +149,13 @@ func TestValidateAndReplaceApplyCommand(t *testing.T) { variableFile: "test-fixtures/variables/variables-notreferenced.yaml", wantErr: true, }, + { + name: "Not an apply command", + testFile: "test-fixtures/components/volume.yaml", + outputFile: "test-fixtures/components/volume.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -133,7 +165,12 @@ func TestValidateAndReplaceApplyCommand(t *testing.T) { testVariable := make(map[string]string) readFileToStruct(t, tt.variableFile, &testVariable) - err := validateAndReplaceForApplyCommand(testVariable, &testApplyCommand) + var err error + if reflect.DeepEqual(testApplyCommand, v1alpha2.ApplyCommand{}) { + err = validateAndReplaceForApplyCommand(testVariable, nil) + } else { + err = validateAndReplaceForApplyCommand(testVariable, &testApplyCommand) + } _, ok := err.(*InvalidKeysError) if tt.wantErr && !ok { t.Errorf("Expected InvalidKeysError error from test but got %+v", err) diff --git a/pkg/validation/variables/variables_component.go b/pkg/validation/variables/variables_component.go index ce5a3f1bc..a42aa2f17 100644 --- a/pkg/validation/variables/variables_component.go +++ b/pkg/validation/variables/variables_component.go @@ -33,6 +33,12 @@ func ValidateAndReplaceForComponents(variables map[string]string, components []v componentsWarningMap[components[i].Name] = verr.Keys } } + case components[i].Image != nil: + if err = validateAndReplaceForImageComponent(variables, components[i].Image); err != nil { + if verr, ok := err.(*InvalidKeysError); ok { + componentsWarningMap[components[i].Name] = verr.Keys + } + } case components[i].Volume != nil: if err = validateAndReplaceForVolumeComponent(variables, components[i].Volume); err != nil { if verr, ok := err.(*InvalidKeysError); ok { @@ -47,64 +53,66 @@ func ValidateAndReplaceForComponents(variables map[string]string, components []v // validateAndReplaceForContainerComponent validates the container component data for global variable references and replaces them with the variable value func validateAndReplaceForContainerComponent(variables map[string]string, container *v1alpha2.ContainerComponent) error { - var err error + if container == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if container != nil { - // Validate container image - if container.Image, err = validateAndReplaceDataWithVariable(container.Image, variables); err != nil { + // Validate container image + if container.Image, err = validateAndReplaceDataWithVariable(container.Image, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + + // Validate container commands + for i := range container.Command { + if container.Command[i], err = validateAndReplaceDataWithVariable(container.Command[i], variables); err != nil { checkForInvalidError(invalidKeys, err) } + } - // Validate container commands - for i := range container.Command { - if container.Command[i], err = validateAndReplaceDataWithVariable(container.Command[i], variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate container args + for i := range container.Args { + if container.Args[i], err = validateAndReplaceDataWithVariable(container.Args[i], variables); err != nil { + checkForInvalidError(invalidKeys, err) } + } - // Validate container args - for i := range container.Args { - if container.Args[i], err = validateAndReplaceDataWithVariable(container.Args[i], variables); err != nil { - checkForInvalidError(invalidKeys, err) - } - } + // Validate memory limit + if container.MemoryLimit, err = validateAndReplaceDataWithVariable(container.MemoryLimit, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate memory limit - if container.MemoryLimit, err = validateAndReplaceDataWithVariable(container.MemoryLimit, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate memory request + if container.MemoryRequest, err = validateAndReplaceDataWithVariable(container.MemoryRequest, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate memory request - if container.MemoryRequest, err = validateAndReplaceDataWithVariable(container.MemoryRequest, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate source mapping + if container.SourceMapping, err = validateAndReplaceDataWithVariable(container.SourceMapping, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate source mapping - if container.SourceMapping, err = validateAndReplaceDataWithVariable(container.SourceMapping, variables); err != nil { + // Validate container env + if len(container.Env) > 0 { + if err = validateAndReplaceForEnv(variables, container.Env); err != nil { checkForInvalidError(invalidKeys, err) } + } - // Validate container env - if len(container.Env) > 0 { - if err = validateAndReplaceForEnv(variables, container.Env); err != nil { - checkForInvalidError(invalidKeys, err) - } - } - - // Validate container volume mounts - for i := range container.VolumeMounts { - if container.VolumeMounts[i].Path, err = validateAndReplaceDataWithVariable(container.VolumeMounts[i].Path, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate container volume mounts + for i := range container.VolumeMounts { + if container.VolumeMounts[i].Path, err = validateAndReplaceDataWithVariable(container.VolumeMounts[i].Path, variables); err != nil { + checkForInvalidError(invalidKeys, err) } + } - // Validate container endpoints - if len(container.Endpoints) > 0 { - if err = validateAndReplaceForEndpoint(variables, container.Endpoints); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate container endpoints + if len(container.Endpoints) > 0 { + if err = validateAndReplaceForEndpoint(variables, container.Endpoints); err != nil { + checkForInvalidError(invalidKeys, err) } } @@ -135,26 +143,28 @@ func validateAndReplaceForEnv(variables map[string]string, env []v1alpha2.EnvVar // validateAndReplaceForKubernetesComponent validates the kubernetes component data for global variable references and replaces them with the variable value func validateAndReplaceForKubernetesComponent(variables map[string]string, kubernetes *v1alpha2.KubernetesComponent) error { - var err error + if kubernetes == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if kubernetes != nil { - // Validate kubernetes uri - if kubernetes.Uri, err = validateAndReplaceDataWithVariable(kubernetes.Uri, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate kubernetes uri + if kubernetes.Uri, err = validateAndReplaceDataWithVariable(kubernetes.Uri, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate kubernetes inlined - if kubernetes.Inlined, err = validateAndReplaceDataWithVariable(kubernetes.Inlined, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate kubernetes inlined + if kubernetes.Inlined, err = validateAndReplaceDataWithVariable(kubernetes.Inlined, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } - // Validate kubernetes endpoints - if len(kubernetes.Endpoints) > 0 { - if err = validateAndReplaceForEndpoint(variables, kubernetes.Endpoints); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate kubernetes endpoints + if len(kubernetes.Endpoints) > 0 { + if err = validateAndReplaceForEndpoint(variables, kubernetes.Endpoints); err != nil { + checkForInvalidError(invalidKeys, err) } } @@ -163,26 +173,101 @@ func validateAndReplaceForKubernetesComponent(variables map[string]string, kuber // validateAndReplaceForOpenShiftComponent validates the openshift component data for global variable references and replaces them with the variable value func validateAndReplaceForOpenShiftComponent(variables map[string]string, openshift *v1alpha2.OpenshiftComponent) error { + + if openshift == nil { + return nil + } + var err error + invalidKeys := make(map[string]bool) + + // Validate openshift uri + if openshift.Uri, err = validateAndReplaceDataWithVariable(openshift.Uri, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + + // Validate openshift inlined + if openshift.Inlined, err = validateAndReplaceDataWithVariable(openshift.Inlined, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + + // Validate openshift endpoints + if len(openshift.Endpoints) > 0 { + if err = validateAndReplaceForEndpoint(variables, openshift.Endpoints); err != nil { + checkForInvalidError(invalidKeys, err) + } + } + + return newInvalidKeysError(invalidKeys) +} + +// validateAndReplaceForImageComponent validates the image component data for global variable references and replaces them with the variable value +func validateAndReplaceForImageComponent(variables map[string]string, image *v1alpha2.ImageComponent) error { + + if image == nil { + return nil + } + + var err error + invalidKeys := make(map[string]bool) + + // Validate image's image name + if image.ImageName, err = validateAndReplaceDataWithVariable(image.ImageName, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + + if err = validateAndReplaceForDockerfileImageComponent(variables, image.Dockerfile); err != nil { + checkForInvalidError(invalidKeys, err) + } + + return newInvalidKeysError(invalidKeys) +} + +// validateAndReplaceForDockerfileImageComponent validates the dockerfile image component data for global variable references and replaces them with the variable value +func validateAndReplaceForDockerfileImageComponent(variables map[string]string, dockerfileImage *v1alpha2.DockerfileImage) error { + if dockerfileImage == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if openshift != nil { - // Validate openshift uri - if openshift.Uri, err = validateAndReplaceDataWithVariable(openshift.Uri, variables); err != nil { + switch { + case dockerfileImage.Uri != "": + // Validate dockerfile image URI + if dockerfileImage.Uri, err = validateAndReplaceDataWithVariable(dockerfileImage.Uri, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + case dockerfileImage.Git != nil: + // Validate dockerfile Git location + if dockerfileImage.Git.FileLocation, err = validateAndReplaceDataWithVariable(dockerfileImage.Git.FileLocation, variables); err != nil { checkForInvalidError(invalidKeys, err) } - // Validate openshift inlined - if openshift.Inlined, err = validateAndReplaceDataWithVariable(openshift.Inlined, variables); err != nil { + gitProject := &dockerfileImage.Git.GitLikeProjectSource + if err = validateAndReplaceForGitProjectSource(variables, gitProject); err != nil { + checkForInvalidError(invalidKeys, err) + } + case dockerfileImage.DevfileRegistry != nil: + // Validate dockerfile devfile registry src + if dockerfileImage.DevfileRegistry.Id, err = validateAndReplaceDataWithVariable(dockerfileImage.DevfileRegistry.Id, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + if dockerfileImage.DevfileRegistry.RegistryUrl, err = validateAndReplaceDataWithVariable(dockerfileImage.DevfileRegistry.RegistryUrl, variables); err != nil { checkForInvalidError(invalidKeys, err) } + } - // Validate openshift endpoints - if len(openshift.Endpoints) > 0 { - if err = validateAndReplaceForEndpoint(variables, openshift.Endpoints); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate dockerfile image's build context + if dockerfileImage.BuildContext, err = validateAndReplaceDataWithVariable(dockerfileImage.BuildContext, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + + // Validate dockerfile image's args + for i := range dockerfileImage.Args { + if dockerfileImage.Args[i], err = validateAndReplaceDataWithVariable(dockerfileImage.Args[i], variables); err != nil { + checkForInvalidError(invalidKeys, err) } } @@ -191,15 +276,17 @@ func validateAndReplaceForOpenShiftComponent(variables map[string]string, opensh // validateAndReplaceForVolumeComponent validates the volume component data for global variable references and replaces them with the variable value func validateAndReplaceForVolumeComponent(variables map[string]string, volume *v1alpha2.VolumeComponent) error { - var err error + if volume == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if volume != nil { - // Validate volume size - if volume.Size, err = validateAndReplaceDataWithVariable(volume.Size, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } + // Validate volume size + if volume.Size, err = validateAndReplaceDataWithVariable(volume.Size, variables); err != nil { + checkForInvalidError(invalidKeys, err) } return newInvalidKeysError(invalidKeys) diff --git a/pkg/validation/variables/variables_component_test.go b/pkg/validation/variables/variables_component_test.go index c972c8888..95164198a 100644 --- a/pkg/validation/variables/variables_component_test.go +++ b/pkg/validation/variables/variables_component_test.go @@ -1,6 +1,7 @@ package variables import ( + "reflect" "testing" "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" @@ -30,6 +31,13 @@ func TestValidateAndReplaceContainerComponent(t *testing.T) { variableFile: "test-fixtures/variables/variables-notreferenced.yaml", wantErr: true, }, + { + name: "Not a container component", + testFile: "test-fixtures/components/volume.yaml", + outputFile: "test-fixtures/components/volume.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -39,7 +47,13 @@ func TestValidateAndReplaceContainerComponent(t *testing.T) { testVariable := make(map[string]string) readFileToStruct(t, tt.variableFile, &testVariable) - err := validateAndReplaceForContainerComponent(testVariable, &testContainerComponent) + var err error + if reflect.DeepEqual(testContainerComponent, v1alpha2.ContainerComponent{}) { + err = validateAndReplaceForContainerComponent(testVariable, nil) + } else { + err = validateAndReplaceForContainerComponent(testVariable, &testContainerComponent) + } + _, ok := err.(*InvalidKeysError) if tt.wantErr && !ok { t.Errorf("Expected InvalidKeysError error from test but got %+v", err) @@ -77,6 +91,13 @@ func TestValidateAndReplaceOpenShiftKubernetesComponent(t *testing.T) { variableFile: "test-fixtures/variables/variables-notreferenced.yaml", wantErr: true, }, + { + name: "Not an openshift or a kubernetes component", + testFile: "test-fixtures/components/volume.yaml", + outputFile: "test-fixtures/components/volume.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -89,7 +110,12 @@ func TestValidateAndReplaceOpenShiftKubernetesComponent(t *testing.T) { testVariable := make(map[string]string) readFileToStruct(t, tt.variableFile, &testVariable) - err := validateAndReplaceForOpenShiftComponent(testVariable, &testOpenshiftComponent) + var err error + if reflect.DeepEqual(testOpenshiftComponent, v1alpha2.OpenshiftComponent{}) { + err = validateAndReplaceForOpenShiftComponent(testVariable, nil) + } else { + err = validateAndReplaceForOpenShiftComponent(testVariable, &testOpenshiftComponent) + } if tt.wantErr && err == nil { t.Errorf("Expected error from test but got nil") } else if !tt.wantErr && err != nil { @@ -100,7 +126,11 @@ func TestValidateAndReplaceOpenShiftKubernetesComponent(t *testing.T) { assert.Equal(t, expectedOpenshiftComponent, testOpenshiftComponent, "The two values should be the same.") } - err = validateAndReplaceForKubernetesComponent(testVariable, &testKubernetesComponent) + if reflect.DeepEqual(testKubernetesComponent, v1alpha2.KubernetesComponent{}) { + err = validateAndReplaceForKubernetesComponent(testVariable, nil) + } else { + err = validateAndReplaceForKubernetesComponent(testVariable, &testKubernetesComponent) + } _, ok := err.(*InvalidKeysError) if tt.wantErr && !ok { t.Errorf("Expected InvalidKeysError error from test but got %+v", err) @@ -115,6 +145,100 @@ func TestValidateAndReplaceOpenShiftKubernetesComponent(t *testing.T) { } } +func TestValidateAndReplaceImageComponent(t *testing.T) { + + tests := []struct { + name string + testFile string + outputFile string + variableFile string + wantErr bool + }{ + { + name: "Good Substitution - dockerfile uri src", + testFile: "test-fixtures/components/image-dockerfile-uri.yaml", + outputFile: "test-fixtures/components/image-dockerfile-uri-output.yaml", + variableFile: "test-fixtures/variables/variables-referenced.yaml", + wantErr: false, + }, + { + name: "Good Substitution - dockerfile git src", + testFile: "test-fixtures/components/image-dockerfile-git.yaml", + outputFile: "test-fixtures/components/image-dockerfile-git-output.yaml", + variableFile: "test-fixtures/variables/variables-referenced.yaml", + wantErr: false, + }, + { + name: "Good Substitution - dockerfile registry src", + testFile: "test-fixtures/components/image-dockerfile-registry.yaml", + outputFile: "test-fixtures/components/image-dockerfile-registry-output.yaml", + variableFile: "test-fixtures/variables/variables-referenced.yaml", + wantErr: false, + }, + { + name: "Invalid Reference - dockerfile uri src", + testFile: "test-fixtures/components/image-dockerfile-uri.yaml", + outputFile: "test-fixtures/components/image-dockerfile-uri.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: true, + }, + { + name: "Invalid Reference - dockerfile git src", + testFile: "test-fixtures/components/image-dockerfile-git.yaml", + outputFile: "test-fixtures/components/image-dockerfile-git.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: true, + }, + { + name: "Invalid Reference - dockerfile registry src", + testFile: "test-fixtures/components/image-dockerfile-registry.yaml", + outputFile: "test-fixtures/components/image-dockerfile-registry.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: true, + }, + { + name: "Not an image component", + testFile: "test-fixtures/components/volume.yaml", + outputFile: "test-fixtures/components/volume.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, + { + name: "Not an image dockerfile component", + testFile: "test-fixtures/components/image-empty.yaml", + outputFile: "test-fixtures/components/image-empty.yaml", + variableFile: "test-fixtures/variables/variables-referenced.yaml", + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + testImageComponent := v1alpha2.ImageComponent{} + readFileToStruct(t, tt.testFile, &testImageComponent) + + testVariable := make(map[string]string) + readFileToStruct(t, tt.variableFile, &testVariable) + + var err error + if reflect.DeepEqual(testImageComponent, v1alpha2.ImageComponent{}) { + err = validateAndReplaceForImageComponent(testVariable, nil) + } else { + err = validateAndReplaceForImageComponent(testVariable, &testImageComponent) + } + _, ok := err.(*InvalidKeysError) + if tt.wantErr && !ok { + t.Errorf("Expected InvalidKeysError error from test but got %+v", err) + } else if !tt.wantErr && err != nil { + t.Errorf("Got unexpected error: %s", err) + } else { + expectedImageComponent := v1alpha2.ImageComponent{} + readFileToStruct(t, tt.outputFile, &expectedImageComponent) + assert.Equal(t, expectedImageComponent, testImageComponent, "The two values should be the same.") + } + }) + } +} + func TestValidateAndReplaceVolumeComponent(t *testing.T) { tests := []struct { @@ -138,6 +262,13 @@ func TestValidateAndReplaceVolumeComponent(t *testing.T) { variableFile: "test-fixtures/variables/variables-notreferenced.yaml", wantErr: true, }, + { + name: "Not a volume component", + testFile: "test-fixtures/components/container.yaml", + outputFile: "test-fixtures/components/container.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -147,7 +278,12 @@ func TestValidateAndReplaceVolumeComponent(t *testing.T) { testVariable := make(map[string]string) readFileToStruct(t, tt.variableFile, &testVariable) - err := validateAndReplaceForVolumeComponent(testVariable, &testVolumeComponent) + var err error + if reflect.DeepEqual(testVolumeComponent, v1alpha2.VolumeComponent{}) { + err = validateAndReplaceForVolumeComponent(testVariable, nil) + } else { + err = validateAndReplaceForVolumeComponent(testVariable, &testVolumeComponent) + } _, ok := err.(*InvalidKeysError) if tt.wantErr && !ok { t.Errorf("Expected InvalidKeysError error from test but got %+v", err) diff --git a/pkg/validation/variables/variables_project.go b/pkg/validation/variables/variables_project.go index 09d1cdab1..15afe4616 100644 --- a/pkg/validation/variables/variables_project.go +++ b/pkg/validation/variables/variables_project.go @@ -72,47 +72,65 @@ func ValidateAndReplaceForStarterProjects(variables map[string]string, starterPr // validateandReplaceForProjectSource validates a project source location for global variable references and replaces them with the variable value func validateandReplaceForProjectSource(variables map[string]string, projectSource *v1alpha2.ProjectSource) error { + if projectSource == nil { + return nil + } + var err error + invalidKeys := make(map[string]bool) + + switch { + case projectSource.Zip != nil: + if projectSource.Zip.Location, err = validateAndReplaceDataWithVariable(projectSource.Zip.Location, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + case projectSource.Git != nil: + gitProject := &projectSource.Git.GitLikeProjectSource + + if err = validateAndReplaceForGitProjectSource(variables, gitProject); err != nil { + checkForInvalidError(invalidKeys, err) + } + } + + return newInvalidKeysError(invalidKeys) +} + +// validateAndReplaceForGitProjectSource validates a project git src for global variable references and replaces them with the variable value +func validateAndReplaceForGitProjectSource(variables map[string]string, gitProject *v1alpha2.GitLikeProjectSource) error { + if gitProject == nil { + return nil + } + + var err error invalidKeys := make(map[string]bool) - if projectSource != nil { - switch { - case projectSource.Zip != nil: - if projectSource.Zip.Location, err = validateAndReplaceDataWithVariable(projectSource.Zip.Location, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } - case projectSource.Git != nil: - gitProject := &projectSource.Git.GitLikeProjectSource - - if gitProject.CheckoutFrom != nil { - // validate git checkout revision - if gitProject.CheckoutFrom.Revision, err = validateAndReplaceDataWithVariable(gitProject.CheckoutFrom.Revision, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } - - // // validate git checkout remote - if gitProject.CheckoutFrom.Remote, err = validateAndReplaceDataWithVariable(gitProject.CheckoutFrom.Remote, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } - } - - // validate git remotes - for k := range gitProject.Remotes { - // validate remote map value - if gitProject.Remotes[k], err = validateAndReplaceDataWithVariable(gitProject.Remotes[k], variables); err != nil { - checkForInvalidError(invalidKeys, err) - } - - // validate remote map key - var updatedKey string - if updatedKey, err = validateAndReplaceDataWithVariable(k, variables); err != nil { - checkForInvalidError(invalidKeys, err) - } else if updatedKey != k { - gitProject.Remotes[updatedKey] = gitProject.Remotes[k] - delete(gitProject.Remotes, k) - } - } + if gitProject.CheckoutFrom != nil { + // validate git checkout revision + if gitProject.CheckoutFrom.Revision, err = validateAndReplaceDataWithVariable(gitProject.CheckoutFrom.Revision, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + + // // validate git checkout remote + if gitProject.CheckoutFrom.Remote, err = validateAndReplaceDataWithVariable(gitProject.CheckoutFrom.Remote, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + } + + // validate git remotes + for k := range gitProject.Remotes { + // validate remote map value + if gitProject.Remotes[k], err = validateAndReplaceDataWithVariable(gitProject.Remotes[k], variables); err != nil { + checkForInvalidError(invalidKeys, err) + } + + // validate remote map key + var updatedKey string + if updatedKey, err = validateAndReplaceDataWithVariable(k, variables); err != nil { + checkForInvalidError(invalidKeys, err) + } else if updatedKey != k { + gitProject.Remotes[updatedKey] = gitProject.Remotes[k] + delete(gitProject.Remotes, k) } } diff --git a/pkg/validation/variables/variables_project_test.go b/pkg/validation/variables/variables_project_test.go index ca932fa57..a1d99a9e4 100644 --- a/pkg/validation/variables/variables_project_test.go +++ b/pkg/validation/variables/variables_project_test.go @@ -1,6 +1,7 @@ package variables import ( + "reflect" "testing" "github.com/devfile/api/v2/pkg/apis/workspaces/v1alpha2" @@ -125,6 +126,13 @@ func TestValidateAndReplaceProjectSrc(t *testing.T) { variableFile: "test-fixtures/variables/variables-notreferenced.yaml", wantErr: true, }, + { + name: "Not a project source", + testFile: "test-fixtures/components/volume.yaml", + outputFile: "test-fixtures/components/volume.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { @@ -134,7 +142,12 @@ func TestValidateAndReplaceProjectSrc(t *testing.T) { testVariable := make(map[string]string) readFileToStruct(t, tt.variableFile, &testVariable) - err := validateandReplaceForProjectSource(testVariable, &testProjectSrc) + var err error + if reflect.DeepEqual(testProjectSrc, v1alpha2.ProjectSource{}) { + err = validateandReplaceForProjectSource(testVariable, nil) + } else { + err = validateandReplaceForProjectSource(testVariable, &testProjectSrc) + } _, ok := err.(*InvalidKeysError) if tt.wantErr && !ok { t.Errorf("Expected InvalidKeysError error from test but got %+v", err) @@ -148,3 +161,55 @@ func TestValidateAndReplaceProjectSrc(t *testing.T) { }) } } + +func TestValidateAndReplaceGitProjectSrc(t *testing.T) { + + tests := []struct { + name string + testFile string + outputFile string + variableFile string + wantErr bool + }{ + { + name: "Good Git Substitution", + testFile: "test-fixtures/projects/git.yaml", + outputFile: "test-fixtures/projects/git-output.yaml", + variableFile: "test-fixtures/variables/variables-referenced.yaml", + wantErr: false, + }, + { + name: "Not a git roject source", + testFile: "test-fixtures/projects/zip.yaml", + outputFile: "test-fixtures/projects/zip.yaml", + variableFile: "test-fixtures/variables/variables-notreferenced.yaml", + wantErr: false, + }, + } + for _, tt := range tests { + t.Run(tt.name, func(t *testing.T) { + testProjectGitSrc := v1alpha2.GitLikeProjectSource{} + readFileToStruct(t, tt.testFile, &testProjectGitSrc) + + testVariable := make(map[string]string) + readFileToStruct(t, tt.variableFile, &testVariable) + + var err error + if reflect.DeepEqual(testProjectGitSrc, v1alpha2.GitLikeProjectSource{}) { + err = validateAndReplaceForGitProjectSource(testVariable, nil) + } else { + err = validateAndReplaceForGitProjectSource(testVariable, &testProjectGitSrc) + } + _, ok := err.(*InvalidKeysError) + if tt.wantErr && !ok { + t.Errorf("Expected InvalidKeysError error from test but got %+v", err) + } else if !tt.wantErr && err != nil { + t.Errorf("Got unexpected error: %s", err) + } else { + expectedProjectSrc := v1alpha2.GitLikeProjectSource{} + readFileToStruct(t, tt.outputFile, &expectedProjectSrc) + assert.Equal(t, expectedProjectSrc, testProjectGitSrc, "The two values should be the same.") + } + }) + } +} diff --git a/pkg/validation/variables/variables_test.go b/pkg/validation/variables/variables_test.go index 6aa1936dd..0ebdc7eb6 100644 --- a/pkg/validation/variables/variables_test.go +++ b/pkg/validation/variables/variables_test.go @@ -39,6 +39,7 @@ func TestValidateGlobalVariableBasic(t *testing.T) { "component2": {"bar", "foo", "x"}, "component3": {"xyz"}, "component4": {"foo"}, + "component5": {"foo", "tag"}, }, Projects: map[string][]string{ "project1": {"dir", "path", "tag", "version", "version1"}, diff --git a/samples/devfiles/deployment-manifest.yaml b/samples/devfiles/deployment-manifest.yaml new file mode 100644 index 000000000..8b94de0b7 --- /dev/null +++ b/samples/devfiles/deployment-manifest.yaml @@ -0,0 +1,26 @@ +--- +kind: Deployment +apiVersion: apps/v1 +metadata: + name: my-node +spec: + replicas: 1 + selector: + matchLabels: + app: node-app + template: + metadata: + labels: + app: node-app + spec: + containers: + - name: my-node + image: node-image:latest + ports: + - name: http + containerPort: 3001 + protocol: TCP + resources: + limits: + memory: "128Mi" + cpu: "500m" diff --git a/samples/devfiles/outerloop-dockerfile-build-inlined-deploy-devfile.yaml b/samples/devfiles/outerloop-dockerfile-build-inlined-deploy-devfile.yaml new file mode 100644 index 000000000..0d3fda102 --- /dev/null +++ b/samples/devfiles/outerloop-dockerfile-build-inlined-deploy-devfile.yaml @@ -0,0 +1,105 @@ +# Devfile based on the existing Node Sample https://github.com/nodeshift-starters/devfile-sample +schemaVersion: 2.1.0 +metadata: + name: nodejs + version: 1.0.1 + displayName: Node.js Runtime + description: Stack with Node.js 14 + tags: ["NodeJS", "Express", "ubi8"] + projectType: "nodejs" + language: "nodejs" +variables: + CONTAINER_IMAGE: node-image:latest + COMPONENT_NAME: my-node + PORT: "3001" +components: + - name: outerloop-build + image: + imageName: "{{CONTAINER_IMAGE}}" + dockerfile: + uri: ./Dockerfile + buildContext: /project + rootRequired: false + - name: outerloop-deploy + kubernetes: + inlined: | + kind: Deployment + apiVersion: apps/v1 + metadata: + name: {{COMPONENT_NAME}} + spec: + replicas: 1 + selector: + matchLabels: + app: node-app + template: + metadata: + labels: + app: node-app + spec: + containers: + - name: {{COMPONENT_NAME}} + image: {{CONTAINER_IMAGE}} + ports: + - name: http + containerPort: {{PORT}} + protocol: TCP + resources: + limits: + memory: "128Mi" + cpu: "500m" + - name: runtime + container: + image: registry.access.redhat.com/ubi8/nodejs-14:latest + memoryLimit: 1024Mi + mountSources: true + sourceMapping: /project + endpoints: + - name: http-3000 + targetPort: 3000 +commands: + - id: install + exec: + component: runtime + commandLine: npm install + workingDir: /project + group: + kind: build + isDefault: true + - id: run + exec: + component: runtime + commandLine: npm start + workingDir: /project + group: + kind: run + isDefault: true + - id: debug + exec: + component: runtime + commandLine: npm run debug + workingDir: /project + group: + kind: debug + isDefault: true + - id: test + exec: + component: runtime + commandLine: npm test + workingDir: /project + group: + kind: test + isDefault: true + - id: build-image + apply: + component: outerloop-build + - id: deployk8s + apply: + component: outerloop-deploy + - id: deploy + composite: + commands: + - build-image + - deployk8s + group: + kind: deploy diff --git a/samples/devfiles/outerloop-dockerfile-build-uri-deploy-devfile.yaml b/samples/devfiles/outerloop-dockerfile-build-uri-deploy-devfile.yaml new file mode 100644 index 000000000..31602f75c --- /dev/null +++ b/samples/devfiles/outerloop-dockerfile-build-uri-deploy-devfile.yaml @@ -0,0 +1,76 @@ +# Devfile based on the existing Node Sample https://github.com/nodeshift-starters/devfile-sample +schemaVersion: 2.1.0 +metadata: + name: nodejs + version: 1.0.1 + displayName: Node.js Runtime + description: Stack with Node.js 14 + tags: ["NodeJS", "Express", "ubi8"] + projectType: "nodejs" + language: "nodejs" +components: + - name: outerloop-build + image: + imageName: node-image:latest + dockerfile: + uri: ./Dockerfile + buildContext: /project + rootRequired: false + - name: outerloop-deploy + kubernetes: + uri: deployment-manifest.yaml + - name: runtime + container: + image: registry.access.redhat.com/ubi8/nodejs-14:latest + memoryLimit: 1024Mi + mountSources: true + sourceMapping: /project + endpoints: + - name: http-3000 + targetPort: 3000 +commands: + - id: install + exec: + component: runtime + commandLine: npm install + workingDir: /project + group: + kind: build + isDefault: true + - id: run + exec: + component: runtime + commandLine: npm start + workingDir: /project + group: + kind: run + isDefault: true + - id: debug + exec: + component: runtime + commandLine: npm run debug + workingDir: /project + group: + kind: debug + isDefault: true + - id: test + exec: + component: runtime + commandLine: npm test + workingDir: /project + group: + kind: test + isDefault: true + - id: build-image + apply: + component: outerloop-build + - id: deployk8s + apply: + component: outerloop-deploy + - id: deploy + composite: + commands: + - build-image + - deployk8s + group: + kind: deploy diff --git a/schemas/latest/dev-workspace-template-spec.json b/schemas/latest/dev-workspace-template-spec.json index bce6f373e..0c5d7ef5f 100644 --- a/schemas/latest/dev-workspace-template-spec.json +++ b/schemas/latest/dev-workspace-template-spec.json @@ -68,7 +68,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -115,7 +116,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -167,7 +169,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -234,7 +237,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -294,6 +298,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -484,6 +493,124 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -728,7 +855,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -772,7 +900,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -835,7 +964,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -894,6 +1024,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1047,6 +1182,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1394,7 +1638,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1438,7 +1683,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1501,7 +1747,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1561,6 +1808,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -1718,6 +1970,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1956,7 +2317,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2000,7 +2362,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2063,7 +2426,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2122,6 +2486,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -2275,6 +2644,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2579,7 +3057,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -2663,7 +3141,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -2787,7 +3265,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -2893,7 +3371,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" diff --git a/schemas/latest/dev-workspace-template.json b/schemas/latest/dev-workspace-template.json index 51b86bddb..dab315317 100644 --- a/schemas/latest/dev-workspace-template.json +++ b/schemas/latest/dev-workspace-template.json @@ -234,7 +234,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -281,7 +282,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -333,7 +335,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -400,7 +403,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -460,6 +464,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -650,6 +659,124 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -894,7 +1021,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -938,7 +1066,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1001,7 +1130,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1060,6 +1190,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1213,6 +1348,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1560,7 +1804,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1604,7 +1849,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1667,7 +1913,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1727,6 +1974,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -1884,6 +2136,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2122,7 +2483,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2166,7 +2528,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2229,7 +2592,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2288,6 +2652,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -2441,6 +2810,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2745,7 +3223,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -2829,7 +3307,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -2953,7 +3431,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -3059,7 +3537,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" diff --git a/schemas/latest/dev-workspace.json b/schemas/latest/dev-workspace.json index 7e5fb3da1..c9a8b1b60 100644 --- a/schemas/latest/dev-workspace.json +++ b/schemas/latest/dev-workspace.json @@ -247,7 +247,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -294,7 +295,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -346,7 +348,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -413,7 +416,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -473,6 +477,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -663,6 +672,124 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -907,7 +1034,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -951,7 +1079,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1014,7 +1143,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1073,6 +1203,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1226,6 +1361,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1573,7 +1817,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1617,7 +1862,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1680,7 +1926,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -1740,6 +1987,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -1897,6 +2149,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2135,7 +2496,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2179,7 +2541,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2242,7 +2605,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -2301,6 +2665,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -2454,6 +2823,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2758,7 +3236,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -2842,7 +3320,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -2966,7 +3444,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -3072,7 +3550,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" diff --git a/schemas/latest/devfile.json b/schemas/latest/devfile.json index 802fddb9c..585a16fab 100644 --- a/schemas/latest/devfile.json +++ b/schemas/latest/devfile.json @@ -66,7 +66,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -113,7 +114,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -184,7 +186,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -243,6 +246,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -404,6 +412,124 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -786,7 +912,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -830,7 +957,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -893,7 +1021,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -952,6 +1081,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1105,6 +1239,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1362,7 +1605,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -1446,7 +1689,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -1547,7 +1790,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -1635,7 +1878,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" diff --git a/schemas/latest/ide-targeted/dev-workspace-template-spec.json b/schemas/latest/ide-targeted/dev-workspace-template-spec.json index d93083551..7efab824e 100644 --- a/schemas/latest/ide-targeted/dev-workspace-template-spec.json +++ b/schemas/latest/ide-targeted/dev-workspace-template-spec.json @@ -71,7 +71,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -125,7 +126,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -185,7 +187,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -260,7 +263,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -328,6 +332,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -535,6 +544,140 @@ "additionalProperties": false, "markdownDescription": "Custom component whose logic is implementation-dependant and should be provided by the user possibly through some dedicated controller" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -794,7 +937,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -845,7 +989,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -917,7 +1062,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -984,6 +1130,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1154,6 +1305,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1539,7 +1815,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1590,7 +1867,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1662,7 +1940,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1730,6 +2009,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -1904,6 +2188,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2161,7 +2570,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2212,7 +2622,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2284,7 +2695,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2351,6 +2763,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -2521,6 +2938,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2862,12 +3404,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -2958,12 +3500,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3098,12 +3640,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3216,12 +3758,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, diff --git a/schemas/latest/ide-targeted/dev-workspace-template.json b/schemas/latest/ide-targeted/dev-workspace-template.json index 95effe91b..bc320a5bf 100644 --- a/schemas/latest/ide-targeted/dev-workspace-template.json +++ b/schemas/latest/ide-targeted/dev-workspace-template.json @@ -270,7 +270,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -324,7 +325,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -384,7 +386,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -459,7 +462,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -527,6 +531,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -734,6 +743,140 @@ "additionalProperties": false, "markdownDescription": "Custom component whose logic is implementation-dependant and should be provided by the user possibly through some dedicated controller" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -993,7 +1136,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1044,7 +1188,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1116,7 +1261,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1183,6 +1329,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1353,6 +1504,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1738,7 +2014,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1789,7 +2066,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1861,7 +2139,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1929,6 +2208,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -2103,6 +2387,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2360,7 +2769,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2411,7 +2821,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2483,7 +2894,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2550,6 +2962,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -2720,6 +3137,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -3061,12 +3603,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3157,12 +3699,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3297,12 +3839,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3415,12 +3957,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, diff --git a/schemas/latest/ide-targeted/dev-workspace.json b/schemas/latest/ide-targeted/dev-workspace.json index 4f3342230..5d5fc8bf8 100644 --- a/schemas/latest/ide-targeted/dev-workspace.json +++ b/schemas/latest/ide-targeted/dev-workspace.json @@ -283,7 +283,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -337,7 +338,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -397,7 +399,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -472,7 +475,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -540,6 +544,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -747,6 +756,140 @@ "additionalProperties": false, "markdownDescription": "Custom component whose logic is implementation-dependant and should be provided by the user possibly through some dedicated controller" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1006,7 +1149,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1057,7 +1201,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1129,7 +1274,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1196,6 +1342,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1366,6 +1517,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1751,7 +2027,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1802,7 +2079,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1874,7 +2152,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1942,6 +2221,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -2116,6 +2400,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -2373,7 +2782,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2424,7 +2834,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2496,7 +2907,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -2563,6 +2975,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -2733,6 +3150,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -3074,12 +3616,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3170,12 +3712,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3310,12 +3852,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -3428,12 +3970,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, diff --git a/schemas/latest/ide-targeted/devfile.json b/schemas/latest/ide-targeted/devfile.json index 3cae454fb..1d6011c44 100644 --- a/schemas/latest/ide-targeted/devfile.json +++ b/schemas/latest/ide-targeted/devfile.json @@ -69,7 +69,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -123,7 +124,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -203,7 +205,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -270,6 +273,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -445,6 +453,140 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "required": [ + "imageName" + ], + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "required": [ + "id" + ], + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "required": [ + "remotes" + ], + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -868,7 +1010,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -919,7 +1062,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -991,7 +1135,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -1058,6 +1203,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1228,6 +1378,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1513,12 +1788,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -1609,12 +1884,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -1725,12 +2000,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -1825,12 +2100,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, diff --git a/schemas/latest/ide-targeted/parent-overrides.json b/schemas/latest/ide-targeted/parent-overrides.json index a95eea44c..8a238b797 100644 --- a/schemas/latest/ide-targeted/parent-overrides.json +++ b/schemas/latest/ide-targeted/parent-overrides.json @@ -60,7 +60,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -111,7 +112,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -183,7 +185,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -251,6 +254,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -425,6 +433,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -682,7 +815,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -733,7 +867,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -805,7 +940,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -872,6 +1008,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -1042,6 +1183,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1361,12 +1627,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, @@ -1452,12 +1718,12 @@ "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" }, - "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured." + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." } }, "additionalProperties": false, diff --git a/schemas/latest/ide-targeted/plugin-overrides.json b/schemas/latest/ide-targeted/plugin-overrides.json index 4229e8f0d..6cd389dce 100644 --- a/schemas/latest/ide-targeted/plugin-overrides.json +++ b/schemas/latest/ide-targeted/plugin-overrides.json @@ -54,7 +54,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -105,7 +106,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -177,7 +179,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ], "markdownDescription": "Kind of group the command is part of" } @@ -244,6 +247,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -414,6 +422,131 @@ "additionalProperties": false, "markdownDescription": "Allows adding and configuring devworkspace-related containers" }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + }, + "markdownDescription": "The arguments to supply to the dockerfile build." + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string", + "markdownDescription": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string", + "markdownDescription": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image." + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string", + "markdownDescription": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Devfile Registry source" + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string", + "markdownDescription": "The remote name should be used as init. Required if there are more than one remote configured" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string", + "markdownDescription": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found." + } + }, + "additionalProperties": false, + "markdownDescription": "Defines from what the project should be checked out. Required if there are more than one remote configured" + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string", + "markdownDescription": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile." + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + }, + "markdownDescription": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured." + } + }, + "additionalProperties": false, + "markdownDescription": "Dockerfile's Git source" + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean", + "markdownDescription": "Specify if a privileged builder pod is required.\n\nDefault value is `false`" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string", + "markdownDescription": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI." + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying dockerfile type build" + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string", + "markdownDescription": "Name of the image for the resulting outerloop build" + } + }, + "additionalProperties": false, + "markdownDescription": "Allows specifying the definition of an image for outer loop builds" + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", diff --git a/schemas/latest/parent-overrides.json b/schemas/latest/parent-overrides.json index a1b84fe11..f005314f6 100644 --- a/schemas/latest/parent-overrides.json +++ b/schemas/latest/parent-overrides.json @@ -56,7 +56,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -100,7 +101,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -163,7 +165,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -223,6 +226,11 @@ "volume" ] }, + { + "required": [ + "image" + ] + }, { "required": [ "plugin" @@ -380,6 +388,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -618,7 +735,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -662,7 +780,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -725,7 +844,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -784,6 +904,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -937,6 +1062,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object", @@ -1221,7 +1455,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" @@ -1301,7 +1535,7 @@ "additionalProperties": false }, "remotes": { - "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects can only have at most one remote configured.", + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", "type": "object", "additionalProperties": { "type": "string" diff --git a/schemas/latest/plugin-overrides.json b/schemas/latest/plugin-overrides.json index 740ac699d..f3e07779f 100644 --- a/schemas/latest/plugin-overrides.json +++ b/schemas/latest/plugin-overrides.json @@ -51,7 +51,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -95,7 +96,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -158,7 +160,8 @@ "build", "run", "test", - "debug" + "debug", + "deploy" ] } }, @@ -217,6 +220,11 @@ "required": [ "volume" ] + }, + { + "required": [ + "image" + ] } ], "properties": { @@ -370,6 +378,115 @@ }, "additionalProperties": false }, + "image": { + "description": "Allows specifying the definition of an image for outer loop builds", + "type": "object", + "oneOf": [ + { + "required": [ + "dockerfile" + ] + } + ], + "properties": { + "dockerfile": { + "description": "Allows specifying dockerfile type build", + "type": "object", + "oneOf": [ + { + "required": [ + "uri" + ] + }, + { + "required": [ + "devfileRegistry" + ] + }, + { + "required": [ + "git" + ] + } + ], + "properties": { + "args": { + "description": "The arguments to supply to the dockerfile build.", + "type": "array", + "items": { + "type": "string" + } + }, + "buildContext": { + "description": "Path of source directory to establish build context. Defaults to ${PROJECT_ROOT} in the container", + "type": "string" + }, + "devfileRegistry": { + "description": "Dockerfile's Devfile Registry source", + "type": "object", + "properties": { + "id": { + "description": "Id in a devfile registry that contains a Dockerfile. The src in the OCI registry required for the Dockerfile build will be downloaded for building the image.", + "type": "string" + }, + "registryUrl": { + "description": "Devfile Registry URL to pull the Dockerfile from when using the Devfile Registry as Dockerfile src. To ensure the Dockerfile gets resolved consistently in different environments, it is recommended to always specify the `devfileRegistryUrl` when `Id` is used.", + "type": "string" + } + }, + "additionalProperties": false + }, + "git": { + "description": "Dockerfile's Git source", + "type": "object", + "properties": { + "checkoutFrom": { + "description": "Defines from what the project should be checked out. Required if there are more than one remote configured", + "type": "object", + "properties": { + "remote": { + "description": "The remote name should be used as init. Required if there are more than one remote configured", + "type": "string" + }, + "revision": { + "description": "The revision to checkout from. Should be branch name, tag or commit id. Default branch is used if missing or specified revision is not found.", + "type": "string" + } + }, + "additionalProperties": false + }, + "fileLocation": { + "description": "Location of the Dockerfile in the Git repository when using git as Dockerfile src. Defaults to Dockerfile.", + "type": "string" + }, + "remotes": { + "description": "The remotes map which should be initialized in the git project. Projects must have at least one remote configured while StarterProjects \u0026 Image Component's Git source can only have at most one remote configured.", + "type": "object", + "additionalProperties": { + "type": "string" + } + } + }, + "additionalProperties": false + }, + "rootRequired": { + "description": "Specify if a privileged builder pod is required.\n\nDefault value is `false`", + "type": "boolean" + }, + "uri": { + "description": "URI Reference of a Dockerfile. It can be a full URL or a relative URI from the current devfile as the base URI.", + "type": "string" + } + }, + "additionalProperties": false + }, + "imageName": { + "description": "Name of the image for the resulting outerloop build", + "type": "string" + } + }, + "additionalProperties": false + }, "kubernetes": { "description": "Allows importing into the devworkspace the Kubernetes resources defined in a given manifest. For example this allows reusing the Kubernetes definitions used to deploy some runtime components in production.", "type": "object",