Commit Graph
17274 Commits
Author SHA1 Message Date
Jeff Thompson c76ee59810 Add findsecbugs plugin to spotbugs.
And suppress existing warnings. We should clean some of them up, but that's for different PRs.
2020-01-23 14:53:53 -07:00
Baptiste Mathus b4ef17dd4c Merge pull request #4425 from fqueiruga/replace-jsbuilder-with-webpack
[JENKINS-60734] Replace jsbuilder with webpack
2020-01-23 10:19:10 +01:00
Jesse Glick 33f90516ec Merge pull request #4444 from jglick/ExtensionFinder-NPE-JENKINS-60816
[JENKINS-60816] Missing null check when traversing type hierarchy of interfaces
2020-01-21 20:29:13 -05:00
Ramon LeonandAdrien Lecharpentier ea77a6f7bf [JENKINS-60725] Add an ignored place to missing class telemetry (#4433)
* [JENKINS-60725] Add an ignored place to missing class telemetry

* Apply suggestions from code review

Co-Authored-By: Adrien Lecharpentier <adrien.lecharpentier@gmail.com>

* Add issue inline to the ignored place

Co-Authored-By: Adrien Lecharpentier <adrien.lecharpentier@gmail.com>

Co-authored-by: Adrien Lecharpentier <adrien.lecharpentier@gmail.com>
2020-01-21 23:00:42 +01:00
Jesse Glick 17c4c35813 [JENKINS-60816] Missing null check when traversing type hierarchy of interfaces 2020-01-21 15:53:19 -05:00
Félix Queiruga 99832f1b94 Adds clarification that the vendors.js file is built by webpack 2020-01-21 18:03:27 +01:00
Oleg Nenashev 5a7af03c5b Merge pull request #4438 from StefanSpieker/clean_up
Removed unnecessary semicolons and unused imports
2020-01-21 08:16:44 +01:00
Jon Brohaugeandjnz-topdanmark 676ef12fc7 Fix JENKINS-60822 cannot parse changelog.url in message property files (#4440)
Co-authored-by: jnz-topdanmark <58268646+jnz-topdanmark@users.noreply.github.com>
2020-01-21 07:01:22 +01:00
Jesse Glick 5b5040298f [JEP-222] WebSocket support (#4369)
* Playing with WebSocket connections.

* Pluggable handlers.

* errorWithoutStack

* Server-side keepalive pings.

* Redesigned to work as an HttpResponse.

* Unused dep.

* Comment on JnlpSlaveRestarterInstaller.

* Sketch of WebSocket-based endpoint for JNLPLauncher.

* Comment.

* Test enhancement.

* Making it more obvious from JNLPLauncherTest where remoting.jar is being loaded from.

* Reworked protocol to negotiate remote capabilities.

* Unhelpful comment.

* Simplifying handshake to use HTTP headers.

* Moving code into top-level classes and otherwise prettifying.

* Linking to upstream PRs.

* Timestamped snapshot + incremental.

* Picking up incrementalified build of winstone.

* Working around https://github.com/kohsuke/access-modifier/pull/17.

* Finally have an incrementalified build of remoting.

* Use -webSocket option.

* Handling some close and error methods.

* Sending X-Remoting-Minimum-Version.

* If hudson.remoting.jnlp.Main._main fails, show the error.

* Comment.

* GUI analogue of https://github.com/jenkinsci/remoting/pull/357/commits/86cea5b83fd2fc93a9fc10896962eb42c95f80a0.

* Missing since tags.

* Capitalization.

* WebSockets.isSupported

* Rather than hiding JNLPLauncher.DescriptorImpl when the TCP port is disabled, always display it, but show form validation appropriate to WebSocket or TCP mode.

* Form validation fixes.

* Minor test improvements.

* Reworked WebSocketAgents to be compatible with JnlpAgentReceiver.

* Removing WebSocketSession.keepAlive in favor of a global setting applicable to all services.

* Add a -webSocket option to the Jenkins CLI.

* Using a snapshot deployment of Remoting, pending INFRA-2379.

* After #3838 there is no reason to recheck authentication after parsing CLICommand arguments.

* Advertise the -webSocket option.

* Adapt to newer HtmlUnit.

* https://github.com/HtmlUnit/htmlunit/pull/29 seems to have been incompatible.
WebClient.addRequestHeader will no longer override a header in a WebRequest,
such as when the same WebClient/WebRequest was previously used with different headers.

* Tracked down a behavioral change in passing through URL-encoded path characters.
https://github.com/HtmlUnit/htmlunit/commit/2c4956863420e4baef9d3d8c23ec0577ec64d2bf picks up
https://github.com/apache/httpcomponents-client/commit/8c04c6ae5e5ba1432e40684428338ce68431766b which is the actual change.

* Disabled TCP port does not matter in WebSocket mode.

* Shade dependencies needed for jenkins-cli.jar.

* Help text edit.

* https://github.com/jenkinsci/winstone/pull/79 was released as 5.5.

* https://github.com/jenkinsci/jenkins-test-harness/pull/183 released as 2.59.

* https://github.com/jenkinsci/jenkins/pull/4387#discussion_r362696234

* Bumping remoting to a new deployed snapshot.

* Need https://github.com/jenkinsci/winstone/pull/86.

* https://github.com/jenkinsci/winstone/pull/86 released as 5.6.

* Introduced constant for X-Remoting-Minimum-Version.

* s/slave/agent/ in GUI

* Removing in-JVM test, as it was no longer useful after introducing shading anyway.

* Bump.

* No need to check for anonymous CONNECT here.

* s/jenkins.slaves/jenkins.agents/g for new code.

* Restrict the diagnostic endpoint to administrators.

* Fixed Javadoc import after package move.

* https://github.com/jenkinsci/remoting/pull/357 released as 4.0.
2020-01-21 07:00:39 +01:00
Ramon Leon 0dd7009a0a [JENKINS-60678] Fix java checking on ComputerLauncher for AdoptOpenJDK 11 (#4434)
* [JENKINS-60678] Fix java checking on ComputerLauncher for AdoptOpenJDK 11

* [JENKINS-60678] Add more JDKs tests to check ComputerLauncher checks them correctly
2020-01-20 03:24:36 +01:00
Stefan Spieker c8ff153cdf removed unused imports 2020-01-19 14:49:21 +01:00
Stefan Spieker 126e3f577d removed unnecessary semicolons 2020-01-19 14:38:39 +01:00
Jesse GlickandOleg Nenashev d02c756358 [JENKINS-60750] Skip CONFIGURE_INSTANCE panel when root URL is set during skipFirstUser (#4430)
* [JENKINS-60750] Skip the CONFIGURE_INSTANCE panel when JenkinsLocationConfiguration.url is set, even when skipFirstUser is called.

* Add nullability annotation

Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2020-01-17 06:46:57 +01:00
Francisco FernándezandOleg Nenashev 3ade716f41 [JENKINS-60577] - Prevent the RSS feed in Computer page from returning an error 404 (#4411)
* [JENKINS-60577] Rss Latest Builds for Computer

* [JENKINS-60577] Missing javadoc

* [JENKINS-60577] Add builds from the computer

* Update core/src/main/java/hudson/model/Computer.java

* Apply suggestions from code review

Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>

* [JENKINS-60577] Document limitation to AbstractProject

* [JENKINS-60577] Restrict the RSS methods in Computer

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2020-01-15 07:54:52 +01:00
StefanSpiekerandOleg Nenashev ec13ac9b67 Spotbugs issues (#4416)
* Spotbugs: Fixed comparing strings with equals instead of ==

* Spotbugs: Do not return null in @Nonnull marked method, instead return empty string.

* Added Suppress for Spotbugs

* Apply suggestions from code review

Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>

* fixed javadoc

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2020-01-14 11:16:48 +01:00
Oleg Nenashev 7be7ce0332 Merge pull request #4422 from jglick/LogRotator-JENKINS-60716
[JENKINS-60716] Retain causes of a LogRotator failure for diagnosis
2020-01-14 11:16:27 +01:00
Oleg Nenashev 8ba98e9297 Merge pull request #4412 from jglick/changelog.url
Simplify CoreUpdateMonitor/message.properties: changelog.url → jenkins-version.properties
2020-01-11 13:56:23 +01:00
Josh Soref 19a50e498a [JENKINS-59412] Clarify that build history does not include pipeline stages (#4207)
* [JENKINS-59412] Clarify that build history does not include pipeline stages

* Clarify that pipelines are merely an example of tasks that may not be listed
2020-01-11 00:06:07 +01:00
StefanSpieker bef9ded543 [JENKINS-36720] - Fix Spotbugs issues (SE_COMPARATOR_SHOULD_BE_SERIALIZABLE, ES_COMPARING_STRINGS_WITH_EQ) (#4379)
* fixed Spotbugs issues (SE_COMPARATOR_SHOULD_BE_SERIALIZABLE, ES_COMPARING_STRINGS_WITH_EQ)

* replaced wildcard import with specific imports

* added missing import

* fixed spotbugs issues

* removed accidently added import
2020-01-11 00:04:02 +01:00
Félix Queiruga 0956410f1a Fix: broken reference on the setup wizard progress page 2020-01-10 16:36:15 +01:00
Oleg Nenashev 5db5ef5131 Merge pull request #4271 from ilpianista/JENKINS-42658
[JENKINS-42658] - Fix NPE in Agent API when the agent is offline (e.g. retrieving agent version or OS description)
2020-01-10 14:38:17 +01:00
Josh Soref 92cb872a6c [JENKINS-56152] Improve plugin manager UI wording + [JENKINS-56173] - Fix JavaScript error in Plugin Manager when optional dependency metadata cannot be retrieved (#3904)
* [JENKINS-56173] Uncaught TypeError: Cannot read property 'jenkinsPluginMetadata' of undefined

* [JENKINS-56173] missing dependencies covers both not installed and not enabled

* [JENKINS-56152] i18n: DirectlyDependentPlugins.title / IndirectlyDependentPlugins.title

* [JENKINS-56152] replace `version X` with `(X)`

* [JENKINS-56152] simplify messages; replace `version X` with `(X)`; use higher instead of later

* [JENKINS-56173] Uncaught Exception: TypeError: Cannot read property 'get' of undefined at _createResponder

* Update PluginWrapperTest

* Switch to descriptive class for plugin version
2020-01-10 12:26:52 +01:00
Karthick Prabu d3613f32ef [JENKINS-59220] - Updated EnvVars to add a method that extends putAll functionality (#4194)
* Updated EnvVars to add a method that extends putAll functionality

* Updated method name

* Added test coverage
2020-01-10 09:55:23 +01:00
Oleg Nenashev 58f8ac9b98 Merge pull request #4387 from jeffret-b/removeDeprecatedProtocols
[JENKINS-60381] Remove old, deprecated agent protocols.
2020-01-10 09:45:55 +01:00
A. Jard a00166bfd5 [JENKINS-60579] - Allow the usage of DescriptorVisibilityFilter to filter View properties on UI. (#4404)
* [JENKINS-60579] Functionnal test on View that shows the issue for invisible properties.

* [JENKINS-60579] Apply the visibility filter on View for configuration.

* [JENKINS-60579] Better configuration for testing on invisible property on view.

* [JENKINS-60579] Move tests on ViewPropertyTest.

* [JENKINS-60579]adding the since on getVisiblePropertyDescriptors.
2020-01-10 09:37:18 +01:00
Oleg Nenashev 867bc2cbef Merge pull request #4420 from darxriggs/fix-properties
Fix minor issues in localization files (escaping, incomplete entries, etc.)
2020-01-10 09:36:39 +01:00
Jesse Glick d051dc307c [JENKINS-60716] Retain causes of a LogRotator failure for diagnosis. 2020-01-09 15:06:04 -05:00
Félix Queiruga 6251151fff Separates vendor scripts 2020-01-09 18:32:32 +01:00
Félix Queiruga f88d1f8771 Migrates all JS code to webpack
- moves the fonts back to the war/src/main/webapp/css folder
2020-01-09 18:32:31 +01:00
Oleg Nenashev ad1ca7101b Merge pull request #4414 from jglick/WORKSPACE_TMP-JENKINS-60634
[JENKINS-60634] Define $WORKSPACE_TMP for (non-Pipeline) builds
2020-01-08 11:47:56 +01:00
Oleg Nenashev c059ccb0d8 Merge pull request #4418 from darxriggs/fix-typos
Fix typos & spelling in Javadoc and WebUI
2020-01-08 11:43:57 +01:00
Jesse Glick 0bd5d671d2 Merge pull request #4415 from jglick/enable-security-JENKINS-40228
[JENKINS-40228] Remove Enable Security checkbox in the Global Security configuration (follow-up)
2020-01-07 09:22:04 -05:00
René Scheibe 7a3699d3f4 Fix issues in properties files
- trailing spaces ` ` after backslash `\` for multi-line entries
- missing backslash `\` for multi-line entries
- missing escaping of the key/value separator colon `:` when used literally
- missing key/value separator `=`
- duplicate entries
- extra content without a key
2020-01-06 21:34:43 +01:00
René Scheibe a112c9741c Fix broken "blurb" entry in properties file
Add the original `blurb` entry back with the "slave" term changed to "agente".

Part of the entry was removed in commit 05a29896b3,
leaving an invalid multi-line entry behind.
2020-01-06 21:34:43 +01:00
René Scheibe 5aee00d32c Remove key without value from properties file
The errors 681-1023 are missing in this file.
2020-01-06 21:34:43 +01:00
René Scheibe 3e0134ddca Remove invalid properties file
It looks like left-behind from commit cf9034fe6e.
2020-01-06 21:34:43 +01:00
Jesse Glick f230462f15 #4254 incorrectly converted AntClassLoader.loadResource to a Java 5 for-loop. 2020-01-06 10:19:26 -05:00
René Scheibe f22d34675b Fix typos & spelling 2020-01-06 11:07:55 +01:00
Jesse Glick e6e8c387d5 Prevent endless recursion in SezpozModule.resolve. 2020-01-04 20:14:13 -05:00
Jesse Glick 5773970a64 Merge branch 'JENKINS-40228' of github.com:ksenia-nenasheva/jenkins into enable-security-JENKINS-40228 2020-01-04 11:27:26 -05:00
Oleg Nenashev 1f47ad6ea2 Merge pull request #4408 from StefanSpieker/spotbugs_switch
Fixed Spotbugs Switch related issues and added Suppresses
2020-01-04 14:16:19 +01:00
Oleg Nenashev 9640790fe1 Merge pull request #4413 from jglick/UpdateCenter.isSiteDataReady-JENKINS-60625
[JENKINS-60625] Prevent Jenkins page rendering from being blocked when the update center data parsing is in progress
2020-01-04 14:16:01 +01:00
StefanSpieker 0e6bb91864 Return error when invalid string is passed as a Run status CLI argument (#4212)
* removed redundnat null checks of nonnull values

* integrated suggestions

* removed local jenkins variable as suggested

* replaced null check with check for error object
2020-01-03 23:39:22 +01:00
Josh SorefandOleg Nenashev 9b8047acd1 IntelliJ/Java: Duplicate declaration -> AntClassLoader.getUrl (#4254)
* IntelliJ/Java: Duplicate declaration

AntClassLoader.getUrl

* Add missing import for annotation

* Switch from Vector to ArrayList<File>

* Drop inferable File

* Use for (File pathComponent : pathComponents) sugar

* Accept generic container type for getUrl

Co-Authored-By: Oleg Nenashev <o.v.nenashev@gmail.com>

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
2020-01-03 23:35:38 +01:00
Vincent Latombe dd59e8c11c [JENKINS-60449] Attempt to fix an odd case of OptionalExtension blowing up Jenkins (#4393)
* Add new module optional-depender and a new failing test

* Variant plugin is a dependency of optional-depender

Optional-depender contains the following class

@OptionalExtension(requirePlugins = {"dependee"})
public class OptionalDependerExtension {
      private static void foo(Dependee d) {

      }
}

* [JENKINS-60449] Move plugin initialization at the end, keep only one extension refresh

* Improve logic to detect classloading issues

Inspect all declared constructors/methods/fields recursively to exclude
failing classes from Guice rather than have Guice explode.

This also fix the failing test, but the previous commit is still better
because it avoids an extra Jenkins.get().refreshExtensions() call.

* Only test resolveClass method if the classloader is not the bootstrap one
2020-01-03 23:26:35 +01:00
Jesse GlickandDaniel Beck e621b6e0cd Be explicit that UpdateSite.hasUnparsedData is not intended as an API.
Co-Authored-By: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2020-01-03 16:49:04 -05:00
Jesse Glick 84f66e3c4e [JENKINS-60634] Define $WORKSPACE_TMP for (non-Pipeline) builds. 2020-01-03 14:57:53 -05:00
Jeff Thompson 50921ccbec Reduce JnlpSlaveAgentProtocol to minimum.
Remove anything unnecessary. Move SLAVE_SECRET to JnlpAgentReceiver
and alias it for existing usages.
2020-01-03 12:08:24 -07:00
Jeff Thompson bd0d9560dc Update to Remoting without protocols. 2020-01-03 11:06:06 -07:00
Jesse Glick 29fbc9c451 Quiet down log message about parsing JSON. (Though it is kind of interesting just how slow it is.) 2020-01-02 21:29:35 -05:00