From 11f90ad57981f955c38dde1c6b8a574fe15d11e6 Mon Sep 17 00:00:00 2001 From: Maysun J Faisal Date: Wed, 30 Mar 2022 15:24:16 -0400 Subject: [PATCH] Update to 2.2.0, add deploy kind, add event to nav Signed-off-by: Maysun J Faisal --- .../partials/assembly_authoring-devfiles.adoc | 3 +- ...c_adding-a-command-group-to-a-devfile.adoc | 44 +++++++++++++++++++ ...ng-a-container-component-to-a-devfile.adoc | 4 +- .../proc_adding-a-name-to-a-devfile.adoc | 2 +- ...dding-a-volume-component-to-a-devfile.adoc | 4 +- ...oc_adding-apply-commands-to-a-devfile.adoc | 11 +++++ .../proc_adding-attributes-to-a-devfile.adoc | 2 +- ...dding-composite-commands-to-a-devfile.adoc | 2 +- ...roc_adding-exec-commands-to-a-devfile.adoc | 2 +- .../proc_adding-projects-to-a-devfile.adoc | 6 +-- ...oc_adding-schema-version-to-a-devfile.adoc | 2 +- .../partials/proc_defining-endpoints.adoc | 4 +- .../proc_defining-environment-variables.adoc | 2 +- .../proc_defining-kubernetes-resources.adoc | 2 +- .../proc_migrating-schema-version.adoc | 4 +- ...ring-to-a-parent-devfile-in-a-devfile.adoc | 6 +-- .../proc_specifying-persistent-storage.adoc | 2 +- 17 files changed, 78 insertions(+), 24 deletions(-) diff --git a/docs/modules/user-guide/partials/assembly_authoring-devfiles.adoc b/docs/modules/user-guide/partials/assembly_authoring-devfiles.adoc index 2feb666d..69870626 100644 --- a/docs/modules/user-guide/partials/assembly_authoring-devfiles.adoc +++ b/docs/modules/user-guide/partials/assembly_authoring-devfiles.adoc @@ -14,14 +14,13 @@ endif::[] [role="_abstract"] A devfile is a `yaml` file. After you include it in your local environment, the devfile provides ways to automate your processes. Tools like `odo` run the devfile and apply its guidelines to your environment. You can configure the devfile based on your unique development needs. See the following documents to help you author a devfile based on your development needs: -* xref:adding-schema-version-to-a-devfile.adoc[] -* xref:adding-a-name-to-a-devfile.adoc[] * xref:adding-schema-version-to-a-devfile.adoc[] * xref:adding-a-name-to-a-devfile.adoc[] * xref:adding-projects-to-a-devfile.adoc[] * xref:adding-commands-to-a-devfile.adoc[] * xref:adding-components-to-a-devfile.adoc[] * xref:adding-attributes-to-a-devfile.adoc[] +* xref:adding-event-bindings.adoc[] * xref:referring-to-a-parent-devfile-in-a-devfile.adoc[] // [role="_additional-resources"] diff --git a/docs/modules/user-guide/partials/proc_adding-a-command-group-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-command-group-to-a-devfile.adoc index 324fdbcc..e72f94a6 100644 --- a/docs/modules/user-guide/partials/proc_adding-a-command-group-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-command-group-to-a-devfile.adoc @@ -19,6 +19,7 @@ Create command groups to help automate your devfile. * `run` * `test` * `debug` +* `deploy` + . At most, there can only be one default command for each group kind. Set the default command by specifying a `true` value for `isDefault`. + @@ -54,3 +55,46 @@ commands: kind: build isDefault: true ---- ++ +. Use the `deploy` kind to reference a deploy command for an outerloop scenario. ++ +[source,yaml] +---- +schemaVersion: 2.2.0 +metadata: + name: python + version: 1.0.0 + provider: Red Hat + supportUrl: https://github.com/devfile-samples/devfile-support#support-information + attributes: + alpha.dockerimage-port: 8081 +parent: + id: python + registryUrl: "https://registry.devfile.io" +components: + - name: outerloop-build + image: + imageName: python-image:latest + dockerfile: + uri: docker/Dockerfile + buildContext: . + rootRequired: false + - name: outerloop-deploy + kubernetes: + uri: outerloop-deploy.yaml +commands: + - id: build-image + apply: + component: outerloop-build + - id: deployk8s + apply: + component: outerloop-deploy + - id: deploy + composite: + commands: + - build-image + - deployk8s + group: + kind: deploy + isDefault: true +---- diff --git a/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc index 6fe65e7d..a07f52cd 100644 --- a/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-container-component-to-a-devfile.adoc @@ -46,7 +46,7 @@ A devfile can contain one or more components of the `container` type. The `compo .A minimal `container` component [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile components: @@ -67,7 +67,7 @@ For the `container` component to have access to the project sources, you must se + [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile components: diff --git a/docs/modules/user-guide/partials/proc_adding-a-name-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-name-to-a-devfile.adoc index fc4ada20..6f682b0c 100644 --- a/docs/modules/user-guide/partials/proc_adding-a-name-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-name-to-a-devfile.adoc @@ -31,7 +31,7 @@ Adding a name to a devfile is mandatory. Use the `name` attribute to define the [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: devfile-sample version: 2.0.0 diff --git a/docs/modules/user-guide/partials/proc_adding-a-volume-component-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-a-volume-component-to-a-devfile.adoc index c92fc592..7ca269ef 100644 --- a/docs/modules/user-guide/partials/proc_adding-a-volume-component-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-a-volume-component-to-a-devfile.adoc @@ -18,7 +18,7 @@ You can use a `volume` component to share files among container components and c [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile components: @@ -33,7 +33,7 @@ components: [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile components: diff --git a/docs/modules/user-guide/partials/proc_adding-apply-commands-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-apply-commands-to-a-devfile.adoc index b6e3b7ba..4077f5da 100644 --- a/docs/modules/user-guide/partials/proc_adding-apply-commands-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-apply-commands-to-a-devfile.adoc @@ -8,6 +8,17 @@ Use the the `apply` command to apply a given component definition, usually a `ku + [source,yaml] ---- +schemaVersion: 2.2.0 +metadata: + name: python + version: 1.0.0 + provider: Red Hat + supportUrl: https://github.com/devfile-samples/devfile-support#support-information + attributes: + alpha.dockerimage-port: 8081 +parent: + id: python + registryUrl: "https://registry.devfile.io" components: - name: outerloop-build image: diff --git a/docs/modules/user-guide/partials/proc_adding-attributes-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-attributes-to-a-devfile.adoc index 3ec3fce2..c9c90ba1 100644 --- a/docs/modules/user-guide/partials/proc_adding-attributes-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-attributes-to-a-devfile.adoc @@ -27,7 +27,7 @@ When no editor is specified, a default editor is provided. To represent this use ==== [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: petclinic-dev-environment attributes: diff --git a/docs/modules/user-guide/partials/proc_adding-composite-commands-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-composite-commands-to-a-devfile.adoc index c3748754..f6d10dee 100644 --- a/docs/modules/user-guide/partials/proc_adding-composite-commands-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-composite-commands-to-a-devfile.adoc @@ -18,7 +18,7 @@ Connect multiple commands together by defining a composite command. + [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile projects: diff --git a/docs/modules/user-guide/partials/proc_adding-exec-commands-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-exec-commands-to-a-devfile.adoc index 068a5ac7..2f2107ed 100644 --- a/docs/modules/user-guide/partials/proc_adding-exec-commands-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-exec-commands-to-a-devfile.adoc @@ -11,7 +11,7 @@ Use the the `exec` command to automate the container actions. + [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile projects: diff --git a/docs/modules/user-guide/partials/proc_adding-projects-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-projects-to-a-devfile.adoc index 8b66cfc0..880e1ec4 100644 --- a/docs/modules/user-guide/partials/proc_adding-projects-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-projects-to-a-devfile.adoc @@ -68,7 +68,7 @@ This section describes how to add one or more projects to a devfile. Each starte ==== [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: petclinic-dev-environment version: 1.0.0 @@ -86,7 +86,7 @@ projects: ==== [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: example-devfile version: 1.0.0 @@ -143,7 +143,7 @@ source: ==== [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: my-project-dev version: 2.0.0 diff --git a/docs/modules/user-guide/partials/proc_adding-schema-version-to-a-devfile.adoc b/docs/modules/user-guide/partials/proc_adding-schema-version-to-a-devfile.adoc index 38dfec33..7744de88 100644 --- a/docs/modules/user-guide/partials/proc_adding-schema-version-to-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_adding-schema-version-to-a-devfile.adoc @@ -24,7 +24,7 @@ The `schemaVersion` attribute is mandatory in a devfile. See the following table ---- v2.1 --- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: devfile-sample version: 2.1.0 diff --git a/docs/modules/user-guide/partials/proc_defining-endpoints.adoc b/docs/modules/user-guide/partials/proc_defining-endpoints.adoc index d3e20d92..bf00614b 100644 --- a/docs/modules/user-guide/partials/proc_defining-endpoints.adoc +++ b/docs/modules/user-guide/partials/proc_defining-endpoints.adoc @@ -12,7 +12,7 @@ This section describes how to define endpoints and specify their properties. ==== [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile projects: @@ -71,7 +71,7 @@ WARNING: Listening on any other interface than the local loopback poses a securi [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile components: diff --git a/docs/modules/user-guide/partials/proc_defining-environment-variables.adoc b/docs/modules/user-guide/partials/proc_defining-environment-variables.adoc index c788002c..667c80fb 100644 --- a/docs/modules/user-guide/partials/proc_defining-environment-variables.adoc +++ b/docs/modules/user-guide/partials/proc_defining-environment-variables.adoc @@ -12,7 +12,7 @@ Environment variables are supported by the `container` component and the `exec` ==== [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile components: diff --git a/docs/modules/user-guide/partials/proc_defining-kubernetes-resources.adoc b/docs/modules/user-guide/partials/proc_defining-kubernetes-resources.adoc index 126d4307..bd95a0bf 100644 --- a/docs/modules/user-guide/partials/proc_defining-kubernetes-resources.adoc +++ b/docs/modules/user-guide/partials/proc_defining-kubernetes-resources.adoc @@ -30,7 +30,7 @@ The following component references a file that is relative to the location of th [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile projects: diff --git a/docs/modules/user-guide/partials/proc_migrating-schema-version.adoc b/docs/modules/user-guide/partials/proc_migrating-schema-version.adoc index 0ccc6187..3dac4cf6 100644 --- a/docs/modules/user-guide/partials/proc_migrating-schema-version.adoc +++ b/docs/modules/user-guide/partials/proc_migrating-schema-version.adoc @@ -6,7 +6,7 @@ This section describes how to migrate the existing schema version to a v2.x devf .Procedure -. To migrate a schema version from a v1.x devfile to a v2.x devfile, replace `apiVersion: 1.0.0` with `schemaVersion: 2.1.0`: +. To migrate a schema version from a v1.x devfile to a v2.x devfile, replace `apiVersion: 1.0.0` with `schemaVersion: 2.2.0`: + [cols="1a,1a"] |==== @@ -24,7 +24,7 @@ metadata: ---- v2.0 --- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: devfile-sample ---- diff --git a/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc b/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc index 8c654bff..d8b53bcf 100644 --- a/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc +++ b/docs/modules/user-guide/partials/proc_referring-to-a-parent-devfile-in-a-devfile.adoc @@ -25,7 +25,7 @@ Using the `id` when published in a registry. [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: my-project-dev parent: @@ -40,7 +40,7 @@ Using the URI when published on a static HTTP server, such as GitHub Gist or Pas [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: my-project-dev parent: @@ -54,7 +54,7 @@ Using a Kubernetes resource name and namespace if it has been deployed on a Kube [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: my-project-dev parent: diff --git a/docs/modules/user-guide/partials/proc_specifying-persistent-storage.adoc b/docs/modules/user-guide/partials/proc_specifying-persistent-storage.adoc index d307dee2..f03d2a07 100644 --- a/docs/modules/user-guide/partials/proc_specifying-persistent-storage.adoc +++ b/docs/modules/user-guide/partials/proc_specifying-persistent-storage.adoc @@ -12,7 +12,7 @@ Use a `container` component to specify the volumes to be mounted on specific loc ==== [source,yaml] ---- -schemaVersion: 2.1.0 +schemaVersion: 2.2.0 metadata: name: mydevfile components: