Allow config of registry repo URLs with ENV#208
Open
TransGirlCodes wants to merge 4 commits intoJuliaRegistries:masterfrom
Open
Allow config of registry repo URLs with ENV#208TransGirlCodes wants to merge 4 commits intoJuliaRegistries:masterfrom
TransGirlCodes wants to merge 4 commits intoJuliaRegistries:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #208 +/- ##
========================================
- Coverage 13.21% 6.51% -6.7%
========================================
Files 27 27
Lines 1256 1258 +2
========================================
- Hits 166 82 -84
- Misses 1090 1176 +86
Continue to review full report at Codecov.
|
Author
|
There is an alternative to this, which is to do something like this in the Docker:
If you'd rather that I try that and see if that works before changing Registrator code, that's cool, I can try that this week and report back. |
nkottary
reviewed
Jul 25, 2019
| # assign it a default one, obtained from ENV. | ||
| if !haskey(target_registry, "repo") | ||
| specific_env_key = string(uppercase(target_registry_name), "_REGISTRY_URL") | ||
| envkey = ifelse(haskey(ENV, specific_env_key), specific_env_key, "DEFAULT_REGISTRY_URL") |
Member
There was a problem hiding this comment.
This and the next line can be simplified to:
target_registry["repo"] = get(ENV, specific_env_key, ENV["DEFAULT_REGISTRY_URL"])
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds the ability to get the port from ENV for the WebUI.
It also addresses #74, by allowing URLs for registries to be specified through ENV.
This is useful for services like Heroku where the URL used for the repository contains the access token:
https://USER:TOKEN@github.com/User/Repo.I'm not sure, but currently, I don't think the token field in
config.commentbot.tomlis actually used.Because providing an access token for this field, and then using a normal https URL for the registries results in authentication errors for me, whereas using repo urls of the form
https://USER:TOKEN@github.com/User/Repoworks fine.EDIT: I stand corrected, the token field is used, in parts of the comment bot where GitHub.jl is used, it's just seemingly not used when it comes to cloning the registry repo and doing the stuff Regedit/Registration service does.