Skip to content

script: Improve getenvvar helper#3457

Merged
stephenfin merged 1 commit intogophercloud:mainfrom
shiftstack:getenvvar-improvements
Jul 23, 2025
Merged

script: Improve getenvvar helper#3457
stephenfin merged 1 commit intogophercloud:mainfrom
shiftstack:getenvvar-improvements

Conversation

@stephenfin
Copy link
Copy Markdown
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
Copy Markdown

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
Copy Markdown
Contributor

kayrus commented Jul 23, 2025

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

@stephenfin
Copy link
Copy Markdown
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_)
"""

@stephenfin stephenfin merged commit f1cabac into gophercloud:main Jul 23, 2025
14 checks passed
@stephenfin stephenfin deleted the getenvvar-improvements branch July 23, 2025 17:12
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