containertool: Allow destination repository to be set by an environment variable #127
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
It is currently only possible to set the destination repository by specifying the mandatory
--repository
flag. Setting the repository from an environment variable can be more convenient in scripts and in the terminal - the destination repository can be set once and inherited by all further builds in the same shell.Modifications
--repository
is no longer a mandatory argument.CONTAINERTOOL_REPOSITORY
environment variable is used if--repository
is not set.Fixes #100
Result
Either
--repository
orCONTAINERTOOL_REPOSITORY
can be used to define the destination repository. The command line flag takes precedence over the environment variable.Test Plan
All existing tests continue to pass.