From d3b3a9e3eb25f0279e46238886625d03be74f9aa Mon Sep 17 00:00:00 2001 From: Tomas Kral Date: Tue, 14 Jul 2020 13:47:21 +0200 Subject: [PATCH 1/2] add starterProject field --- pkg/apis/workspaces/v1alpha1/devworkspaceTemplateSpec.go | 4 ++++ pkg/apis/workspaces/v1alpha1/projects.go | 7 +++++++ 2 files changed, 11 insertions(+) diff --git a/pkg/apis/workspaces/v1alpha1/devworkspaceTemplateSpec.go b/pkg/apis/workspaces/v1alpha1/devworkspaceTemplateSpec.go index 2300675db..6b494d817 100644 --- a/pkg/apis/workspaces/v1alpha1/devworkspaceTemplateSpec.go +++ b/pkg/apis/workspaces/v1alpha1/devworkspaceTemplateSpec.go @@ -25,6 +25,10 @@ type DevWorkspaceTemplateSpecContent struct { // +optional Projects []Project `json:"projects,omitempty"` + // StarterProjects is a project that can be used as a starting point when bootstrapping new projects + // +optional + StarterProjects []StarterProject `json:"starterProjects,omitempty"` + // List of the workspace components, such as editor and plugins, // user-provided containers, or other types of components // +optional diff --git a/pkg/apis/workspaces/v1alpha1/projects.go b/pkg/apis/workspaces/v1alpha1/projects.go index c19323cf8..3671d31c0 100644 --- a/pkg/apis/workspaces/v1alpha1/projects.go +++ b/pkg/apis/workspaces/v1alpha1/projects.go @@ -12,6 +12,13 @@ type Project struct { ProjectSource `json:",inline"` } +type StarterProject struct { + Project `json:",inline"` + + // Description of a starter project + // +optional + Description string `json:"description,omitempty"` +} // ProjectSourceType describes the type of Project sources. // Only one of the following project sources may be specified. From 162e4df42d3eb30b243022c3bb0442b4f01d3034 Mon Sep 17 00:00:00 2001 From: Tomas Kral Date: Tue, 14 Jul 2020 13:48:48 +0200 Subject: [PATCH 2/2] update generated schemas --- ...orkspace.devfile.io_devworkspaces_crd.yaml | 194 ++++++++++++ ....devfile.io_devworkspacetemplates_crd.yaml | 190 +++++++++++ .../v1alpha1/zz_generated.deepcopy.go | 24 ++ schemas/devfile.json | 250 +++++++++++++++ schemas/devworkspace-template-spec.json | 296 ++++++++++++++++++ schemas/devworkspace-template.json | 296 ++++++++++++++++++ schemas/devworkspace.json | 296 ++++++++++++++++++ 7 files changed, 1546 insertions(+) diff --git a/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml b/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml index f853e61a9..9971500bf 100644 --- a/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml +++ b/deploy/crds/workspace.devfile.io_devworkspaces_crd.yaml @@ -3311,6 +3311,103 @@ spec: type: array registryUrl: type: string + starterProjects: + description: StarterProjects is a project that can be used as + a starting point when bootstrapping new projects + items: + properties: + clonePath: + description: Path relative to the root of the projects + to which this project should be cloned into. This is + a unix-style relative path (i.e. uses forward slashes). + The path is invalid if it is absolute or tries to escape + the project root through the usage of '..'. If not specified, + defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should + be URL for git and github located projects, or; + file:// for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + startPoint: + description: The tag or commit id to reset the checked + out branch to + type: string + type: object + github: + description: Project's GitHub source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should + be URL for git and github located projects, or; + file:// for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + startPoint: + description: The tag or commit id to reset the checked + out branch to + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Project's source location address. Should + be URL for git and github located projects, or; + file:// for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array uri: description: Uri of a Devfile yaml file type: string @@ -3409,6 +3506,103 @@ spec: - name type: object type: array + starterProjects: + description: StarterProjects is a project that can be used as a + starting point when bootstrapping new projects + items: + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is invalid + if it is absolute or tries to escape the project root through + the usage of '..'. If not specified, defaults to the project + name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should + be URL for git and github located projects, or; file:// + for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + startPoint: + description: The tag or commit id to reset the checked + out branch to + type: string + type: object + github: + description: Project's GitHub source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should + be URL for git and github located projects, or; file:// + for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + startPoint: + description: The tag or commit id to reset the checked + out branch to + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Project's source location address. Should + be URL for git and github located projects, or; file:// + for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array type: object required: - started diff --git a/deploy/crds/workspace.devfile.io_devworkspacetemplates_crd.yaml b/deploy/crds/workspace.devfile.io_devworkspacetemplates_crd.yaml index 36e7bc2e1..d88118d93 100644 --- a/deploy/crds/workspace.devfile.io_devworkspacetemplates_crd.yaml +++ b/deploy/crds/workspace.devfile.io_devworkspacetemplates_crd.yaml @@ -3188,6 +3188,103 @@ spec: type: array registryUrl: type: string + starterProjects: + description: StarterProjects is a project that can be used as a + starting point when bootstrapping new projects + items: + properties: + clonePath: + description: Path relative to the root of the projects to + which this project should be cloned into. This is a unix-style + relative path (i.e. uses forward slashes). The path is invalid + if it is absolute or tries to escape the project root through + the usage of '..'. If not specified, defaults to the project + name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should + be URL for git and github located projects, or; file:// + for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + startPoint: + description: The tag or commit id to reset the checked + out branch to + type: string + type: object + github: + description: Project's GitHub source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should + be URL for git and github located projects, or; file:// + for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + startPoint: + description: The tag or commit id to reset the checked + out branch to + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Project's source location address. Should + be URL for git and github located projects, or; file:// + for zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working + directory. + type: string + type: object + required: + - name + type: object + type: array uri: description: Uri of a Devfile yaml file type: string @@ -3282,6 +3379,99 @@ spec: - name type: object type: array + starterProjects: + description: StarterProjects is a project that can be used as a starting + point when bootstrapping new projects + items: + properties: + clonePath: + description: Path relative to the root of the projects to which + this project should be cloned into. This is a unix-style relative + path (i.e. uses forward slashes). The path is invalid if it + is absolute or tries to escape the project root through the + usage of '..'. If not specified, defaults to the project name. + type: string + custom: + description: Project's Custom source + properties: + embeddedResource: + type: object + x-kubernetes-embedded-resource: true + x-kubernetes-preserve-unknown-fields: true + projectSourceClass: + type: string + required: + - embeddedResource + - projectSourceClass + type: object + description: + description: Description of a starter project + type: string + git: + description: Project's Git source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should be + URL for git and github located projects, or; file:// for + zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working directory. + type: string + startPoint: + description: The tag or commit id to reset the checked out + branch to + type: string + type: object + github: + description: Project's GitHub source + properties: + branch: + description: The branch to check + type: string + location: + description: Project's source location address. Should be + URL for git and github located projects, or; file:// for + zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working directory. + type: string + startPoint: + description: The tag or commit id to reset the checked out + branch to + type: string + type: object + name: + description: Project name + type: string + sourceType: + description: Type of project source + enum: + - Git + - Github + - Zip + - Custom + type: string + zip: + description: Project's Zip source + properties: + location: + description: Project's source location address. Should be + URL for git and github located projects, or; file:// for + zip + type: string + sparseCheckoutDir: + description: Part of project to populate in the working directory. + type: string + type: object + required: + - name + type: object + type: array type: object type: object version: v1alpha1 diff --git a/pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go b/pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go index 7805b1fdc..b97f827fe 100644 --- a/pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go +++ b/pkg/apis/workspaces/v1alpha1/zz_generated.deepcopy.go @@ -566,6 +566,13 @@ func (in *DevWorkspaceTemplateSpecContent) DeepCopyInto(out *DevWorkspaceTemplat (*in)[i].DeepCopyInto(&(*out)[i]) } } + if in.StarterProjects != nil { + in, out := &in.StarterProjects, &out.StarterProjects + *out = make([]StarterProject, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } if in.Components != nil { in, out := &in.Components, &out.Components *out = make([]Component, len(*in)) @@ -981,6 +988,23 @@ func (in *ProjectSource) DeepCopy() *ProjectSource { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *StarterProject) DeepCopyInto(out *StarterProject) { + *out = *in + in.Project.DeepCopyInto(&out.Project) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new StarterProject. +func (in *StarterProject) DeepCopy() *StarterProject { + if in == nil { + return nil + } + out := new(StarterProject) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *Volume) DeepCopyInto(out *Volume) { *out = *in diff --git a/schemas/devfile.json b/schemas/devfile.json index f5c4eb1ef..031fcf2bc 100644 --- a/schemas/devfile.json +++ b/schemas/devfile.json @@ -3497,6 +3497,131 @@ "registryUrl": { "type": "string" }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" + }, "uri": { "description": "Uri of a Devfile yaml file", "type": "string", @@ -3639,6 +3764,131 @@ "type": "array", "markdownDescription": "Projects worked on in the workspace, containing names and sources locations" }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" + }, "metadata": { "type": "object", "description": "Optional metadata", diff --git a/schemas/devworkspace-template-spec.json b/schemas/devworkspace-template-spec.json index 0603fc054..28a0665e8 100644 --- a/schemas/devworkspace-template-spec.json +++ b/schemas/devworkspace-template-spec.json @@ -3878,6 +3878,154 @@ "registryUrl": { "type": "string" }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "custom": { + "description": "Project's Custom source", + "properties": { + "embeddedResource": { + "type": "object" + }, + "projectSourceClass": { + "type": "string" + } + }, + "required": [ + "embeddedResource", + "projectSourceClass" + ], + "type": "object", + "markdownDescription": "Project's Custom source", + "additionalProperties": false + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + }, + { + "required": [ + "custom" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" + }, "uri": { "description": "Uri of a Devfile yaml file", "type": "string", @@ -4042,6 +4190,154 @@ }, "type": "array", "markdownDescription": "Projects worked on in the workspace, containing names and sources locations" + }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "custom": { + "description": "Project's Custom source", + "properties": { + "embeddedResource": { + "type": "object" + }, + "projectSourceClass": { + "type": "string" + } + }, + "required": [ + "embeddedResource", + "projectSourceClass" + ], + "type": "object", + "markdownDescription": "Project's Custom source", + "additionalProperties": false + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + }, + { + "required": [ + "custom" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" } }, "type": "object", diff --git a/schemas/devworkspace-template.json b/schemas/devworkspace-template.json index 28ba77c1f..e097e0e84 100644 --- a/schemas/devworkspace-template.json +++ b/schemas/devworkspace-template.json @@ -3895,6 +3895,154 @@ "registryUrl": { "type": "string" }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "custom": { + "description": "Project's Custom source", + "properties": { + "embeddedResource": { + "type": "object" + }, + "projectSourceClass": { + "type": "string" + } + }, + "required": [ + "embeddedResource", + "projectSourceClass" + ], + "type": "object", + "markdownDescription": "Project's Custom source", + "additionalProperties": false + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + }, + { + "required": [ + "custom" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" + }, "uri": { "description": "Uri of a Devfile yaml file", "type": "string", @@ -4059,6 +4207,154 @@ }, "type": "array", "markdownDescription": "Projects worked on in the workspace, containing names and sources locations" + }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "custom": { + "description": "Project's Custom source", + "properties": { + "embeddedResource": { + "type": "object" + }, + "projectSourceClass": { + "type": "string" + } + }, + "required": [ + "embeddedResource", + "projectSourceClass" + ], + "type": "object", + "markdownDescription": "Project's Custom source", + "additionalProperties": false + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + }, + { + "required": [ + "custom" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" } }, "type": "object", diff --git a/schemas/devworkspace.json b/schemas/devworkspace.json index 6bfb48ad5..e9c3c9742 100644 --- a/schemas/devworkspace.json +++ b/schemas/devworkspace.json @@ -3904,6 +3904,154 @@ "registryUrl": { "type": "string" }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "custom": { + "description": "Project's Custom source", + "properties": { + "embeddedResource": { + "type": "object" + }, + "projectSourceClass": { + "type": "string" + } + }, + "required": [ + "embeddedResource", + "projectSourceClass" + ], + "type": "object", + "markdownDescription": "Project's Custom source", + "additionalProperties": false + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + }, + { + "required": [ + "custom" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" + }, "uri": { "description": "Uri of a Devfile yaml file", "type": "string", @@ -4068,6 +4216,154 @@ }, "type": "array", "markdownDescription": "Projects worked on in the workspace, containing names and sources locations" + }, + "starterProjects": { + "description": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects", + "items": { + "properties": { + "clonePath": { + "description": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name.", + "type": "string", + "markdownDescription": "Path relative to the root of the projects to which this project should be cloned into. This is a unix-style relative path (i.e. uses forward slashes). The path is invalid if it is absolute or tries to escape the project root through the usage of '..'. If not specified, defaults to the project name." + }, + "custom": { + "description": "Project's Custom source", + "properties": { + "embeddedResource": { + "type": "object" + }, + "projectSourceClass": { + "type": "string" + } + }, + "required": [ + "embeddedResource", + "projectSourceClass" + ], + "type": "object", + "markdownDescription": "Project's Custom source", + "additionalProperties": false + }, + "description": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + }, + "git": { + "description": "Project's Git source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's Git source", + "additionalProperties": false + }, + "github": { + "description": "Project's GitHub source", + "properties": { + "branch": { + "description": "The branch to check", + "type": "string", + "markdownDescription": "The branch to check" + }, + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + }, + "startPoint": { + "description": "The tag or commit id to reset the checked out branch to", + "type": "string", + "markdownDescription": "The tag or commit id to reset the checked out branch to" + } + }, + "type": "object", + "markdownDescription": "Project's GitHub source", + "additionalProperties": false + }, + "name": { + "description": "Project name", + "type": "string", + "markdownDescription": "Project name" + }, + "zip": { + "description": "Project's Zip source", + "properties": { + "location": { + "description": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip", + "type": "string", + "markdownDescription": "Project's source location address. Should be URL for git and github located projects, or; file:// for zip" + }, + "sparseCheckoutDir": { + "description": "Part of project to populate in the working directory.", + "type": "string", + "markdownDescription": "Part of project to populate in the working directory." + } + }, + "type": "object", + "markdownDescription": "Project's Zip source", + "additionalProperties": false + }, + "markdownDescription": { + "description": "Description of a starter project", + "type": "string", + "markdownDescription": "Description of a starter project" + } + }, + "required": [ + "name" + ], + "type": "object", + "additionalProperties": false, + "oneOf": [ + { + "required": [ + "git" + ] + }, + { + "required": [ + "github" + ] + }, + { + "required": [ + "zip" + ] + }, + { + "required": [ + "custom" + ] + } + ] + }, + "type": "array", + "markdownDescription": "StarterProjects is a project that can be used as a starting point when bootstrapping new projects" } }, "type": "object",