-
Notifications
You must be signed in to change notification settings - Fork 14
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
Support enterprise github urls #3
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds fine as a quick fix.
// Just discovered this PR while looking at something else
Maybe not a good idea. Even assuming that URL pattern is reliable (I do not know), would we expect these repositories to accessible anonymously from the Jenkins server? Support for authenticated repositories was deliberately omitted from this simple plugin, which was meant only to make it easier to share libraries on the Internet; a particular company would more likely want to predefine libraries with specific authentication and so on. Of course you can write additional plugins that offer library resolvers with other behaviors. |
My thoughts are a bit different on this, probably the URL needs to parameterized including the public GitHub URL, as a developer I feel comfortable pulling in any library from the internal enterprise server but not from the public GitHub or internet (for various security reasons. ) |
Perfectly reasonable, but probably deserves a separate plugin with its own configuration or something. (Of course you can do without any feature like this by explicitly configuring libraries; the convenience here is being able to refer to a library repo without any system-level or even folder-level configuration, just a line in a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the right approach here is to check either org.jenkinsci.plugins.github_branch_source.GitHubConfiguration.endpoints
or org.jenkinsci.plugins.github.config.GitHubPluginConfig.configs
(not sure offhand why both exist; something to be dealt with at some point) and only match non-git.luolix.top
URLs which correspond to one of the known GHE endpoints, picking up any credentials from that endpoint as well.
It would be nice if we can enhance this to support enterprise github urls too.
Especially we have an instance github.domain.com.
Not sure if we need to expand this to support more options? Any suggestions.
Really appreciate your time. Thanks for the good work.