jenkinsci / java-client-api

A Jenkins API client for Java
MIT License
901 stars 470 forks source link

Is it possible to override the "Jenkins URL" configured in Jenkins? #420

Open dhubbard-ic opened 5 years ago

dhubbard-ic commented 5 years ago

In our environment the optional "Jenkins URL" has been set - to allow embedding of a user addressable URL in emails etc (as far as I understand).

This gives me a problem when using this library from a different server-based environment, as the Job URL has this configured "Jenkins URL" applied to it. The resulting URL, which is used in job.build(true), isn't addressable from my server.

If the "Jenkins URL" is removed then job.build(true) uses the address which my code supplies when creating the JenkinsServer.

Is there a way to stop the Jenkins URL (while it is set for other reasons) being used and always use the supplied address?