Skip to content

Commit

Permalink
File renamed, content simplified. (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Krátký authored and sparkoo committed Nov 6, 2019
1 parent 06f9f30 commit dd56476
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 39 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ include::con_what-is-a-devfile.adoc[leveloffset=+1]

include::con_a-minimal-devfile.adoc[leveloffset=+1]

include::con_generate-name-of-a-workspace.adoc[leveloffset=+1]
include::proc_generating-workspace-names.adoc[leveloffset=+1]

include::proc_writing-a-devfile-for-your-project.adoc[leveloffset=+1]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,5 @@ For a complete devfile example, see link:https://github.com/eclipse/che/blob/mas
[NOTE]
.`name` or `generateName` must be defined
====
Both `name` and `generateName` are optional parameters, but at least one of them must be defined, see link:#generate-name-of-a-workspace_making-a-workspace-portable-using-a-devfile[Generate name of a workspace].
Both `name` and `generateName` are optional parameters, but at least one of them must be defined. See xref:#generating-workspace-names_{context}[].
====

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// generate-name-of-a-workspace

[id="generating-workspace-names_{context}"]
= Generating workspace names

To specify a prefix for automatically generated workspace names, set the `generateName` parameter in the `devfile.yaml` file:

[source,yaml]
----
apiVersion: 1.0.0
metadata:
generateName: che-
----

The workspace name will be in the `<generateName>YYYYY` format (for example, `che-2y7kp`). `Y` is random `[a-z0-9]` character.

The following naming rules apply when creating workspaces:

* When `name` is defined, it is used as the workspace name: `<name>`
* When only `generateName` is defined, it is used as the base of the generated name: `<generateName>YYYYY`

[NOTE]
====
For workspaces created using a factory, defining `name` or `generateName` has the same effect. The defined value is used as the name prefix: `<name>YYYYY` or `<generateName>YYYYY`.
====

0 comments on commit dd56476

Please sign in to comment.