Commit Graph
12987 Commits
Author SHA1 Message Date
Daniel Beck 3b2d0d2c78 As this is experimental, annotate with Restricted(Beta) 2020-02-14 19:59:03 +01:00
55b2bc7f3f [JEP-223] Overall/Manage permission
Co-Authored-By: Esther Alvarez Feijoo <ealvarez@cloudbees.com>
Co-Authored-By: aHenryJard <ajard@cloudbees.com>
Co-Authored-By: michael cirioli <mikecirioli@gmail.com>
2020-02-14 19:37:32 +01:00
Daniel Beck 5c9ba1428b Add extensible background build discarders (#4368) 2020-02-14 08:50:07 +00:00
James Nord d67c1b0247 allert-error does not exist, update javadoc to allert-danger 2020-02-13 17:03:45 +00:00
Tim Jacomb 2fcd831866 Merge pull request #3989 from olivergondza/afw-suppressed
Changed exception presented when AtomicFileWriter fails to write to file
2020-02-13 13:18:17 +00:00
Daniel Beck 7777d8f28b Do not show disabled permissions in permission errors (#4482) 2020-02-13 09:40:58 +01:00
Raihaan ShouhellandEvaristo Gutiérrez 9c4dac702e Add preauth filtering overload of getAllItems(), getItems() and allItems() (#4469)
* Add preauth filtering overload of getAllItems()

Signed-off-by: Raihaan Shouhell <raihaan.shouhell@autodesk.com>

* Add allItems filtering

* Apply suggestions from code review

Co-Authored-By: Evaristo Gutiérrez <egutierrez@cloudbees.com>

* Use streams

* Add stream functions

Signed-off-by: Raihaan Shouhell <raihaan.shouhell@autodesk.com>

* Missed simplification

Co-authored-by: Evaristo Gutiérrez <egutierrez@cloudbees.com>
2020-02-13 09:40:35 +01:00
Oliver Gondža 8b60510cb4 Clarify what exception gets propagated 2020-02-10 12:43:21 +01:00
Wadeck Follonier 2f51583c8b [JENKINS-60867] Prevent creation of duplicated SetupWizard singleton instances on Jenkins startup (#4456)
* [JENKINS-60867] Blank page after SetupWizard: root cause

* Correct a test that was a bit too greedy
2020-02-07 08:40:08 -05:00
Oleg Nenashev ce0923ccc8 Merge pull request #4474 from il--ya/patch-1
Enforce singleton pattern in CaseInsensitiveComparator
2020-02-07 03:56:03 -05:00
Zhao Xiaojie f51f5577cc Export whether plugin update is compatible (#4385)
* Export if plugin update is compatible

* Remove the erorr usage of Exported annoation

* Remove unclear export annotation
2020-02-07 03:54:34 -05:00
f10d9f95fc [JENKINS-60913] Remove network discovery services (#4460)
* Remove multicast discovery services.

* Refine clean up with DNSMultiCast.

Doesn't need to be referenced in the other pom any more.
We need to keep the class and the property around for a while.
Jenkins Test Harness sets the property. Until we can get all
versions aligned so it isn't needed, it's best to keep the property
doing nothing.

* Deprecate remaining class fragment.

* Remove unneeded dependency.

* Improve code comments for external usages.

Co-Authored-By: Jesse Glick <jglick@cloudbees.com>

* Remove multicast discovery services.

* Refine clean up with DNSMultiCast.

Doesn't need to be referenced in the other pom any more.
We need to keep the class and the property around for a while.
Jenkins Test Harness sets the property. Until we can get all
versions aligned so it isn't needed, it's best to keep the property
doing nothing.

* Deprecate remaining class fragment.

* Remove unneeded dependency.

* Add log warning messages.

* Don't need to implement the interface anymore.

* Fix initializer.

Change capitalization for logger.

* Add URLs to log messages.

Co-Authored-By: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2020-02-07 03:53:54 -05:00
Oleg Nenashev 820b64a6a6 Merge pull request #4473 from daniel-beck/JENKINS-21837
[JENKINS-21837] Do not record user creating an agent
2020-02-06 07:44:29 -05:00
Oleg Nenashev 57c51a3fb4 Merge pull request #4461 from pjdarton/jenkins-54496
[JENKINS-54496] - Don't log node-monitoring errors from deleted nodes
2020-02-06 07:41:01 -05:00
efe2b876a9 [JENKINS-51856] Add new milestones (#4450)
* [JENKINS-51856] Add new milestones

* Apply suggestions from code review

* [JENKINS-51856] Improve description of JOB_CONFIG_ADAPTED

* [JENKINS-51856] Add test for milestones

* [JENKINS-51856] Fix test error

* Apply suggestions from code review

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

* Update core/src/main/java/hudson/init/impl/GroovyInitScript.java

Co-Authored-By: Tim Jacomb <t.jacomb@kainos.com>

Co-authored-by: Oleg Nenashev <o.v.nenashev@gmail.com>
Co-authored-by: Tim Jacomb <t.jacomb@kainos.com>
2020-02-06 07:39:46 -05:00
Raihaan Shouhell 75e3565018 [JENKINS-60721] Annotate parameter classes (#4439)
* Annotate and fix Parameter functions

Signed-off-by: Raihaan Shouhell <raihaan.shouhell@autodesk.com>

* Add checkfornull annotation

* Add test for issue

Signed-off-by: Raihaan Shouhell <raihaan.shouhell@autodesk.com>

* Fix test

* Previous ctor was private d'oh

* Fix annotation

* Prevent parameter names from being null

* Add comment about check
2020-02-06 07:38:53 -05:00
Jeff ThompsonandWadeck Follonier b0eee6d655 [JENKINS-60848] Improve RSS title wording + Add more RSS tests (#4442)
* Add more tests.

Also a little cleanup of RSS.
Fix the broken "All all ..." title and description.
Remove a long unused bit for never implemented trackback.

* Increase date time checks.

* Copy and paste error.

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

* Assert not empty.

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

* Add a bunch more tests and clarify title.

Add a number of more tests. Test the various places that RSS is used.
Improve title wording to something consistent and somewhat sensible.

Co-authored-by: Wadeck Follonier <Wadeck@users.noreply.github.com>
2020-02-06 07:38:31 -05:00
Oleg Nenashev 6c9271f49e Merge pull request #4458 from StefanSpieker/spotbugs_nullable
Spotbugs: Check for null issue
2020-02-06 07:36:32 -05:00
Raihaan Shouhell f16c36bd6d Reduce number of calls to getItems in ListView (#4462)
* Call parent.getItems once

* Restore check in includeItems

* Restore original call to getItems
2020-02-06 04:48:21 -05:00
Oleg Nenashev a0da4a8fd0 Merge pull request #4459 from thomasgl-orange/buffered-streams-in-TarCompression-NONE
[JENKINS-60907] add Buffered{In,Out}putStream to FilePath.TarCompression.NONE
2020-02-06 04:44:02 -05:00
Daniel Beck 9e39d578c2 [JENKINS-21837] Do not record user creating an agent 2020-02-05 19:29:47 +01:00
Wadeck Follonier d7869ec724 Improve log after SECURITY-626 (#4443) 2020-02-05 12:22:00 -05:00
Ilya 1eb4b56db0 Enforce singleton pattern in CaseInsensitiveComparator
Make sure that new instances of CaseInsensitiveComparator are not created when serializing/deserializing.
2020-02-05 16:28:38 +00:00
Aaron ZurawskiandZbynek Konecny 23d5cf97cf [JENKINS-60884] - Fix NPE in Run API when using getPreviousBuildsOverThreshold (#4471)
* Added a null check to getPreviousBuildsOverThreshold.

* Cleaned up accidental newline.

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

Co-Authored-By: Zbynek Konecny <zbynek1729@gmail.com>

Co-authored-by: Zbynek Konecny <zbynek1729@gmail.com>
2020-02-05 07:09:58 -05:00
Peter Darton ee3d936dc7 FIX JENKINS-54496: Don't log monitoring errors from deleted nodes 2020-01-30 13:35:18 +00:00
Thomas de Grenier de Latour 4be9f741c1 Buffered{In,Out}putStream in FilePath.TarCompression.NONE 2020-01-29 17:38:49 +01:00
Stefan Spieker 403bb2ee44 check for null 2020-01-28 21:40:35 +01:00
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