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
$PROJECT_SOURCE env variable #3781
Comments
Prioritise this #3729 |
$PROJECT_SOURCE is required for using parent without this env varibale parent devfiles are unusable, but we are not using it anywhere yet |
so it would be ok to implement it after GA |
I had a question regarding a use case and wanted to see how we should respond to it. Consider the situation: devfile snippet:
explanation:When a user overwrites When this happens, the
|
@maysunfaisal So, here are my thoughts: I actually don't think we should allow
* Odo uses the following logic to determine the project root (in order):
|
+1 on no point for user to override the On high level, there is no different from someone specify a clone path but then their build scripts are trying to build the source from a different location. It is an inconsistent config that the user provides. Having said that, it will be nice to flag that as a warning during devfile validation to avoid the user accidentally change the value of those variables. If you take a look at the spec under the command section
The spec already say those are special variables. We can consider to update the spec to say those are |
/kind user-story
User Story
As a Devfile author, I always want to know the exact location of the project source code So that I can execute commands in a current diretory
Acceptance Criteria
${PROJECT_SOURCE}
env variable should be available in every container of the component so it can be used incommandLine
orworkingDir
fields inside Devfiles${PROJECT_SOURCE}
should point to a directory that contains project source code${PROJECT_SOURCE}
will point to the source code of the first one${PROJECT_SOURCE}
will be equal to the value of${PROJECTS_ROOT}
Notes
${PROJECT_SOURCE}
can be different for each container because it depends onsourceMapping
value and on${PROJECTS_ROOT}
value both are set per container.${PROJECTS_ROOT}
depends onclonePath
value (defaults to project name) (clonePath should be supported in odo #3729)Links
/kind user-story
/priority high
The text was updated successfully, but these errors were encountered: