Commit Graph
12959 Commits
Author SHA1 Message Date
Jeff Thompson c365300f99 Merge branch 'master' into security-master 2020-01-27 13:36:19 -07:00
Oleg Nenashev 49b787f3ab Merge pull request #4436 from daniel-beck/disabled-api
Add a disabled status to the REST API for AbstractProject job types
2020-01-24 21:32:23 +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
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
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
Wadeck Follonier 574ec6e5bd Merge branch 'master' into security-master 2020-01-20 14:55:10 +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
Daniel Beck 68b2b4df7f Add a job's disabled status to the REST API output 2020-01-17 14:04:32 +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
Wadeck Follonier 8263b0ae48 Merge branch 'security-stable-2.204' into security-master 2020-01-14 14:56:56 +01:00
Wadeck Follonier a293a77a77 Merge branch 'security-stable-2.190' into security-stable-2.204 2020-01-14 14:51:25 +01:00
Wadeck Follonier b11f08686e Merge branch 'security-stable-2.176' into security-stable-2.190 2020-01-14 14:31:54 +01:00
Wadeck Follonier bb3d46d018 Merge branch 'security-stable-2.164' into security-stable-2.176 2020-01-14 13:58:13 +01:00
Wadeck Follonier 77f36f37f5 [SECURITY-1695][SECURITY-1697] 2020-01-14 12:21:45 +01:00
Jeff Thompson 5054bc6e12 [SECURITY-1682] 2020-01-14 12:16:59 +01:00
Jeff Thompson 6f35dbb939 [SECURITY-1660] 2020-01-14 12:15:51 +01:00
Daniel Beck 7d44836fad [SECURITY-1650] 2020-01-14 12:08:50 +01:00
Wadeck Follonier 639ade55ca [SECURITY-1704] 2020-01-14 12:08:10 +01:00
Wadeck Follonier cd28a6d934 [SECURITY-1641] 2020-01-14 12:06:40 +01:00
Daniel Beck c0d3c041b4 [SECURITY-1291] 2020-01-14 11:41:23 +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
Matt Sicker 47f9a94794 [JENKINS-59107] User is no longer logged out when authenticating another user
This fixes a regression introduced in SECURITY-901 where performing an authentication check on another user while logged in caused the user to get logged out.

Signed-off-by: Matt Sicker <boards@gmail.com>
(cherry picked from commit d5b716625c)
2020-01-13 19:45:54 +01:00
James Nord 5bc53da058 [JENKINS-60351] - Make it possible to disable multiple deletion attempts by setting hudson.Util.maxFileDeletionRetries to zero (#4382)
* [JENKINS-60351] It should be possible to disable a retry of the
PathRemover

This does not address the issues that the comments and code in
hudons.Util are inconsistent if they are for retries or total number of
attempts (they are currently total number of attempts)

* [JENKINS-60351] Make the code conform to the documentation

maxRetries should control the number of retries not the number of
attempts.

* rename field from DELETION_MAX to DELETION_RETRIES

(cherry picked from commit 7228af5bb1)
2020-01-13 19:42:45 +01:00
Baptiste Mathus cae20e7613 Merge pull request #4329 from lgoenner/executor
[JENKINS-57304] - Add call to oneOffExecutors.remove in Computer.removeExecutor

(cherry picked from commit cb424f3ca0)
2020-01-13 19:36:22 +01:00
Oleg Nenashev e29e3635c0 Merge pull request #4357 from bulanovk/JENKINS-60167
[JENKINS-60167] - Fix AtomicFileWriter performance issue on CephFS in case of Empty File creation

(cherry picked from commit cce9587639)
2020-01-13 19:34:13 +01:00
Oleg Nenashev 03214978a3 Merge pull request #4348 from pilou-/handle_empty_views
[JENKINS-60092] getPrimaryView: return null if no view is defined

(cherry picked from commit 8bc435f32e)
2020-01-13 19:08:52 +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
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
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
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
Jesse Glick d051dc307c [JENKINS-60716] Retain causes of a LogRotator failure for diagnosis. 2020-01-09 15:06:04 -05: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
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