Define hudsonUrl
in WebSocket mode to fix agent installers
#454
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.
I noticed in CloudBees CI trying to launch a shared agent in WebSocket mode from the Java Web Start button an error indicating that the equivalent of https://github.com/jenkinsci/slave-installer-module/blob/8ab32a0616d147adef0d27fb51a359796e069eeb/src/main/java/org/jenkinsci/modules/slave_installer/impl/InstallerGui.java#L78 was throwing an NPE, despite the Jenkins root URL being configured. I could not reproduce a similar stack trace using an OSS agent connection, though the installer menu was not created either, so maybe the exception was just swallowed somewhere, or printed to the agent log which I forgot to check. Anyway, it seems clear from code that this
getHudsonUrl
method would have worked in TCP but not WebSocket mode.Also cleaning up a trailing slash check introduced in #391.
Tested in context by building Jenkins core with this, then building CBCI operations center & connected controller with that, running both, hooking them up, and going through two scenarios:
In both cases, used the JWS launch button and got a File from the agent installer (systemd in my case) as expected.