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

Add extension to pass custom environment variables #51

Merged
merged 2 commits into from
Aug 28, 2019

Conversation

meyerj
Copy link
Contributor

@meyerj meyerj commented Aug 27, 2019

Mimics the -e, --env option of docker run:

       -e, --env=[]
          Set environment variables

       This option allows you to specify arbitrary environment variables that are available for the process that will be launched inside of the container.

Probably shlex.quote should be applied to other extensions that allow the user to pass custom command line arguments, too, for example #46.

meyerj and others added 2 commits August 27, 2019 21:57
Copy link
Collaborator

@tfoote tfoote left a comment

Choose a reason for hiding this comment

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

Thanks for adding this. I was thinking of trying to work to avoid people passing arbitrary environment variables through and keep things in extensions. But that's too much overhead for many things.

I added some basic unit tests too.

@tfoote tfoote merged commit e27cc0b into osrf:master Aug 28, 2019
@codecov
Copy link

codecov bot commented Aug 28, 2019

Codecov Report

Merging #51 into master will increase coverage by 0.66%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #51      +/-   ##
==========================================
+ Coverage   82.66%   83.33%   +0.66%     
==========================================
  Files           5        5              
  Lines         375      390      +15     
==========================================
+ Hits          310      325      +15     
  Misses         65       65
Impacted Files Coverage Δ
src/rocker/extensions.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5e5f0fd...d3ae2c1. Read the comment docs.

130s pushed a commit to plusone-robotics/rocker that referenced this pull request Apr 17, 2021
* Add extension to pass custom environment variables

Signed-off-by: Tully Foote <tfoote@osrfoundation.org>
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.

2 participants