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

allow custom environment directory, fixes #2025 #2057

Merged
merged 6 commits into from
Jul 28, 2021
Merged

Conversation

sriv
Copy link
Member

@sriv sriv commented Jul 27, 2021

This PR allows env folder in a gauge project to be configured.

IMPORTANT - this allows changing the env directory to a custom name/location. This does not change the way environments function, i.e. gauge run --env=foo will continue to function.

Things to note:

  • the environment directory is still expected to be a sub-directory in the project.
  • the default behaviour would be to continue using env directory
  • there are two ways to override the location, either by setting gauge_env_dir environment variable or using EnvironmentDir key in the project's manifest.json.
  • in case there is no manifest.json found, gauge will default to env.
  • the precedence is given to gauge_env_dir env variable -> manifest.json -> default env.

Signed-off-by: sriv srikanth.ddit@gmail.com

Signed-off-by: sriv <srikanth.ddit@gmail.com>
@gaugebot
Copy link

gaugebot bot commented Jul 27, 2021

@sriv Thank you for contributing to gauge. Your pull request has been labeled as a release candidate 🎉🎉.

Merging this PR will trigger a release.

Please bump up the version as part of this PR.

Instructions to bump the version can found at CONTRIBUTING.md

If the CONTRIBUTING.md file does not exist or does not include instructions about bumping up the version, please looks previous commits in git history to see what changes need to be done.

@sriv sriv mentioned this pull request Jul 27, 2021
Signed-off-by: sriv <srikanth.ddit@gmail.com>
@sriv sriv requested a review from zabil July 27, 2021 12:18
@sriv
Copy link
Member Author

sriv commented Jul 27, 2021

#2047 can be reviewed and merged before this.

zabil
zabil previously approved these changes Jul 27, 2021
Copy link
Member

@zabil zabil left a comment

Choose a reason for hiding this comment

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

Can you also update the documentation with info about this after merging it?

sriv and others added 2 commits July 28, 2021 06:03
* introduce gauge_data_dir

allow csv/txt data files to be in subdirectory, configured by gauge_data_dir

fixes #2046

Signed-off-by: sriv <srikanth.ddit@gmail.com>

* print debug when loading from gauge_data_dir, warning when setting incorrect gauge_data_dir

Signed-off-by: sriv <srikanth.ddit@gmail.com>

* better error message when table is not resolved from gauge_data_dir

Signed-off-by: sriv <srikanth.ddit@gmail.com>

* add tests for gauge_data_dir resolution

fixed some tests/code lint

Signed-off-by: sriv <srikanth.ddit@gmail.com>

* Update util/fileUtils.go

Co-authored-by: Zabil Cheriya Maliackal <zabil@users.noreply.github.com>
Signed-off-by: sriv <srikanth.ddit@gmail.com>

Co-authored-by: Zabil Cheriya Maliackal <zabil@users.noreply.github.com>
Signed-off-by: sriv <srikanth.ddit@gmail.com>
sriv added 2 commits July 28, 2021 06:06
Signed-off-by: sriv <srikanth.ddit@gmail.com>
@sriv sriv merged commit 5cc544c into master Jul 28, 2021
@sriv sriv deleted the 2025_custom_env_location branch July 28, 2021 02:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

2 participants