Skip to content

Commit

Permalink
Update to 2.2.0, add deploy kind, add event to nav
Browse files Browse the repository at this point in the history
Signed-off-by: Maysun J Faisal <maysunaneek@gmail.com>
  • Loading branch information
maysunfaisal committed Mar 30, 2022
1 parent 8d43490 commit 11f90ad
Show file tree
Hide file tree
Showing 17 changed files with 78 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
+
Expand Down Expand Up @@ -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
----
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -33,7 +33,7 @@ components:

[source,yaml]
----
schemaVersion: 2.1.0
schemaVersion: 2.2.0
metadata:
name: mydevfile
components:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -86,7 +86,7 @@ projects:
====
[source,yaml]
----
schemaVersion: 2.1.0
schemaVersion: 2.2.0
metadata:
name: example-devfile
version: 1.0.0
Expand Down Expand Up @@ -143,7 +143,7 @@ source:
====
[source,yaml]
----
schemaVersion: 2.1.0
schemaVersion: 2.2.0
metadata:
name: my-project-dev
version: 2.0.0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions docs/modules/user-guide/partials/proc_defining-endpoints.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
|====
Expand All @@ -24,7 +24,7 @@ metadata:
----
v2.0
---
schemaVersion: 2.1.0
schemaVersion: 2.2.0
metadata:
name: devfile-sample
----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 11f90ad

Please sign in to comment.