janinko / ghprb

github pull requests builder plugin for Jenkins
https://wiki.jenkins-ci.org/display/JENKINS/GitHub+pull+request+builder+plugin
MIT License
369 stars 19 forks source link

auth not working when using description #486

Closed inakypg closed 6 years ago

inakypg commented 6 years ago

We use jenkins-job-builder to manage our jobs

In order to make things readable, when we configure our different github servers (public and enterprise ones) in Manage Jenkins > Configuration, we add a 'description' to each that matches their main hostname (eg: github.com for the main one which has a given hex AUTHID1, github.subdomain.com for an enterprise one which has a hex AUTHID2, etc).

This would allows us, when specifying the jobs, to use an auth-id field in the jenkins-job-builder trigger (https://docs.openstack.org/infra/jenkins-job-builder/triggers.html#triggers.github-pull-request) to the description instead of the AUTHID, as in the help it says "A short description used in the job configuration page to tie the auth settings to each job".

But then it doesn't; the config XML for the job will have an entry:

  <gitHubAuthId>github.subdomain.com</gitHubAuthId>

but it doesn't then tie to the right one -- it keeps thinking it is the main github.com (defaults to it?). If I select with the UI, then the XML will be right to the hex AUTHID.

Having to use the hex AUTHID makes it quite hard to manage the job configuration (plus it is non-intuitive).

inakypg commented 6 years ago

Ugh, dumb -- wrong repo, sorry for that, reopening at the main one at https://github.com/jenkinsci/ghprb-plugin/issues/686.