Commit Graph
210 Commits
Author SHA1 Message Date
StefanSpieker 69a524ab0b Fixed deprecated warnings without changing behaviour (#4177)
* fixed deprecated warnings without changing behaviour

* use Charset.defaultCharset() instead of null
2019-09-13 09:45:34 +02:00
Raihaan Shouhell a7e804399c Replace Apache Commons Codec Base64 implementations with standard java.util.Base64 (#4169)
* Replace apache base64 with java

* Swap to regular encoder
2019-09-04 00:08:15 +02:00
ThomasPerkins1123 f0363a5739 Add unit tests for hudson.cli.HexDump (#4058)
* Add unit tests for hudson.cli.HexDump

These tests were written using Diffblue Cover.

* Changed byte arrays to work for windows
2019-07-03 16:32:57 +02:00
suren a205a20bd1 Remove All localized files of Chinese 2019-05-02 19:18:04 +08:00
Jesse Glick 545bf0facd Removing forgotten mention of now-deleted -remoting CLI option. 2019-04-19 16:50:02 -04:00
Ivan Fernandez Calvo 46cbaf51e8 [JENKINS-56167] Replace Trilead-ssh2 PEMParser class (#3902)
* [JENKINS-56167] Replace Trilead-ssh2 PEMParser class by Mina SSHD SecurityUtils.loadKeyPairIdentity implementation

* Update PrivateKeyProviderTest.java

* Update cli/src/test/java/hudson/cli/PrivateKeyProviderTest.java

Co-Authored-By: kuisathaverat <kuisathaverat@users.noreply.github.com>

* Update PrivateKeyProviderTest.java

* Update PrivateKeyProvider.java

* Update PrivateKeyProviderTest.java

* Update PrivateKeyProvider.java
2019-02-25 10:11:42 +01:00
Oleg Nenashev 621be2a4ce Merge pull request #3899 from jsoref/properties-quotes
Fix single quotes in properties files
2019-02-15 13:17:47 +01:00
Josh Soref f73e15516f Fix single quotes in properties files
Embarrassingly, one of these is from my PR #3588
2019-02-14 19:24:45 -05:00
Jesse Glick f150370166 Forgotten @Deprecated. 2019-02-14 14:45:52 -05:00
Jesse Glick f7ff281997 Removing code to support the Remoting-based CLI. 2019-01-08 22:39:07 -05:00
Francisco Fernández f6ef70a8d4 [JENKINS-54310] java.io.IOException: Stream is closed when the CLI has not read entirely the input (#3708)
* [JENKINS-54310] read the input at once

* [JENKINS-54310] reading as String

* [JENKINS-54310] Change the approach for those CLI that open a shell
2018-11-07 10:08:52 +03:00
Josh Soref 0aea34735d cli: Fix up usage message (#3676)
The properties file naively assumed that leading spaces would be honored.
-- They are not. To get some indentation, one needs to escape a space first.

Further, for no particular reason, the last paragraph had a hard wrap.

Finally, since this commit has to reindent the entire block, fix the alignment of the `:`s
for most of the options.
(-auth is a mess and should be rewritten)
2018-10-09 09:20:34 +02:00
Oleg Nenashev 56c6571d73 [JENKINS-53792] - Update CLI help to advertise usage of credential files (#3684)
* [JENKINS-53792] - Update CLI help to advertise usage of credential files

* [JENKINS-53792] - Use redirect as suggested by @daniel-beck
2018-10-07 19:19:36 +02:00
Francisco Fernández e998a7808f [JENKINS-53792] Env vars to configure CLI -auth option (#3653)
* [JENKINS-53792] Add env vars for auth option

* [JENKINS-53792] Fix encoding after first commit

* [JENKINS-53792] Better readability

* [JENKINS-53792] Refactor and use the ApiToken

* [JENKINS-53792] Fix encoding
2018-10-06 16:05:38 +02:00
Oleg Nenashev 0795e89b30 Merge pull request #3642 from oleg-nenashev/build/javadoc-tt-tag
Javadoc: cleanup `tt` tags from Javadoc (prohibited in JDK11)
2018-09-21 19:10:21 -07:00
Oleg Nenashev b5be66014c [JENKINS-53693] - Update PowerMock and Mockito to a Java11-compatible version (#3637)
* [JENKINS-53693] - Update PowerMock and Mockito to a Java11-compatible version

* [JENKINS-53693] - Fix tests which depend on mocking

* [JENKINS-53693] - Apply fixes to PowerMock
2018-09-21 19:08:35 -07:00
Oleg Nenashev d9d31f9914 Cleanup Javadoc errors in hudson.cli.PrivateKeyProvider (fails in Java 11) 2018-09-21 17:47:03 -07:00
Jesse Glick 0268cc9929 Remove ${build.version} property in favor of ${project.version}. 2018-05-09 15:17:02 -04:00
Oleg Nenashev bb89137596 Merge pull request #3338 from oleg-nenashev/findbugs/JENKINS-50064
Cleanup FindBugs in CLI + some refactoring
2018-03-18 06:59:38 +01:00
Jesse Glick f9e4df59d5 Merge branch 'master' into anonymous-warning-JENKINS-49994 2018-03-12 12:24:31 -04:00
Oleg Nenashev 5e0e553353 [JENKINS-50064] - Suppress FindBugs warning in CLI, switch to the medium level 2018-03-10 21:54:43 +01:00
Jesse Glick d94049cc71 https://github.com/kohsuke/localizer/pull/11 actually works now. 2018-03-09 12:51:56 -05:00
Jesse Glick 73b16084f9 [JENKINS-49994] Warn about Remoting serialization of anonymous inner classes and their ilk. 2018-03-07 14:52:34 -05:00
Jesse Glick d3645f7dfe Updating Powermock and Objenesis to avoid Mockito/Hamcrest library mismatches. 2017-12-08 10:44:58 -05:00
Gentle Yang 8bb8057e8d update to the newest version 2017-11-27 21:33:23 +08:00
Gentle Yang 125cf9d8f1 Create Messages_zh_CN.properties 2017-11-25 22:07:19 +08:00
Alessandro Menti 2934c7b945 Update the Italian localization 2017-10-12 20:34:05 +02:00
Jesse Glick 5e84c5470f [JENKINS-18114] Fixing CLI crumbs (#3019)
* [JENKINS-18114] The CLI client already asks for a crumb; we just to actually serve it, from CrumbIssuer.RestrictedApi.

* serveCliActionToAnonymousUserWithoutPermissions() was checking some stuff better checked by authentication(), and was failing since this fake client was not passing a crumb.

* Bring back CliCrumbExclusion, needed for anonymous use with no read access, and just let the client stop asking for a crumb.

* Added FullDuplexHttpServiceTest; useful to have a simple, self-contained demonstration of the HTTP Duplex transport.
2017-09-22 11:55:52 +03:00
Jesse Glick dc06c3f03b [FIXED JENKINS-46659] Avoid Jetty timeouts by sending a ping-like packet every 10s while a CLI command is running. 2017-09-09 15:45:26 -04:00
Jesse Glick 00956ff9da [JENKINS-39738, JENKINS-43668] - Pick up SSHD module including sshd-core 1.6.0 (#2853)
* Pick up SSHD module including sshd-core 1.4.0.

* [FIXED JENKINS-39738] Picking up https://github.com/jenkinsci/sshd-module/commit/bb6963453086edef4e600abb2740182cd2f4ade0

* Picking up Apache SSHD 1.6.0 & Jenkins sshd module 2.0.
2017-07-08 01:01:01 +02:00
Oliver Gondža 662df37426 Resolving the redirect is OK to fail 2017-06-19 13:22:25 +02:00
Oliver Gondža d9cb39f95f Use authorization to resolve redirect 2017-06-19 12:52:18 +02:00
Oliver Gondža 552d2835cc Address review comment 2017-06-19 09:34:44 +02:00
Oliver Gondža 741be05517 [FIXED JENKINS-44361] Follow HTTP redirects while initiating CLI connection 2017-05-23 15:16:04 +02:00
Stephen Connolly 3871d7778e [JENKINS-43531] Plugins may not be expecting InvalidPathException
- Plugins should really be expecting it, but as historically they have not, may as well convert to IOE for them
2017-04-19 14:04:33 +01:00
Jesse Glick 7c16d8dc46 Fix Javadoc generation on JDK 8. 2017-04-11 09:26:45 -04:00
Jesse Glick 729016989e [FIXED JENKINS-41745] Merged #2795: non-Remoting-based CLI. 2017-04-07 20:08:05 -04:00
Jesse Glick 0f87e10a69 @oleg-nenashev requested this be decoupled from https://github.com/jenkinsci/sshd-module/pull/10. 2017-04-07 11:29:21 -04:00
Jesse Glick f3da0e498f Minor review comments from @oleg-nenashev. 2017-04-07 10:22:06 -04:00
Jesse Glick 6ffc57ae79 Verifying that PlainCLIProtocol ignores unrecognized opcodes, so long as it has received well-formed frames. 2017-04-06 15:58:23 -04:00
Jesse Glick 9150d5b563 Suppress an idle timeout from Jetty which would otherwise interfere with interactive commands. 2017-04-06 15:30:53 -04:00
Jesse Glick c41c97b3a2 @stephenc requested documentation of the deprecated FullDuplexHttpStream constructor, and as it turns out it did not work. 2017-04-06 11:40:19 -04:00
Jesse Glick 724ebbcc50 Improved error message displayed when using -http against a pre-JENKINS-41745 server. 2017-04-05 18:42:33 -04:00
Jesse Glick da581599fd -http mode broke when the user omitted the mandatory final / in the Jenkins URL. 2017-04-05 18:28:37 -04:00
Jesse Glick 3939820c5f Using logger as suggested by @rsandell. 2017-04-05 09:53:14 -04:00
Jesse Glick 7bca0a1eef Refined implementation of -logger. 2017-04-05 09:48:56 -04:00
Jesse Glick 9fc59bf251 Finally figured out how to suppress the ReadPendingException from Jetty.
Something¹ seems to interrupt the HTTP duplex service thread,
and Jetty apparently deals poorly with interruptions.
So introduce an extra sleep to soak up the interrupt.

¹Who? http://stackoverflow.com/questions/2126997/who-is-calling-the-java-thread-interrupt-method-if-im-not#comment40865453_2127397
2017-04-04 19:15:03 -04:00
Jesse Glick 3b92399db8 Tested Jetty 9.4.3.v20170317 but ReadPendingException’s did not disappear. 2017-04-04 14:50:46 -04:00
Jesse Glick fb311c687f Suppress a meaningless ClosedChannelException thrown by Jetty when killing a client. 2017-04-04 14:01:57 -04:00
Jesse Glick 03aa2a1f17 Simpler to catch ReadPendingException in just one place. 2017-04-04 13:48:21 -04:00