-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
There's a couple environment variables that the devfile spec defines:
$PROJECTS_ROOT: A path where projects sources are mounted$PROJECT_SOURCE: A path to a project source, including the project root (${PROJECTS_ROOT}/<project-name>)
It's assumed that these environment variables will be set to the proper values and available in the containers defined in a devfile.
In addition to the sourceMapping field, odo currently allows the projects root to be changed by overriding the PROJECTS_ROOT environment variable in the container spec, e.g.:
components:
- name: runtime
container:
image: quay.io/eclipse/che-java11-maven:nightly
memoryLimit: 768Mi
mountSources: true
sourceMapping: /test
command: ['tail']
args: [ '-f', '/dev/null']
env:
- name: PROJECTS_ROOT
value: /mycustom/path/
We had some discussion last week on $PROJECT_SOURCE and decided that it wasn't valid for odo to allow it to be overridden by users, as it relies on both the value of $PROJECTS_ROOT (see redhat-developer/odo#3781 for some discussion) and where the source code is located.
So, I guess I have a couple questions:
- Should we update the devfile spec to formally not allow
$PROJECT_SOURCEto be overridden in the container spec by users? - Should we do the same for
$PROJECTS_ROOTtoo? Given that the project root can still be changed by configuringsourceMapping
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels