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

Specify the source mapping path for component containers #17

Closed
l0rd opened this issue Feb 6, 2020 · 4 comments · Fixed by #35
Closed

Specify the source mapping path for component containers #17

l0rd opened this issue Feb 6, 2020 · 4 comments · Fixed by #35
Labels
area/api Enhancement or issue related to the api/devfile specification
Milestone

Comments

@l0rd
Copy link
Contributor

l0rd commented Feb 6, 2020

Currently, project source is mounted to either CHE_PROJECT_ROOT or /projects when mountSources is true. The CHE_PROJECT_ROOT value is configurable during Che setup via the che.properties file

If odo is to consume the devfiles, we would like it to have an alternate way to set the source path value in the component container, rather than having a fixed single value via either CHE_PROJECT_ROOT or /projects for all the devfiles.

This can be achieved by having sourceMapping when mountSources is true, which transfers/mounts the project to the specified path in the container.

Che can also use the property i.e.; when sourceMapping is present, it overrides the CHE_PROJECT_ROOT value if present and mounts the source to the path defined by sourceMapping

Example:

---
components:
  - container:
      image: "busybox"
      name: "mycontainer"
      mountSources: true
      sourceMapping: "/home/src"
@l0rd l0rd added the area/api Enhancement or issue related to the api/devfile specification label Feb 6, 2020
@l0rd
Copy link
Contributor Author

l0rd commented Feb 6, 2020

cc @johnmcollier @elsony

@l0rd l0rd mentioned this issue Feb 6, 2020
28 tasks
@l0rd
Copy link
Contributor Author

l0rd commented Feb 18, 2020

Proposal reviewed and approved.

@kadel
Copy link
Member

kadel commented Mar 24, 2020

A small addition to this. The env variable should NOT be called CHE_PROJECT_ROOT anymore.
Something more generic would be better. Maybe just PROJECTS_ROOT

davidfestal added a commit that referenced this issue Apr 3, 2020
Signed-off-by: David Festal <dfestal@redhat.com>
davidfestal added a commit that referenced this issue Apr 10, 2020
PR comment is here: #35 (comment)

Signed-off-by: David Festal <dfestal@redhat.com>
davidfestal added a commit that referenced this issue Apr 22, 2020
* Implement agreement on issue #18
* Implement agreement on issue #17
* Implement agreement on issue #21
* Implement agreement on issue #22
* Implement agreement on issue #27
* Implement agreement on issue #9
* Implement agreement on issue #10
* Fix PR comments about issue #9 PR comment #35 (comment)
* Fix PR comments about issue #17 PR comment #35 (comment)
* Implement agreement on issue #14 and  #19
* Add the spring boot example
* Implement agreement on issue #32
* Fix last PR comments

Signed-off-by: David Festal <dfestal@redhat.com>

Co-Authored-By: Sergii Leshchenko <sleshche@redhat.com>
@l0rd l0rd added this to the 2.0.0 milestone Jun 16, 2020
@davidfestal davidfestal linked a pull request Jun 23, 2020 that will close this issue
@davidfestal
Copy link
Collaborator

Implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/api Enhancement or issue related to the api/devfile specification
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants