Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add info about starting a workspace from raw devfile location #2566

Merged
merged 9 commits into from
Mar 2, 2023
1 change: 1 addition & 0 deletions modules/end-user-guide/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
** xref:benefits-of-pull-requests-review-in-che.adoc[]
* xref:user-onboarding.adoc[]
** xref:starting-a-new-workspace-with-a-clone-of-a-git-repository.adoc[]
** xref:starting-a-new-workspace-from-a-devfile-url.adoc[]
** xref:optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc[]
*** xref:url-parameter-concatenation.adoc[]
*** xref:url-parameter-for-the-workspace-ide.adoc[]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
:_content-type: PROCEDURE
:description: Starting a new workspace from a devfile URL
:keywords: start-new-workspace, start-a-new-workspace, how-to-start-new-workspace, how-to-start-a-new-workspace, starting-a-new-workspace, how-to-start-workspace, how-to-start-a-workspace
:navtitle: Starting a new workspace from a devfile URL
:page-aliases:

[id="starting-a-new-workspace-from-a-devfile-url"]
= Starting a new workspace from a devfile URL

Working with {prod-short} in your browser involves multiple URLs:

* The URL of your organization's {prod-short} instance, used as part of all the following URLs
* The URL of the *devfile*
* [.underline]#The URLs for starting a new workspace#
* The URLs of your workspaces in use

With {prod-short}, you can open a *devfile* URL in your browser to start a new workspace.

pass:[<!-- vale RedHat.Spelling = NO -->]

TIP: You can also use the *Git Repo URL ** field on the *Create Workspace* page of your {prod-short} dashboard to enter the URL of a *devfile* to start a new workspace.
max-cx marked this conversation as resolved.
Show resolved Hide resolved

pass:[<!-- vale RedHat.Spelling = YES -->]

.Prerequisites

* Your organization has a running instance of {prod-short}.
* You know the FQDN URL of your organization's {prod-short} instance: `pass:c,a,q[{prod-url}]`.

.Procedure

To start a new workspace from a devfile URL:

. Optional: Visit your {prod-short} dashboard pages to authenticate to your organization's instance of {prod-short}.

. Visit the URL to start a new workspace using the basic syntax:
[source,subs="+quotes,+attributes,+macros"]
+
----
pass:c,a,q[{prod-url}]#__<devfile_url>__
----
+
[TIP]
====
You can extend this URL with optional parameters:
[source,subs="+quotes,+attributes,+macros"]
----
pass:c,a,q[{prod-url}]#__<devfile_url>__?__<optional_parameters>__ <1>
----
<1> See xref:optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc[].
====
+
.A URL for starting a new workspace
====

`pass:c,a,q[{prod-url}#https://raw.githubusercontent.com/che-samples/cpp-hello-world/main/devfile.yaml]`

====
+
[TIP]
====
You can pass your Personal Access Token to the URL to have access to private repositories:
[source,subs="+quotes,+attributes,+macros"]
----
pass:c,a,q[{prod-url}]#__https://__<token>__@__<host>__/__<path> <1>
----
<1> Your Personal Access Token that you generated on the Git provider's website.

This works for GitHub, GitLab, Bitbucket, Microsoft Azure, and other providers that support Personal Access Token.
====
+
.Verification

After you enter the URL to start a new workspace in a browser tab, it renders the workspace-starting page. When the new workspace is ready, the workspace IDE loads in the browser tab.

The workspace has a unique URL: `pass:c,a,q[{prod-url}]#workspace__<unique_url>__`.

[TIP]
====
You can not bookmark a URL for starting a new workspace in the address bar, but you can create the bookmark by using the browser bookmark manager instead:

* In Mozilla Firefox, go to *☰* *>* *Bookmarks* *>* *Manage bookmarks Ctrl+Shift+O* *>* *Bookmarks Toolbar* *>* *Organize* *>* *Add bookmark*.

* In Google Chrome, go to *⋮* *>* *Bookmarks* *>* *Bookmark manager* *>* *Bookmarks bar* *>* *⋮* *>* *Add new bookmark*.
====
[IMPORTANT]
====
To initiate a clone of the Git repository in the filesystem of the new workspace, the devfile must contain project info.

See https://devfile.io/docs/2.2.0/adding-projects.
====

.Additional resources

* xref:optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc[]
* xref:basic-actions-you-can-perform-on-a-workspace.adoc[]
1 change: 1 addition & 0 deletions modules/end-user-guide/pages/user-onboarding.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
If your organization is already running a {prod-short} instance, you can get started as a new user by learning how to start a new workspace, manage your workspaces, and authenticate yourself to a Git server from a workspace:

. xref:starting-a-new-workspace-with-a-clone-of-a-git-repository.adoc[]
. xref:starting-a-new-workspace-from-a-devfile-url.adoc[]
. xref:optional-parameters-for-the-urls-for-starting-a-new-workspace.adoc[]
. xref:basic-actions-you-can-perform-on-a-workspace.adoc[]
. xref:authenticating-to-a-git-server-from-a-workspace.adoc[]