Skip to content

script: Improve getenvvar helper #3457

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stephenfin
Copy link
Contributor

Make this script a little more useful, based on my personal experiences using it.

  • Handle multiple clouds.yaml files
  • Use OS_CLOUDS if set
  • Add uv dependencies metadata header

* Handle multiple clouds.yaml files
* Use OS_CLOUDS if set
* Add uv dependencies metadata header

Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
@github-actions github-actions bot added edit:testinfra This PR updates testing infrastructure code semver:patch No API change backport-v2 This PR will be backported to v2 labels Jul 15, 2025
@coveralls
Copy link

Coverage Status

coverage: 63.725%. remained the same
when pulling 4e1d9e6 on shiftstack:getenvvar-improvements
into 93ff101 on gophercloud:main.

@stephenfin stephenfin requested a review from kayrus July 21, 2025 15:28
@kayrus
Copy link
Contributor

kayrus commented Jul 23, 2025

@stephenfin what does this script do? it's not used anywhere in gophercloud

@stephenfin
Copy link
Contributor Author

@stephenfin what does this script do? it's not used anywhere in gophercloud

I use it locally so that I can run integration tests (remember how I said I only have clouds.yaml files?). The file docstring says as much:

"""
Set environment variables required for the CI jobs by inspection of the
clouds.yaml file. This is useful where you only have this file.
To set variables:
$ eval $(./script/getenvvar)
To unset them:
$ unset $(compgen -v | grep OS_)
"""

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v2 This PR will be backported to v2 edit:testinfra This PR updates testing infrastructure code semver:patch No API change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants