Commit Graph
14509 Commits
Author SHA1 Message Date
Jesse Glick 1892e21472 Job.BuildNumberAssigner (#9846)
* `Job.BuildNumberAssigner`

* Clearer API for `saveNextBuildNumber` https://github.com/jenkinsci/jenkins/pull/9846#discussion_r1792991572
2024-11-02 07:25:16 -06:00
Jesse Glick 5db2f0139c Avoid saving nextBuildNumber while loading Job (#9778) 2024-11-02 07:25:07 -06:00
github-actions[bot]andtimja 87cfc46068 Fill in since annotations (#9927)
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2024-11-01 13:34:56 +00:00
Vincent Latombe 97e1009673 When calling Nodes#setNodes, NodeListener methods should be called as required (#9905)
* When calling Nodes#setNodes, NodeListener methods should be called as required

For example, when loading a new casc configuration, it calls Nodes#setNodes, and the NodeListener methods were not called, causing listener implementations not to be notified according to the new state.

* Fix reviews
2024-10-25 15:32:29 -06:00
Allan Burdajewicz 9e256de2d1 [JENKINS-73845] Fix OperatingSystemEndOfLifeAdminMonitor endOfLifeDate displayed on first warning day (#9908)
* [JENKINS-73845] Fix OperatingSystemEndOfLifeAdminMonitor endOfLifeDate displayed on first warning day

* [JENKINS-73845] Add test

* [JENKINS-73845] Improve test
2024-10-25 15:31:35 -06:00
Jesse Glick 7a1630235f Removing configurability of Jenkins.agentProtocols (#9903) 2024-10-24 18:41:45 +01:00
github-actions[bot]andtimja 1f7b6a8f0e Fill in since annotations (#9910)
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2024-10-24 18:38:16 +01:00
Vincent Latombe d9fbb65e98 Display appropriate GUI that accurately displays offline by design (#9883) 2024-10-23 09:04:54 +01:00
Basil Crow 6c5cdfa96c Allow for null to be passed to doSafeRestart (#9882) 2024-10-21 19:37:27 +01:00
5f7026dd03 [JENKINS-71728] Add CSP compatible version of FormApply#applyResponse (#8351)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
Co-authored-by: Yaroslav Afenkin <yaroslavafenkin@users.noreply.github.com>
Co-authored-by: Alexander Brandes <brandes.alexander@web.de>
Co-authored-by: Basil Crow <me@basilcrow.com>
2024-10-21 19:36:27 +01:00
Daniel BeckandDaniel Beck 2c92eae462 [JENKINS-73768] Handle base=derived case in Util#isOverridden (#9728)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-10-21 19:35:37 +01:00
Vincent Latombe e8360278e2 Print Jenkins version on boot (#9878) 2024-10-20 09:24:52 +01:00
Vincent LatombeandJesse Glick b50cf513c1 [JENKINS-30101][JENKINS-30175] Simplify persistence design for temporarily offline status (#9855)
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2024-10-15 16:32:02 +01:00
Vincent LatombeandTim Jacomb fe80df5c51 Create a new taglib to capture the save/apply bottom bar (#9813)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2024-10-14 19:23:01 +01:00
github-actions[bot]andtimja 829be14884 Fill in since annotations (#9849)
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2024-10-12 06:06:31 -06:00
Devin Nusbaum d34b17ee4b [JENKINS-73835] Do not allow builds to be deleted while they are still running and ensure build discarders run after builds are fully complete (#9810)
* [JENKINS-73835] Do not allow builds to be deleted while they are still running

* [JENKINS-73835] Avoid redundant calls to Job.logRotate when builds complete and always call Job.logRotate after build finalization

* [JENKINS-73835] Add issue reference to RunTest.buildsMayNotBeDeletedWhileRunning

* [JENKINS-73835] Adjust DeleteBuildsCommandTest.deleteBuildsShouldSuccessEvenTheBuildIsRunning to match new behavior

* [JENKINS-73835] Run/delete.jelly should check Run.isLogUpdated, not Run.isBuilding
2024-10-12 06:06:18 -06:00
Devin Nusbaum 6651e8531e [JENKINS-63343] Validate element types for collections and maps when deserializing XML files (#9727)
* [JENKINS-63343] Validate element types in RobustCollectionConverter in some cases

* [JENKINS-63343] Also validate keys and values in map entries

* [JENKINS-63343] Improve OldDataMonitor error messages and update tests

* [JENKINS-63343] Also handle implicit collection with unspecified element types

* [JENKINS-63343] Spotless

* [JENKINS-63343] Avoid rawtypes

* [JENKINS-63343] Add tests for rawtypes

* [JENKINS-63343] Adjust Javadoc for clarity

* [JENKINS-63343] Avoid ClassCastException and check handling of null in tests

* [JENKINS-63343] Fix Javadoc link by adding import

* [JENKINS-63343] List.of cannot be used with null values
2024-10-11 14:42:38 -04:00
Devin Nusbaum 4d7b993c5b [JENKINS-73824] Wait for Pipeline builds to complete before allowing their jobs to be deleted (#9790)
* Wait for Pipelines to complete before allowing their jobs to be deleted

* Create mock Job/Run classes that use AsynchronousExecution to be able to add a regression test in core

* [JENKINS-73824] Do not repeatedly interrupt executables in ItemDeletion.cancelBuildsInProgress

* [JENKINS-73824] Delete ItemDeletionTest based on https://github.com/jenkinsci/jenkins/pull/9790#discussion_r1777727008
2024-10-06 14:41:02 -06:00
Basil Crow 77c3d7ac84 [JENKINS-73838] Compatibility for Jenkins#doSafeRestart(StaplerRequest, String) (#9797) 2024-10-04 09:59:10 -07:00
github-actions[bot]andtimja edd84f7ca7 Fill in since annotations (#9820)
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2024-10-03 09:10:53 -07:00
Basil Crow 1c2b84cb76 [JENKINS-73801] Nested Views plugin overrides View#doConfigDotXml(StaplerRequest) (#9764) 2024-10-02 08:47:16 -06:00
Basil Crow 47a212aa79 [JENKINS-73760] Updates fail due to invalid JSON from HTTP Update Center (#9760) 2024-10-02 08:46:51 -06:00
Vincent Latombe 39e6622524 Extract interfaces for objects to be used through the executors widget (#9749)
* Extract interfaces for objects to be used through the executors widget

This is required for CloudBees CI HA support: we provide alternate implementations of these interfaces to represent computers and related objects that exist in different physical replicas of the same logical instance. This allows to be build an aggregated view of computers and executors, some local, some remote.

* Fix Deprecated annotation

* Missing @Override annotations

* Missing @since TODO

* No longer true according to AbstractSubTask javadoc

* Restore old signature for compatibility

* Fix reviews

* Javadoc

* Typo

* Fix inconsistency between hasOfflineCause and getOfflineCauseReason

* Remove default implementation of ITask#getUrl

* Provide default impl in SubTask for compatibility

* Mark as CheckForNull

* Spotbugs

* ComputerSet#getComputers returns a collection that is sorted by name

* Missing Override

* Move permission declaration to the right place, closer to usage
2024-10-02 08:46:21 -06:00
Vincent Latombe a6f723cef7 Introduce SaveableListener#onDeleted (#9743)
* Introduce SaveableListener#onDeleted

Usually `Saveable` objects are written, but it can happen on occasion that they get deleted, and it wasn't generating an event for every case.

This provides a more fine-grained event that can be handled by implemented listeners.

In my case, I have a use case in CloudBees CI where I need to clear a cache entry when a Saveable gets deleted from disk.

* Spotless

* Explicitly test that the user that has performed the change can be obtained from the Saveable listener.
2024-10-02 08:45:44 -06:00
7a1c2ce67a [JENKINS-60866][JENKINS-71515] Use JSON#parse to process codemirror-config argument (#6867)
* [JENKINS-60866] Use JSON#parse to process codemirror-config argument

* Add backward compatibility for most common setting

* Integrate fixed antisamy-markup-formatter to pass test

* Fix JS and revert unnecessary antisamy-markup-formatter update

How do we have a billion different linters and not one did tell me
I'm redefining a variable?

* Remove comment

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
2024-10-02 08:44:18 -06:00
Daniel Beck dfd7a9c48b [SECURITY-3373] 2024-09-25 07:59:32 +00:00
Kevin-CB cd242d9ed4 [SECURITY-3448] 2024-09-25 07:59:21 +00:00
github-actions[bot]andtimja 32039daa66 Fill in since annotations (#9758)
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2024-09-19 10:30:19 -07:00
Vincent LatombeandJesse Glick f9fef613ce Clean up a few plain e.printStackTrace() calls (#9742)
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2024-09-19 09:47:42 +01:00
Daniel BeckandDaniel Beck de25478f3f [JENKINS-73785] Restore ContextMenu#from with StaplerRequest/Response args (#9737)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-09-16 18:36:50 -07:00
Jan FaracikandTim Jacomb 2d2adefabd Refine content and appearance of the user account screen (#9521)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2024-09-16 13:38:47 +01:00
github-actions[bot]andtimja be3d711d69 Fill in since annotations (#9721)
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2024-09-13 16:21:38 -06:00
Devin Nusbaum dab6597416 [JENKINS-73687] Make deserialization of Map fields in XML files more robust (#9653)
* Improve resilience against malformed XML files during deserialization

* Improve error message
2024-09-13 16:21:22 -06:00
Vincent LatombeandJesse Glick 35d767790f Introduce HistoricalBuild interface (#9674)
* Introduce HistoricalBuild interface

This allows to display Run-like objects in build history without having concrete Run present in the Jenkins instance.

* Remove BuildHistoryWidget#entries.jelly

* JDK17 level

Co-authored-by: Jesse Glick <jglick@cloudbees.com>

---------

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2024-09-10 20:32:36 -06:00
Basil Crow 85d6358c32 Compatibility for ChainedServletFilter (#9696) 2024-09-09 16:14:48 +01:00
Markus WinterandKris Stern 2431b7c9b3 [JENKINS-72988] validate displayname against items in the same ItemGroup (#9152)
Co-authored-by: Kris Stern <krisstern@outlook.com>
2024-09-09 16:13:20 +01:00
Vincent Latombe bfcb8741d8 Merge pull request #9645 from Vlatombe/with-console-url 2024-09-09 16:57:03 +02:00
Vincent Latombe b56e5d796a Merge pull request #9673 from Vlatombe/computerListener.onIdle 2024-09-09 11:21:50 +02:00
Vincent Latombe 2f6d77c70f Merge branch 'master' into with-console-url 2024-09-04 10:48:53 +02:00
7006cded64 [JENKINS-73278] Migrate core from EE 8 to EE 9 (#9672)
Co-authored-by: Kevin Guerroudj <91883215+Kevin-CB@users.noreply.github.com>
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2024-09-03 14:59:04 -07:00
Allan BurdajewiczandDaniel Beck 5fe9a44805 [JENKINS-73422] Add escape hatch for Authenticated user access to Resource URL (#9644)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2024-08-30 14:26:27 +01:00
Kris SternandDaniel Beck a075ffb583 Add doCheckDisplayNameOrNull to jenkins core (#9150)
Co-authored-by: Daniel Beck <1831569+daniel-beck@users.noreply.github.com>
2024-08-30 14:25:58 +01:00
Vincent Latombe 6b88bfcbd5 Spotless 2024-08-28 16:22:14 +02:00
Vincent Latombe ed93ad020a Revert "Call listener synchronously, but outside synchronized"
This reverts commit 75242cf030.
2024-08-28 16:12:09 +02:00
Vincent Latombe 75242cf030 Call listener synchronously, but outside synchronized 2024-08-28 15:47:51 +02:00
Vincent Latombe 9823b8ed7e Execute ComputerListener#onIdle in another thread. 2024-08-28 15:40:43 +02:00
Vincent Latombe 64667af499 Implement ComputerListener#onIdle
Introduces a new computer listener fired whenever a Computer becomes idle.
2024-08-28 09:54:25 +02:00
Vincent LatombeandJesse Glick 5df30de435 Add -webSocket option by default when creating an inbound agent (#9665)
* Add -webSocket option by default when creating an inbound agent

* Update core/src/main/resources/hudson/slaves/JNLPLauncher/main.properties

Co-authored-by: Jesse Glick <jglick@cloudbees.com>

---------

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2024-08-27 19:22:38 -06:00
Jesse Glick f84ab6aae1 [JENKINS-73692] Turn off logging from BackgroundGlobalBuildDiscarder (#9663)
Turn off logging from `BackgroundGlobalBuildDiscarder`
2024-08-27 19:22:12 -06:00
Daniel BeckandDaniel Beck ffdd5be9a3 Fix error message when creation of item by type is prohibited (#9662)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-08-26 17:43:31 -06:00