Skip to content

add PROJECTS_ROOT and PROJECT_SOURCE description to CommandLine and WorkingDir#116

Merged
kadel merged 6 commits intodevfile:masterfrom
kadel:project-source
Aug 20, 2020
Merged

add PROJECTS_ROOT and PROJECT_SOURCE description to CommandLine and WorkingDir#116
kadel merged 6 commits intodevfile:masterfrom
kadel:project-source

Conversation

@kadel
Copy link
Member

@kadel kadel commented Aug 17, 2020

What does this PR do?

Add information about environment variables that are available in commandLine and WorkingDir fields
$PROJECTS_ROOT: A path where projects sources are mounted
$PROJECT_SOURCE: A path to a project source ($PROJECTS_ROOT/<project-name>).

What issues does this PR fix or reference?

fixes #109

Is your PR tested? Consider putting some instruction how to test your changes

Docs PR

//
// Special variables that can be used:
//
// - `$PROJECTS_ROOT`: A path path where projects sources are mounted
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is $VAR_NAME is the only available format? Or ${VAR_NAME} is available as well?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

${VAR_NAME} should work as well. But I guess this will depend on implementation.

kadel and others added 2 commits August 17, 2020 15:34
Co-authored-by: Serhii Leshchenko <sleshche@redhat.com>
Copy link
Contributor

@amisevsk amisevsk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally LGTM, though I think the default variable format suggested in the docs should be ${VAR} instead of $VAR. We can leave details up to implementation, but the format listed in documentation determines the minimal spec, and in that regard ${VAR} is more versatile -- e.g. ${PROJECT_SOURCE}/bin vs $PROJECT_SOURCE/bin.

@kadel
Copy link
Member Author

kadel commented Aug 18, 2020

Generally LGTM, though I think the default variable format suggested in the docs should be ${VAR} instead of $VAR. We can leave details up to implementation, but the format listed in documentation determines the minimal spec, and in that regard ${VAR} is more versatile -- e.g. ${PROJECT_SOURCE}/bin vs $PROJECT_SOURCE/bin.

That makes sense.
I'll change it to ${VAR}
We just need to make sure that we use this format everywhere in our documentation.

@kadel kadel merged commit 002d129 into devfile:master Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Parent Devfiles and workingDir vs clonePath issue

3 participants