Default CLI mode to -webSocket - #7605
Merged
Merged
Conversation
jglick
commented
Jan 25, 2023
|
|
||
| boolean noKeyAuth = false; | ||
|
|
||
| // TODO perhaps allow mode to be defined by environment variable too (assuming $JENKINS_USER_ID can be used for -user) |
Member
Author
There was a problem hiding this comment.
If anything we could introduce something like
export JENKINS_CLI_OPTS="-http -s https://jenkins/ -auth admin:$(cat token)"
NotMyFault
approved these changes
Feb 9, 2023
timja
approved these changes
Feb 9, 2023
Member
|
/label ready-for-merge This PR is now ready for merge. We will merge it after ~24 hours if there is no negative feedback. |
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.
#4369 introduced
-webSockettransport, which was at the time considered experimental and so the default remained-http. Since then, as far as I know it has been stable (at least after #5455), so it seems appropriate to make it the default now rather than-httpwhich relies on a hack (FullDuplexHttpService) to keep two HTTP connections open. Since both modes accept the same authentication option—namely, an API token—the change ought to be transparent for most users.Testing done
Ran with various transport options, or none, plus
-logger FINEto confirm the mode being used.Proposed changelog entries
-webSocket. You can specify-httpto continue to use the former default (for example because you are running Jenkins in a servlet container other than the recommended built-in Jetty, or because you are running an unusual reverse proxy which does not support WebSocket). You can also continue to specify-sshto use SSH transport (for example because you prefer to authenticate with a private key rather than an API token), or use a native SSH client.Proposed upgrade guidelines
If you use the Jenkins CLI but cannot make WebSocket connections to the Jenkins controller, you will now need to pass the
-httpor-sshoption if you were not already doing so.Maintainer checklist
Before the changes are marked as
ready-for-merge:upgrade-guide-neededlabel is set and there is a Proposed upgrade guidelines section in the pull request title (see example).lts-candidateto be considered (see query).