Compare commits

...

261 Commits

Author SHA1 Message Date
Jan Faracik 320a149f76
Refine Changes for the experimental Run UI (#11277)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-11-12 15:27:01 +00:00
renovate[bot] d8f229853a
Update Node.js to v24.11.1 (#11287)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-11 19:51:24 -07:00
renovate[bot] a6e8edc1d4
Update dependency com.puppycrawl.tools:checkstyle to v12.1.2 (#11286)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-11 19:51:06 -07:00
Mark Waite 205849e0f6
Skip spotless in release:prepare (#11285)
The weekly release of Jenkins 2.536 failed its initial build because Maven
release plugin 3.2.0 behaves differently than Maven release plugin 3.1.1.
For 2.535, we were using Maven release plugin 3.1.1 and it did not require
that we skip spotless verification during the `release:prepare` phase.
Maven release plugin 3.2.0 requires it.

Will allow the temporary change to be reverted from pull request:

* https://github.com/jenkins-infra/release/pull/782

Special thanks to @jglick for noting the better way to resolve the issue.

Testing done:

* Confirmed that builds fail without this change when running

  `mvn -B -V -ntp release:prepare`

* Confirmed that builds pass with this change when running

  `mvn -B -V -ntp release:prepare`
2025-11-11 16:48:50 -07:00
Jenkins Release Bot 8f1bf5be69 [maven-release-plugin] prepare for next development iteration 2025-11-11 16:33:16 +00:00
Jenkins Release Bot 005a604d75 [maven-release-plugin] prepare release jenkins-2.536 2025-11-11 16:33:06 +00:00
renovate[bot] 7bc93683f6
Update jenkins/ath Docker tag to v6446 (#11284)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-11 12:00:18 +00:00
Jan Faracik 8002bc9b4b
Redesign the reorderable list component (#10186)
Co-authored-by: Kris Stern <krisstern@outlook.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-11-11 10:39:51 +00:00
Ullrich Hafner c3b06d5f64
[JENKINS-75892] Set the default enter delay for tooltips to 250ms (#10948) 2025-11-11 08:03:22 +00:00
Jan Faracik 0ea42364a2
Fix the ordering and visibility of experimental Run UI tabs (#11236)
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
2025-11-11 08:03:15 +00:00
renovate[bot] 0166c65acf
Update Yarn to v4.11.0 (#11281)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-11 08:02:54 +00:00
Tim Jacomb 0f9e1ff1f9
Suppress new spotbugs warning (#11283)
* Suppress new spotbugs warning

* Fix checkstyle warning

---------

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-11-10 13:57:19 -07:00
Alexander Brandes cb88428113
Test on ATH 21 (#11274) 2025-11-10 19:43:39 +00:00
Ranjit C f9b41033b9
Revert display:flex added to pane-header (#11272)
Co-authored-by: Jan Faracik <43062514+janfaracik@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1+github@gmail.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-11-10 14:13:14 +00:00
renovate[bot] e72d483d46
Update dependency org.jenkins-ci:jenkins to v1.142 (#11280)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 14:12:45 +00:00
Guruprasad Bhat b251733b22
Log thread dump when health check exceeds 10s (#11266) 2025-11-10 11:08:14 +00:00
Yen Cheng Lin 313c6ff590
[JENKINS-75990] Use the same styling for title bar mouse over effect (#11016) 2025-11-10 11:08:08 +00:00
Kevin Guerroudj 25b40a5a0f
[JENKINS-76275] Restore file fingerprint and project relationship actions to views (#11275) 2025-11-10 11:07:34 +00:00
renovate[bot] d6f1414720
Update softprops/action-gh-release action to v2.4.2 (#11279)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-10 11:06:39 +00:00
renovate[bot] e5dd70c57b
Update dependency commons-codec:commons-codec to v1.20.0 (#11271)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 12:50:47 +01:00
renovate[bot] c41456f3a8
Update dependency com.puppycrawl.tools:checkstyle to v12.1.1 (#11241)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 11:19:48 +00:00
renovate[bot] 683acc9b43
Update eslint monorepo to v9.39.1 (#11273)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 11:19:37 +00:00
renovate[bot] 2ef5e40f34
Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.1073.va_7888eb_dd514 (#11270)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-07 11:19:32 +00:00
Daniel Beck b3f1b8636b
Extend the CSP compatibility rule to cover more than JS (#11259)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-11-06 13:50:53 +01:00
renovate[bot] f66e6167ee
Update dependency globals to v16.5.0 (#11265)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-05 14:17:38 +01:00
renovate[bot] 1b3ff8fd10
Update dependency org.jenkins-ci:winstone to v8.17 (#11268)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-05 12:48:55 +00:00
renovate[bot] 18741c1bf0
Update jenkins/ath Docker tag to v6433 (#11267)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-05 12:48:48 +00:00
Jenkins Release Bot 1b38672f11 [maven-release-plugin] prepare for next development iteration
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-11-04 12:31:48 +00:00
Jenkins Release Bot 81955b21ef [maven-release-plugin] prepare release jenkins-2.535 2025-11-04 12:31:36 +00:00
renovate[bot] 68adafca38
Update jenkins/ath Docker tag to v6427 (#11255)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 07:54:08 +00:00
renovate[bot] d64432c154
Update actions/setup-java digest to de5a937 (#11246)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 07:53:47 +00:00
renovate[bot] 53cca2985b
Update Node.js to v24.11.0 (#11248)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 07:53:37 +00:00
renovate[bot] c54c0b76d4
Update dependency sass to v1.93.3 (#11262)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 07:53:21 +00:00
github-actions[bot] ea15e70e82
Fill in since annotations (#11251)
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2025-11-04 07:53:08 +00:00
renovate[bot] 41250abff7
Update eslint monorepo to v9.39.0 (#11263)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 07:52:46 +00:00
renovate[bot] 96424407fd
Update dependency io.jenkins.plugins:caffeine-api to v3.2.3-194.v31a_b_f7a_b_5a_81 (#11264)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-04 07:52:31 +00:00
strangelookingnerd 0d5c550028
[JENKINS-76192] Ignore NoSuchFileException in FilePath#unzip (#11186) 2025-11-04 07:52:04 +00:00
Jan Faracik 17abe4f60b
Refine badges in Jenkins (#11254)
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-11-04 07:51:20 +00:00
Daniel Beck 45c28429d2
Move CSS `mask-image` from inline `data:` to files (#11258)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-11-04 07:51:15 +00:00
Jakob Ackermann 9f8423c324
Only animate search icon spinner when visible (#11257) 2025-11-04 07:51:08 +00:00
Adrien Lecharpentier e36b9e5dd0
[JENKINS-76260] Get UserExperimentalFlag default value from system property (#11261)
Co-authored-by: James Nord <jtnord@users.noreply.github.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-11-04 07:51:02 +00:00
renovate[bot] bf6b0fa790
Update dependency org.jenkins-ci.plugins:jackson2-api to v2.20.1-423.v13951f6b_6532 (#11260)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-03 21:19:22 +00:00
renovate[bot] 0d022fcb57
Update dependency org.jenkins-ci.plugins:script-security to v1385 (#11247)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-11-03 21:19:15 +00:00
renovate[bot] ecd3f883b0
Update dependency org.jenkins-ci.main:jenkins-test-harness to v2520 (#11256)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-11-01 17:03:08 +00:00
Guruprasad Bhat 0dd8222cc7
Load CasC items.yaml after SYSTEM_CONFIG_ADAPTED (#11234)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-10-31 22:16:34 +00:00
Amritanshu Darbari b42d07badf
[JENKINS-76118] Fix toggle collapse race condition in Chrome (#11115)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-31 22:16:14 +00:00
Jan Faracik d23ae16fd5
Fix MyViewsProperty condition (#11252) 2025-10-31 22:16:01 +00:00
Jan Faracik c24d34eba6
Remove node configuration from Manage Jenkins' System page (#11224)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
2025-10-30 12:21:28 +00:00
Jenkins Release Bot f9a3156b4c [maven-release-plugin] prepare for next development iteration
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-28 12:29:21 +00:00
Jenkins Release Bot 0d151b8fd9 [maven-release-plugin] prepare release jenkins-2.534 2025-10-28 12:29:12 +00:00
renovate[bot] 5dec84577c
Update dependency org.jenkins-ci.plugins.workflow:workflow-api to v1398 (#11230)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 08:54:53 +00:00
renovate[bot] 23c6d1b513
Update dependency io.jenkins.plugins:snakeyaml-api to v2.5-143.v93b_c004f89de (#11244)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 08:54:42 +00:00
renovate[bot] e0a3087426
Update jenkins/ath Docker tag to v6412 (#11245)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-27 08:54:22 +00:00
Jan Faracik 8c385f4cc0
Add experimental dashboard UI (#11208)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-26 22:14:53 +00:00
renovate[bot] 68b2695a90
Update babel monorepo to v7.28.5 (#11242)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 22:25:34 +01:00
renovate[bot] bc7ffb8376
Update dependency sass-loader to v16.0.6 (#11243)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 22:25:23 +01:00
renovate[bot] 4b08357516
Update dependency eslint-formatter-checkstyle to v9 (#11240)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 17:04:24 +01:00
Jakob Ackermann 4702ffe219
Stream HTML console log (#11177)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-26 16:06:18 +01:00
renovate[bot] 0d5f528442
Update jenkins/ath Docker tag to v6408 (#11238)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-26 16:05:19 +01:00
renovate[bot] 72a04cb3a4
Update actions/upload-artifact action to v5 (#11237)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2025-10-26 16:05:06 +01:00
renovate[bot] e2dd0466ce
Update dependency org.xmlunit:xmlunit-bom to v2.11.0 (#11235)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-10-25 14:00:16 -06:00
renovate[bot] 84db49f22a
Update dependency org.jenkins-ci.main:jenkins-test-harness to v2516 (#11232)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-24 09:36:26 -06:00
Jesse Glick c4e4ae7635
Clearer documentation for `ExtensionPoint` (#11223) 2025-10-24 09:29:50 -06:00
Adrien Lecharpentier 7e6c5740ec
Enable Java 25 support (#11148)
* Bump winstone to get Jetty 12.1.1

* Accept to start Jenkins with Java 25

* Build with Java 25

* Remove inaccurate javadoc that includes an incorrect link

The Javadoc comment said:

> When executing the resulting Callable, it executes
> FileCallable#act(FileCallable) on this FilePath.

The FileCallable interface does not have an `act(FileCallable)` method.
That absence causes the Javadoc generation to fail on Java 25.

There is a `FilePath.act(FileCallable)` method that could be inserted
instead, but I'm not confident the comment would then be correct.

Testing done:

Confirmed that Javadoc generation fails on Java 25 without this change.

Confirmed that Javadoc generation passes on Java 25 with this change.

(cherry picked from commit 3fdf9c18db)

* Temporary fix for javadoc build

* Bump winstone to 8.14

* Update Jenkinsfile

---------

Co-authored-by: Bruno Verachten <gounthar@gmail.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-24 09:29:31 -06:00
Jesse Glick ba22ac42b4
Introduce `ThrowingRunnable` and `ThrowingCallable` (#11037)
* Introduce `ThrowingRunnable` and `ThrowingCallable`

* Minimize diff

* Minimize diff

* Deprecate `NotReallyRoleSensitiveCallable` https://github.com/jenkinsci/jenkins/pull/11037#discussion_r2323626187

* CheckStyle

---------

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-10-24 09:29:03 -06:00
renovate[bot] 45766b3404
Update stapler.version to v2050 (major) (#11221)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Update stapler.version to v2050

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-23 20:02:39 +01:00
Jesse Glick a65d8b549e
Ignore #6149 for purposes of `git blame` (#11228)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-22 20:51:01 -06:00
Jan Faracik 903fcc9ad0
Support images in card teasers (#11227)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-22 16:05:52 +01:00
Jenkins Release Bot d582839cdb [maven-release-plugin] prepare for next development iteration
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-21 16:57:08 +00:00
Jenkins Release Bot 7e7093c153 [maven-release-plugin] prepare release jenkins-2.533 2025-10-21 16:56:57 +00:00
Jan Faracik d107c1c69e
Make Tab object transient (#11219)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-21 07:52:18 +01:00
Jesse Glick e015b5eda5
Clarifying that `PluginServletFilter` is not in fact an `ExtensionPoint` (#11210)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-20 19:25:57 -06:00
renovate[bot] 5176dd16ca
Update dependency org.jenkins-ci.plugins:ant to v520 (#11205)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 19:24:40 -06:00
renovate[bot] 62b80a158f
Update eslint monorepo to v9.38.0 (#11218)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 19:24:28 -06:00
renovate[bot] 1dcfcea225
Update dependency org.jacoco:jacoco-maven-plugin to v0.8.14 (#11198)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 19:24:16 -06:00
renovate[bot] 01b479367c
Update dependency org.springframework.security:spring-security-bom to v6.5.6 (#11217)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 19:24:05 -06:00
renovate[bot] 11fdff7b54
Update Winstone and Jetty (#11200)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-20 19:23:54 -06:00
renovate[bot] 96acb6d8bc
Update dependency org.jenkins-ci.plugins.workflow:workflow-support to v1004 (#11214)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-19 21:37:39 +01:00
renovate[bot] d1faf70731
Update dependency com.puppycrawl.tools:checkstyle to v12.1.0 (#11215)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-19 21:37:25 +01:00
Jan Faracik d334644dba
Refine cards UI (#11192)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-18 21:01:09 +01:00
renovate[bot] c97fecc7ec
Update dependency org.jenkins-ci.plugins:jackson2-api to v2.20.0-420.v8a_08b_d57ca_05 (#11162)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-10-17 10:37:04 +01:00
renovate[bot] bb7d0b5cfb
Update dependency org.springframework:spring-framework-bom to v6.2.12 (#11209)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-17 10:36:53 +01:00
Jan Faracik a2146f3c41
Add experimental job page UI (#11194)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-16 22:56:10 +01:00
github-actions[bot] 2b583fb069
Fill in since annotations (#11212)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2025-10-16 20:59:27 +02:00
Markus Winter c9eaa5d7aa
[JENKINS-76202] Avoid stack overflow when new run UI is enabled (#11203)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-16 09:21:22 +01:00
Jesse Glick 389e3df894
Deprecating `Extension.optional` (#11201) 2025-10-16 09:17:03 +01:00
Jenkins Release Bot c44796db12 [maven-release-plugin] prepare for next development iteration
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
2025-10-14 12:27:15 +00:00
Jenkins Release Bot f9c7d00177 [maven-release-plugin] prepare release jenkins-2.532 2025-10-14 12:27:04 +00:00
renovate[bot] 8fcb74485f
Update softprops/action-gh-release action to v2.4.1 (#11195)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-13 15:55:33 +02:00
renovate[bot] 64dd8907c6
Update dependency com.puppycrawl.tools:checkstyle to v12.0.1 (#11196)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-13 15:55:18 +02:00
Tim Jacomb f32456d72d
Revert winstone update (#11197)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
2025-10-12 08:21:35 +01:00
renovate[bot] 66ee5c2c62
Update dependency webpack to v5.102.1 (#11188)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-11 11:13:52 +02:00
renovate[bot] d309bd67ac
Update jenkins/ath Docker tag to v6388 (#11191)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-11 11:13:39 +02:00
Alexander Brandes e8c5532a9b
Downgrade Node.js due to missing darwin files (#11190) 2025-10-11 11:13:24 +02:00
Jakob Ackermann adacec0947
Add new LargeText interface based constructor for AnnotatedLargeText (#11071)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-10 22:31:36 +01:00
Vincent Latombe 5dd67bec8b
Disable cron-based retention strategy check and log when it is called (#11185)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-10 17:05:23 +01:00
Vincent Latombe e45c6140b8
A `CauseOfBlockage` can be fatal (#11173)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2025-10-10 15:47:37 +01:00
renovate[bot] fa233a1ba0
Update dependency com.puppycrawl.tools:checkstyle to v12 (#11184)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-10-10 10:27:36 +01:00
renovate[bot] 5748da5ecb
Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.1062.v2877b_d6b_b_eeb_ (#11163)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 09:23:14 +01:00
Markus Winter 1e3b70a999
Change `required` input validator to not accept whitespace only (#11143)
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-10-10 09:23:07 +01:00
renovate[bot] 22b0b8dc85
Update Winstone and Jetty (#10988)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-10 07:49:12 +01:00
Jan Faracik 893c4b52b8
Add support for tabs for the experimental run page (#11141)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Tim Jacomb <timjacomb1@gmail.com>
2025-10-09 22:48:14 +01:00
renovate[bot] e69069b052
Update dependency org.jenkins-ci.plugins:matrix-project to v870 (#11182)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-10-09 18:21:39 +02:00
renovate[bot] 93c17b07a4
Update Node.js to v24.10.0 (#11181)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-09 18:21:19 +02:00
renovate[bot] dc8ee385e0
Update dependency io.jenkins.plugins:font-awesome-api to v7.1.0-882.v1dfb_771e3278 (#11179)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-09 18:20:44 +02:00
renovate[bot] 17cb4ea041
Update actions/setup-java digest to ead9eaa (#11171)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-09 14:25:33 +01:00
renovate[bot] e11322769a
Update stapler.version to v2045 (major) (#11183)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-09 14:22:35 +01:00
Stefan Spieker 96584c3d5a
Removed deprecated and unused `FormFieldValidator.NonNegativeInteger` (#11176) 2025-10-09 09:03:02 +01:00
Vivian Rook 8e3e7421a9
Fix renovate.json structure (#11178)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
A block was removed from the json in cb6bc5b1d2 it was the last in a series, which left an extra , at the end, causing json to get confused.

Signed-off-by: Vivian Rook <vivian.rook@chainguard.dev>
2025-10-08 13:35:59 +02:00
Mark Waite be407f2119
Sanitize launchable build name (#11174)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
* Launchable rejects a name with embedded '%2F'

The '%2F' is a URL encoded '/' and occurs when a branch name with a '/'
is pushed to the Jenkins core repository.

This first step in the fix is to show that the bug exists.

* Sanitize launchable build name
2025-10-08 08:18:03 +02:00
renovate[bot] f73f1f034d
Update stapler.version to v2044 (major) (#11175)
Update stapler.version to v2044

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-08 08:17:42 +02:00
renovate[bot] d396a24930
Update dependency org.jenkins-ci.plugins:matrix-project to v867 (#11172)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 21:22:03 +01:00
Stefan Spieker b85a4f959b
Converted `config.groovy` to `config.jelly` in proxy config and added German localization (#11159)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-07 15:43:32 +02:00
renovate[bot] 88cbd32725
Update dependency io.jenkins.plugins:asm-api to v9.9-185.va_6c6b_3348b_c3 (#11161)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 15:43:21 +02:00
renovate[bot] 9ad057fd32
Update softprops/action-gh-release action to v2.4.0 (#11170)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 15:43:10 +02:00
renovate[bot] 0e405cc185
Update dependency org.jenkins-ci.main:jenkins-test-harness to v2508 (#11169)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 14:11:18 +01:00
Jenkins Release Bot c0bed7aa50 [maven-release-plugin] prepare for next development iteration 2025-10-07 12:26:09 +00:00
Jenkins Release Bot 69ef02102e [maven-release-plugin] prepare release jenkins-2.531 2025-10-07 12:25:57 +00:00
renovate[bot] 0b23eef517
Update dependency stylelint to v16.25.0 (#11164)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 10:35:38 +01:00
renovate[bot] 02e6a9aa61
Update dependency org.jenkins-ci.plugins:scm-api to v712 (#11166)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 10:35:15 +01:00
renovate[bot] 903837d94e
Update eslint monorepo to v9.37.0 (#11168)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-07 10:35:09 +01:00
Alexander Brandes ec5c7feb45
Pin GH actions maintained by GH (#11167) 2025-10-07 10:35:00 +01:00
Hervé Le Meur 4e76327afe
Retry failing Windows builds on non-spot agent (#11052)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-07 09:52:01 +01:00
Christopher Molin 68e7cdec61
Remove unused utility methods checking for Java 8 (#8152)
Changelog Drafter / update_draft_release (push) Has been cancelled Details
Changelog Drafter / jenkins_io_draft (push) Has been cancelled Details
Label conflicting PRs / main (push) Has been cancelled Details
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-10-06 08:58:55 +01:00
renovate[bot] cb6bc5b1d2
Update dependency io.jenkins.plugins:echarts-api to v6.0.0-1165.vd1283a_3e37d4 (#11110)
* Update dependency io.jenkins.plugins:echarts-api to v6.0.0-1165.vd1283a_3e37d4

* Use Jackson 2 API 2.19.2-408.x

Remove Jackson 2 exclusion for Renovate - resolved

---------

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-10-06 08:28:10 +02:00
renovate[bot] 375220a0c2
Update dependency org.ow2.asm:asm to v9.9 (#11156)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-06 08:26:09 +02:00
Alexander Brandes aa51217706
Replace deprecated 'tibdex/github-app-token' with native GH action (#11158)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-10-05 16:15:37 +02:00
Stefan Spieker 7bf2969c13
Replaced deprecated `Stringutils` method with suggested replacement in tests (#11155) 2025-10-05 16:15:02 +02:00
renovate[bot] 84b55f3250
Update mheap/github-action-required-labels action to v5.5.1 (#11157)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-05 16:14:50 +02:00
renovate[bot] bc629045d2
Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.1053.vd62fb_b_f7367b_ (#11142)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-05 16:14:31 +02:00
renovate[bot] 0eba2a5684
Update dependency io.jenkins.plugins:commons-lang3-api to v3.19.0-104.v12125f33a_255 (#11104)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-04 22:12:36 +02:00
renovate[bot] b0eafed55e
Update dependency org.jenkins-ci:jenkins to v1.141 (#11139)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2025-10-04 22:12:27 +02:00
Jesse Glick 9f200b11b6
Define health check for `BindException` on enforced TCP port (#11145) 2025-10-04 22:12:07 +02:00
Alexander Brandes b1fe658d39
Prefer using the SHA of third party actions (#11154) 2025-10-04 22:11:58 +02:00
renovate[bot] 443160f6c0
Update dependency org.jenkins-ci.main:remoting to v3345 (#11152)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-04 22:11:50 +02:00
renovate[bot] 417e7b5f7a
Update softprops/action-gh-release action to v2.3.4 (#11151)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-04 22:11:42 +02:00
renovate[bot] 49f837247d
Update dependency org.jenkins-ci.plugins:scm-api to v711 (#11150)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-04 22:11:35 +02:00
Mark Waite 35b6741fcc
Fix javadoc to refer to the correct method (#11149) 2025-10-04 22:11:22 +02:00
renovate[bot] 69d5a54239
Update dependency stylelint-config-standard-scss to v16 (#11068)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2025-10-04 10:42:24 +01:00
Tim Jacomb 6ec55c327f
Reduce test flakiness: Give agent startup more time (10s -> 30s) (#11153)
Co-authored-by: Jakob Ackermann <das7pad@outlook.com>
2025-10-04 09:02:45 +01:00
renovate[bot] c5b876b582
Update dependency org.jenkins-ci.plugins:junit to v1361 (#11144)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-03 17:13:48 +02:00
renovate[bot] 6cfd7e6b5e
Update dependency webpack to v5.102.0 (#11146)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-03 07:45:50 +01:00
renovate[bot] b0367d4cfb
Update dependency org.jenkins-ci.plugins.workflow:workflow-support to v991 (#11140)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-02 08:02:58 +02:00
Jan Faracik 4c310c5201
Show build cause on experimental build UI (#11128)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-10-01 16:28:24 +01:00
renovate[bot] 481c7784e6
Update dependency org.jenkins-ci.plugins:junit to v1359 (#11138)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-01 16:17:00 +01:00
Jan Faracik f7c1f67dbc
Move experimental run sidepanel to overflow (#11127) 2025-10-01 16:16:43 +01:00
Alexander Brandes 865bff5565
Don't fail when no @since tags are found in @since updater (#11135)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-10-01 10:27:28 +01:00
Damien 7beca3db02
Fix French translations (#11134) 2025-10-01 10:26:57 +01:00
renovate[bot] c01b2c4363
Update dependency net.java.dev.jna:jna to v5.18.1 (#11136)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-01 08:02:28 +02:00
renovate[bot] bc8ef8dcca
Update dependency io.jenkins.plugins:bootstrap5-api to v5.3.8-895.v4d0d8e47fea_d (#11097)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-10-01 08:02:10 +02:00
Jenkins Release Bot 3bce9e226b [maven-release-plugin] prepare for next development iteration
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-09-30 12:23:51 +00:00
Jenkins Release Bot 04952cad1c [maven-release-plugin] prepare release jenkins-2.530 2025-09-30 12:23:42 +00:00
Alexander Brandes dd78a6a29c
Fix CITATION syntax (#11131)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-09-30 09:46:03 +02:00
Alexander Brandes 491be312b0
Add CITATION for BibTeX (#11122)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
* Add CITATION for BibTeX

Signed-off-by: Alexander Brandes <mc.cache@web.de>

* Update CITATION.cff

Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>

---------

Signed-off-by: Alexander Brandes <mc.cache@web.de>
Co-authored-by: Kris Stern <krisstern@outlook.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-09-29 19:38:14 -06:00
Kris Stern 349d4fc407
[JENKINS-73161] Ensure file parameters are retained across Jenkins restarts (#11081) 2025-09-30 09:09:18 +08:00
Kris Stern a68faf9554
Speed up `Jenkins._cleanUpDisconnectComputers` (#11102) 2025-09-30 09:08:50 +08:00
Kris Stern 36c17f52f5
Update job config title and breadcrumb depending on read only status (#10755) 2025-09-30 09:08:10 +08:00
Kris Stern 8ced500484
Update Node.js to v24.9.0 (#11112)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
2025-09-29 20:50:57 +08:00
Jan Faracik 9238140442
Fix description merge (#11126) 2025-09-29 13:16:00 +01:00
renovate[bot] 35e05775f9
Update dependency com.github.eirslett:frontend-maven-plugin to v1.15.4 (#11114)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-29 14:13:03 +02:00
renovate[bot] 8677d21412
Update Node.js to v24.9.0 2025-09-28 17:27:00 +00:00
github-actions[bot] 097a5b2f34
Fill in since annotations (#11105)
Changelog Drafter / update_draft_release (push) Waiting to run Details
Changelog Drafter / jenkins_io_draft (push) Waiting to run Details
Label conflicting PRs / main (push) Waiting to run Details
Co-authored-by: timja <21194782+timja@users.noreply.github.com>
2025-09-28 19:26:50 +02:00
renovate[bot] a7a7a1db2a
Update dependency org.jenkins-ci.main:jenkins-test-harness to v2505 (#11106)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-28 19:26:32 +02:00
renovate[bot] 55aa5a8a80
Update dependency io.jenkins.plugins:font-awesome-api to v7.0.1-872.vb_679b_2c95492 (#11107)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-28 19:25:24 +02:00
renovate[bot] 42e259a790
Update dependency io.jenkins.plugins:jquery3-api to v3.7.1-619.vdb_10e002501a_ (#11108)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-28 19:25:03 +02:00
renovate[bot] 99d24d4856
Update dependency org.jenkins-ci.plugins:bouncycastle-api to v2.30.1.82-277.v70ca_0b_877184 (#11121)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-28 19:23:06 +02:00
renovate[bot] ffae77f94d
Update dependency com.puppycrawl.tools:checkstyle to v11.1.0 (#11124)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-28 19:21:42 +02:00
Kris Stern 1b0b8bfff7
Add experimental 'Parameters' detail for runs (#11116) 2025-09-28 23:13:30 +08:00
Jan Faracik ebc93434ad
Merge branch 'master' into add-parameters-detail 2025-09-28 07:40:24 +01:00
renovate[bot] 9c79ec92aa
Update dependency sass to v1.93.2 (#11119)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-27 11:01:11 +01:00
Tim Jacomb 8bb39aef8a
Merge branch 'master' into add-parameters-detail 2025-09-26 22:14:44 +01:00
renovate[bot] 75ed1d18c1
Update dependency io.jenkins.plugins:prism-api to v1.30.0-630.va_e19d17f83b_0 (#11109)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 21:54:15 +02:00
renovate[bot] f1a6d155dd
Update dependency io.jenkins.plugins:plugin-util-api to v6.1192.v30fe6e2837ff (#11111)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 21:53:43 +02:00
renovate[bot] dd2db990c5
Update dependency org.jenkins-ci.plugins.workflow:workflow-step-api to v710 (#11113)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 21:52:44 +02:00
Jan Faracik 3f8753817a
Merge branch 'master' into add-parameters-detail 2025-09-26 15:34:06 +01:00
Jan Faracik 6edbcc5ae1 Revert "Merge branch 'refine-description' into add-parameters-detail"
This reverts commit e7d4e3f4db, reversing
changes made to 61f4329500.
2025-09-26 15:33:49 +01:00
Jan Faracik e7d4e3f4db Merge branch 'refine-description' into add-parameters-detail 2025-09-26 15:30:34 +01:00
renovate[bot] 271c1489b3
Update Yarn to v4.10.3 (#11117)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 15:19:50 +01:00
Jan Faracik 61f4329500 Fix dialog opening 2025-09-26 12:35:19 +01:00
Jan Faracik f998b55bbd
Merge branch 'master' into refine-description 2025-09-26 11:31:44 +01:00
Jan Faracik 43bf0ff5f9
Update core/src/main/resources/lib/hudson/editDescriptionButton.jelly
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2025-09-26 11:31:35 +01:00
Jan Faracik 1d8ac5a91f
Merge branch 'master' into add-parameters-detail 2025-09-26 11:06:23 +01:00
Jan Faracik 9657540896 Set the hash when a dialog is open, open when a hash is set 2025-09-26 10:29:17 +01:00
renovate[bot] b2dff282f9
Update dependency sass to v1.93.1 (#11094)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-26 09:06:30 +01:00
Jan Faracik 78c8f15755 Add experimental Parameters details for builds 2025-09-26 08:42:26 +01:00
Jan Faracik 5c034fb2d1 Change to compact attribute 2025-09-26 07:30:29 +01:00
Jesse Glick 9e11341372
Close agent logs during tests https://github.com/jenkinsci/jenkins/pull/11102#issuecomment-3330920932 2025-09-25 08:47:58 -04:00
Jesse Glick 668c68604c
Merge branch 'master' of https://github.com/jenkinsci/jenkins into _cleanUpDisconnectComputers 2025-09-25 08:40:46 -04:00
Jan Faracik b3bd7a6cc2 Refine experimental add/edit description button 2025-09-25 08:29:00 +01:00
Jan Faracik 7aa344749f
Refine experimental run details interface (#11096) 2025-09-25 07:46:31 +01:00
renovate[bot] ec972db4d3
Update dependency net.java.dev.jna:jna to v5.18.0 (#11092)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 08:13:06 +02:00
renovate[bot] 1e7f63b256
Update eslint monorepo to v9.36.0 (#11093)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 08:12:41 +02:00
renovate[bot] ee6e482c12
Update dependency postcss-preset-env to v10.4.0 (#11101)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-25 08:12:32 +02:00
Jesse Glick cfebcec2e8
Speed up `Jenkins._cleanUpDisconnectComputers` 2025-09-24 15:26:51 -04:00
renovate[bot] 59691663a5
Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.1045.vb_ddd55e2d03f (#11100)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-24 21:10:34 +02:00
renovate[bot] aeb95d91e3
Update dependency org.jenkins-ci.plugins:scm-api to v709 (#11099)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-24 21:10:00 +02:00
Kris Stern 364a955ec9
Removed `configureclouds` redirect (#10982) 2025-09-25 01:23:37 +08:00
Kris Stern ad52f2b908
Bump engine version to node.js 24.x (#11098) 2025-09-25 01:22:58 +08:00
Alexander Brandes f92da7a246
Bump engine version to node.js 24.x
Signed-off-by: Alexander Brandes <mc.cache@web.de>
2025-09-23 17:19:11 +02:00
renovate[bot] 1c61d50fa6
Update Yarn to v4.10.2 (#11095)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-23 17:08:27 +02:00
Jenkins Release Bot 7a66756595 [maven-release-plugin] prepare for next development iteration 2025-09-23 12:23:57 +00:00
Jenkins Release Bot 8e2e1ec365 [maven-release-plugin] prepare release jenkins-2.529 2025-09-23 12:23:48 +00:00
Stefan Spieker d420deb74d removed redirect 2025-09-23 14:01:58 +02:00
renovate[bot] 05fd38da28
Update Yarn to v4.10.0 (#11091)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 07:46:24 +02:00
renovate[bot] 739cea9679
Update dependency org.bouncycastle:bcprov-jdk18on to v1.82 (#11077)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-22 07:45:00 +02:00
Thorsten Scherler 7cd0ccbb40
[JENKINS-75529] use plain colors (#11085)
Signed-off-by: Thorsten Scherler <scherler@gmail.com>
2025-09-20 18:19:27 -06:00
renovate[bot] 8c257e5ebb
Update dependency org.jenkins-ci.plugins.workflow:workflow-support to v989 (#11080)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 07:29:49 -06:00
renovate[bot] be904ec7f2
Update dependency org.jenkins-ci.plugins:cloudbees-folder to v6.1042.v37b_8229708e4 (#11088)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 07:29:16 -06:00
James Nord c23cf20ea2
work around eclipse compiler bug (#11087)
https://github.com/eclipse-jdt/eclipse.jdt.core/issues/2860
prevents the code from compiling in eclipse.

Move the class out so that eclipse is happy.  As the class was private
there should be no impact to anything.
2025-09-20 07:29:03 -06:00
Jesse Glick 1bae0f30f6
[JENKINS-16341] Pick up `BoundObjectTable` fix (#11086) 2025-09-20 07:28:54 -06:00
renovate[bot] a645acb6ac
Update dependency com.google.guava:guava to v33.5.0-jre (#11082)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 07:28:35 -06:00
renovate[bot] 4ea4552925
Update dependency io.jenkins.lib:support-log-formatter to v118 (#11079)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 07:28:18 -06:00
renovate[bot] 133bc68195
Update dependency org.springframework.security:spring-security-bom to v6.5.5 (#11078)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-20 07:27:49 -06:00
Jérôme Pochat 02b40b1dd1
[JENKINS-76114] Bring back the "All/None/Suggested" buttons in the plugin configuration wizard (#11070)
Fix padding
2025-09-20 07:27:38 -06:00
Alexander Brandes 27d2d1166e
Run GH actions release uploader on Java 21 (#11075)
Co-authored-by: Kris Stern <krisstern@outlook.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2025-09-20 10:19:12 +01:00
Kris Stern cf32065ca6
Update dependency org.jenkins-ci.main:remoting to v3341 (#11083) 2025-09-20 09:50:30 +08:00
Kris Stern 791da634b9
Update dependency io.jenkins.plugins:bootstrap5-api to v5.3.8-876.vb_c62a_27d9a_77 (#11073) 2025-09-19 18:17:38 +08:00
Markus Winter ab342c04e2 extract delete to method
needed to be able to apply the annotation
2025-09-18 20:25:07 +02:00
Markus Winter c03fcac9d8 throw 2025-09-18 18:12:43 +02:00
Markus Winter 3f5855c0a8 fix tests and spotbugs 2025-09-18 18:11:00 +02:00
Markus Winter 32830f9d2c store files under JENKINS_HOME 2025-09-18 16:46:35 +02:00
renovate[bot] e1124c1eb0
Update dependency org.jenkins-ci.main:remoting to v3341 2025-09-18 05:54:20 +00:00
Kris Stern 5ad08302cd
Update Node.js to v24.8.0 (#11054) 2025-09-18 07:51:27 +08:00
Markus Winter d01cedafa3 [JENKINS-73161] Ensure file parameters are retained across Jenkins restarts
Save the file as temporary file and store the filename in the value
That way we can recover the file
2025-09-17 22:55:14 +02:00
Kris Stern 121e9062b3
Merge branch 'master' into renovate/io.jenkins.plugins-bootstrap5-api-5.x 2025-09-18 00:14:04 +08:00
Kris Stern 0d3fe0a2d3
Merge branch 'master' into renovate/node-24.x 2025-09-18 00:13:48 +08:00
renovate[bot] 633b9c0975
Update dependency org.apache.maven.plugins:maven-shade-plugin to v3.6.1 (#11064)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:14:15 +01:00
renovate[bot] c765aa2d7e
Update dependency io.jenkins.plugins:font-awesome-api to v7.0.1-859.v128d3a_efb_6e5 (#11074)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:13:58 +01:00
renovate[bot] 45bf79a068
Update dependency org.springframework:spring-framework-bom to v6.2.11 (#11058)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:13:10 +01:00
Alexander Brandes 077acbb3f7
Don't run core actions on forks (#11072) 2025-09-17 15:11:52 +01:00
renovate[bot] 80cb24beec
Update dependency org.springframework.security:spring-security-bom to v6.5.4 (#11069)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:11:35 +01:00
renovate[bot] de24886700
Update dependency org.jenkins-ci.plugins:credentials to v1447 (#11062)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:11:24 +01:00
renovate[bot] ea708724cf
Update dependency org.xmlunit:xmlunit-bom to v2.10.4 (#11067)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:11:17 +01:00
renovate[bot] ac4288cd9f
Update stapler.version to v2033 (major) (#11051)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:11:07 +01:00
renovate[bot] 40a12cf136
Update dependency org.jenkins-ci.plugins:matrix-project to v858 (#11053)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:10:59 +01:00
renovate[bot] 4c8ab61c28
Update dependency globals to v16.4.0 (#11061)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:10:44 +01:00
renovate[bot] 46294a54fb
Update dependency io.jenkins.plugins:gson-api to v2.13.2-173.va_a_092315913c (#11057)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-09-17 15:10:37 +01:00
Markus Winter 17a1ca6e51
Move TimeZoneProperty to user preferences page (#11065) 2025-09-17 15:10:29 +01:00
Jesse Glick 69e44255b6
Use `f:dropdownDescriptorSelector` for agent launcher (#11055) 2025-09-17 15:10:16 +01:00
Ian Haken 863a8a46b6
Add a Queue.tryWithLock() method that accepts a timeout. (#11033)
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-09-17 15:09:55 +01:00
Ian Haken 066f4c2fc2
Add addNodeIfAbsent method to Nodes. (#11032)
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Kris Stern <krisstern@outlook.com>
2025-09-17 15:09:37 +01:00
Jérôme Pochat 88dd0bf930
[JENKINS-76002] Apply number instead of string comparison (#11059) 2025-09-17 15:09:18 +01:00
Bart Louwers d3470113b2
Fix Dutch translation of 'upstream' and 'downstream' (#11060) 2025-09-17 15:09:04 +01:00
Dmitriy Ukhlov ef97746eb2
[JENKINS-76075]: Optimise BuildReferenceMapAdapter and LogRotator: defer reference resolution (#11038)
Co-authored-by: Dmytro Ukhlov <dukhlov@csod.com>
2025-09-17 15:08:48 +01:00
renovate[bot] 41d273ccf4
Update Node.js to v24.8.0 2025-09-17 13:13:02 +00:00
Kris Stern 70e8106888
Merge branch 'master' into renovate/io.jenkins.plugins-bootstrap5-api-5.x 2025-09-17 21:10:59 +08:00
renovate[bot] 39fa1bdd99
Update dependency io.jenkins.plugins:bootstrap5-api to v5.3.8-876.vb_c62a_27d9a_77 2025-09-16 17:52:53 +00:00
Jenkins Release Bot fd37b705b3 [maven-release-plugin] prepare for next development iteration 2025-09-15 23:05:04 +00:00
Jenkins Release Bot 1fbaa7cced [maven-release-plugin] prepare release jenkins-2.528 2025-09-15 23:04:54 +00:00
Jan Faracik 3ef51444c5
Merge branch 'master' into rename-configuration-to-configure 2025-09-15 12:02:47 +01:00
Daniel Beck 6bdea9f44a [SECURITY-3625] 2025-09-09 13:29:22 +00:00
Daniel Beck a2d1bce6cc [SECURITY-3424] 2025-09-09 13:29:16 +00:00
Daniel Beck e5fb48fd04 [SECURITY-3594] 2025-09-09 13:29:10 +00:00
Jenkins Release Bot c64384a867 [maven-release-plugin] prepare for next development iteration 2025-09-09 12:24:10 +00:00
Stefan Spieker d47192078f just use .. 2025-08-17 15:17:44 +02:00
Stefan Spieker 04072f17d1 migrated configureClouds redirect page from groovy to jelly 2025-08-17 14:50:55 +02:00
Jan Faracik ca36dbf98f
Merge branch 'master' into rename-configuration-to-configure 2025-07-28 11:26:01 +01:00
Jan Faracik 486119a10e Change to Configuration if read only 2025-07-26 10:50:56 +01:00
Jan Faracik c2f47265fe Merge branch 'master' into rename-configuration-to-configure 2025-07-26 10:49:08 +01:00
Jan Faracik ae52a30aed Update configure_ru.properties 2025-06-19 11:38:11 -04:00
Jan Faracik 522959977a Remove unused Save, Apply, and LOADING translations
Deleted the Save, Apply, and LOADING keys from Job configure resource bundles in all supported languages, as these are no longer used. Also updated the breadcrumb title in configure.jelly from 'Configuration' to 'Configure' for consistency.
2025-06-19 11:35:38 -04:00
339 changed files with 5767 additions and 2918 deletions

View File

@ -1,2 +1,4 @@
# Whitespace: https://github.com/jenkinsci/jenkins/pull/6149
e27b310065b3c036b5fc9d123f1d1d99d3058c00
# Reformatted: https://github.com/jenkinsci/jenkins/pull/6863
e3fdfa527e4fefb4b37f04c92a2dd87b8a374b75

View File

@ -87,7 +87,7 @@ The changelog generator relies on the presence of the upgrade guidelines section
- [ ] There is automated testing or an explanation as to why this change has no tests.
- [ ] New public classes, fields, and methods are annotated with `@Restricted` or have `@since TODO` Javadocs, as appropriate.
- [ ] New deprecations are annotated with `@Deprecated(since = "TODO")` or `@Deprecated(forRemoval = true, since = "TODO")`, if applicable.
- [ ] New or substantially changed JavaScript is not defined inline and does not call `eval` to ease future introduction of Content Security Policy (CSP) directives (see [documentation](https://www.jenkins.io/doc/developer/security/csp/)).
- [ ] UI changes do not introduce regressions when enforcing the current default rules of [Content Security Policy Plugin](https://plugins.jenkins.io/csp/). In particular, new or substantially changed JavaScript is not defined inline and does not call `eval` to ease future introduction of Content Security Policy (CSP) directives (see [documentation](https://www.jenkins.io/doc/developer/security/csp/)).
- [ ] For dependency updates, there are links to external changelogs and, if possible, full differentials.
- [ ] For new APIs and extension points, there is a link to at least one consumer.

10
.github/renovate.json vendored
View File

@ -106,16 +106,6 @@
],
"enabled": false,
"description": "maven-metadata.xml is missing for this really old package which is required by renovate"
},
{
"description": "Jackson 2.19.0 causes issues with Kubernetes client. See https://github.com/jenkinsci/bom/pull/5114",
"matchManagers": [
"maven"
],
"allowedVersions": "<2.19.0",
"matchPackageNames": [
"org.jenkins-ci.plugins:jackson2-api"
]
}
],
"customManagers": [

View File

@ -7,6 +7,7 @@ on:
jobs:
post:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'jenkinsci' }}
steps:
- name: Post on Discourse
uses: roots/discourse-topic-github-release-action@c30dc233349b7c6f24f52fb1c659cc64f13b5474 # v1.0.1

View File

@ -18,24 +18,24 @@ jobs:
pull-requests: write # to add label to PR (release-drafter/release-drafter)
contents: write # to create a github release (release-drafter/release-drafter)
if: github.repository_owner == 'jenkinsci'
if: ${{ github.repository_owner == 'jenkinsci' }}
runs-on: ubuntu-latest
steps:
# Drafts your next Release notes as Pull Requests are merged into "master"
- name: Generate GitHub Release Draft
id: release-drafter
uses: release-drafter/release-drafter@v6
uses: release-drafter/release-drafter@b1476f6e6eb133afa41ed8589daba6dc69b4d3f5 # v6.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Generates a YAML changelog file using https://github.com/jenkinsci/jenkins-core-changelog-generator
# used by Oleg N in open graph generator experiment for now
- name: Generate YAML changelog draft
id: jenkins-core-changelog-generator
uses: jenkinsci/jenkins-core-changelog-generator@master
uses: jenkinsci/core-changelog-generator@feb124ed2262f8586ac4561348436afb965812e1 # v2.2.2
env:
GITHUB_AUTH: github-actions:${{ secrets.GITHUB_TOKEN }}
- name: Upload Changelog YAML
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: changelog.yaml
path: changelog.yaml
@ -44,17 +44,15 @@ jobs:
runs-on: ubuntu-latest
if: github.repository_owner == 'jenkinsci'
steps:
- uses: tibdex/github-app-token@v2
- uses: actions/create-github-app-token@67018539274d69449ef7c02e8e71183d1719ab42 # v2.1.4
id: generate-token
with:
app_id: ${{ secrets.JENKINS_CHANGELOG_UPDATER_APP_ID }}
installation_retrieval_mode: repository
installation_retrieval_payload: jenkins-infra/jenkins.io
private_key: ${{ secrets.JENKINS_CHANGELOG_UPDATER_PRIVATE_KEY }}
repositories: >-
["jenkins.io"]
app-id: ${{ secrets.JENKINS_CHANGELOG_UPDATER_APP_ID }}
private-key: ${{ secrets.JENKINS_CHANGELOG_UPDATER_PRIVATE_KEY }}
owner: jenkins-infra
repositories: jenkins.io
- name: Check out
uses: actions/checkout@v5
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Publish jenkins.io changelog draft

View File

@ -9,11 +9,11 @@ permissions:
jobs:
main:
if: github.event.pull_request.user.login != 'dependabot[bot]'
if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' && github.repository_owner == 'jenkinsci' }}
runs-on: ubuntu-latest
steps:
- name: Label conflicting PRs
uses: eps1lon/actions-label-merge-conflict@v3.0.3
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
with:
dirtyLabel: "unresolved-merge-conflict"
repoToken: "${{ secrets.GITHUB_TOKEN }}"

View File

@ -11,7 +11,7 @@ jobs:
steps:
- name: Check if PR targets LTS branch
if: startsWith(github.event.pull_request.base.ref, 'stable-')
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |

View File

@ -9,18 +9,19 @@ permissions:
jobs:
determine-version:
if: ${{ github.repository_owner == 'jenkinsci' }}
runs-on: ubuntu-latest
outputs:
project-version: ${{ steps.set-version.outputs.project-version }}
is-lts: ${{ steps.set-version.outputs.is-lts }}
is-rc: ${{ steps.set-version.outputs.is-rc }}
steps:
- uses: actions/checkout@v5
- name: Set up JDK 17
uses: actions/setup-java@v5
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: Set up JDK 21
uses: actions/setup-java@de5a937a1dc73fbc1a67d7d1aa4bebc1082f3190 #v 5.0.0
with:
distribution: "temurin"
java-version: 17
java-version: 21
cache: "maven"
- name: Set version
id: set-version
@ -73,7 +74,7 @@ jobs:
wget -q https://get.jenkins.io/${REPO}/${PROJECT_VERSION}/${FILE_NAME}
- name: Upload Release Asset
id: upload-war
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@ -108,7 +109,7 @@ jobs:
- name: Upload Release Asset
id: upload-deb
if: always()
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@ -144,7 +145,7 @@ jobs:
- name: Upload Release Asset
id: upload-rpm
if: always()
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@ -180,7 +181,7 @@ jobs:
- name: Upload Release Asset
id: upload-msi
if: always()
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
@ -216,7 +217,7 @@ jobs:
- name: Upload Release Asset
id: upload-suse-rpm
if: always()
uses: softprops/action-gh-release@6cbd405e2c4e67a21c47fa9e383d020e4e28b836 # v2.3.3
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:

View File

@ -6,12 +6,13 @@ on:
- "master"
jobs:
label:
if: ${{ github.repository_owner == 'jenkinsci' }}
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: mheap/github-action-required-labels@8afbe8ae6ab7647d0c9f0cfa7c2f939650d22509 # v5
- uses: mheap/github-action-required-labels@8afbe8ae6ab7647d0c9f0cfa7c2f939650d22509 # v5.5.1
with:
mode: minimum
count: 1

View File

@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'jenkinsci' }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
fetch-depth: 0
- name: Run update-since-todo.py
@ -29,7 +29,7 @@ jobs:
id: run_script
shell: bash
- name: Create Pull Request
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7.0.8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Fill in since annotations

19
CITATION.cff Normal file
View File

@ -0,0 +1,19 @@
cff-version: 1.2.0
title: "Jenkins"
type: software
repository-code: "https://github.com/jenkinsci/jenkins"
url: "https://jenkins.io/"
authors:
- name: "Jenkins contributors"
affiliation: "Jenkins project"
abstract: >-
In a nutshell, Jenkins is the leading open-source automation server.
Built with Java, it provides over 2,000 plugins to support automating virtually anything,
so that humans can spend their time doing things machines cannot.
keywords:
- jenkins
- continuous-integration
- continuous-delivery
- pipelines
- automation
license: MIT

20
Jenkinsfile vendored
View File

@ -14,7 +14,7 @@ properties([
def axes = [
platforms: ['linux', 'windows'],
jdks: [17, 21],
jdks: [17, 21, 25],
]
stage('Record build') {
@ -29,14 +29,16 @@ stage('Record build') {
/*
* TODO Add the commits of the transitive closure of the Jenkins WAR under test to this build.
*/
sh 'launchable verify && launchable record build --name ${BUILD_TAG} --source jenkinsci/jenkins=.'
// Replace URL encoded characters with '-' because Launchable rejects '%2F' in build name
def launchableName = env.BUILD_TAG.replaceAll('(%[0-9A-Fa-f]{2})+', '-')
sh "launchable verify && launchable record build --name ${launchableName} --source jenkinsci/jenkins=."
axes.values().combinations {
def (platform, jdk) = it
if (platform == 'windows' && jdk != 17) {
if (platform == 'windows' && jdk != axes.jdks.last()) {
return // unnecessary use of hardware
}
def sessionFile = "launchable-session-${platform}-jdk${jdk}.txt"
sh "launchable record session --build ${env.BUILD_TAG} --flavor platform=${platform} --flavor jdk=${jdk} >${sessionFile}"
sh "launchable record session --build ${launchableName} --flavor platform=${platform} --flavor jdk=${jdk} >${sessionFile}"
stash name: sessionFile, includes: sessionFile
}
}
@ -58,7 +60,7 @@ def builds = [:]
axes.values().combinations {
def (platform, jdk) = it
if (platform == 'windows' && jdk != 17) {
if (platform == 'windows' && jdk != axes.jdks.last()) {
return // unnecessary use of hardware
}
builds["${platform}-jdk${jdk}"] = {
@ -67,7 +69,13 @@ axes.values().combinations {
if (platform == 'windows') {
agentContainerLabel += '-windows'
}
int retryCount = 0
retry(conditions: [kubernetesAgent(handleNonKubernetes: true), nonresumable()], count: 2) {
if (retryCount == 1 && platform == 'windows' ) {
agentContainerLabel = agentContainerLabel + '-nonspot'
}
// Increment before allocating the node in case it fails
retryCount++
node(agentContainerLabel) {
// First stage is actually checking out the source. Since we're using Multibranch
// currently, we can use "checkout scm".
@ -210,7 +218,7 @@ axes.values().combinations {
def athAxes = [
platforms: ['linux'],
jdks: [17],
jdks: [21],
browsers: ['firefox'],
]
athAxes.values().combinations {

4
ath.sh
View File

@ -6,10 +6,10 @@ set -o xtrace
cd "$(dirname "$0")"
# https://github.com/jenkinsci/acceptance-test-harness/releases
export ATH_VERSION=6361.vcb_036a_7ffb_a_5
export ATH_VERSION=6446.v64eb_f0dfb_26d
if [[ $# -eq 0 ]]; then
export JDK=17
export JDK=21
export BROWSER=firefox
else
export JDK=$1

View File

@ -28,7 +28,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-parent</artifactId>
<version>2.527</version>
<version>${revision}${changelist}</version>
</parent>
<artifactId>jenkins-bom</artifactId>
@ -41,7 +41,7 @@ THE SOFTWARE.
<commons-fileupload2.version>2.0.0-M4</commons-fileupload2.version>
<groovy.version>2.4.21</groovy.version>
<jelly.version>1.1-jenkins-20250731</jelly.version>
<stapler.version>2030.v88a_855365981</stapler.version>
<stapler.version>2050.v425108fd5089</stapler.version>
</properties>
<dependencyManagement>
@ -63,7 +63,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>6.2.10</version>
<version>6.2.12</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -71,7 +71,7 @@ THE SOFTWARE.
<!-- https://docs.spring.io/spring-security/reference/6.3/getting-spring-security.html#getting-maven-no-boot -->
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>6.5.3</version>
<version>6.5.6</version>
<type>pom</type>
<scope>import</scope>
</dependency>
@ -89,7 +89,7 @@ THE SOFTWARE.
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.4.8-jre</version>
<version>33.5.0-jre</version>
</dependency>
<dependency>
<groupId>com.sun.xml.txw2</groupId>
@ -109,7 +109,7 @@ THE SOFTWARE.
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.19.0</version>
<version>1.20.0</version>
</dependency>
<dependency>
<groupId>commons-collections</groupId>
@ -144,7 +144,7 @@ THE SOFTWARE.
<dependency>
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.17.0</version>
<version>5.18.1</version>
</dependency>
<dependency>
<groupId>net.java.sezpoz</groupId>
@ -326,7 +326,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.ow2.asm</groupId>
<artifactId>asm</artifactId>
<version>9.8</version>
<version>9.9</version>
</dependency>
<dependency>
<!-- provided by jcl-over-slf4j -->

View File

@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-parent</artifactId>
<version>2.527</version>
<version>${revision}${changelist}</version>
</parent>
<artifactId>cli</artifactId>
@ -53,7 +53,7 @@
<dependency>
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.81</version>
<version>1.82</version>
<optional>true</optional>
</dependency>
<dependency>
@ -113,7 +113,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>3.6.0</version>
<version>3.6.1</version>
<executions>
<execution>
<goals>

View File

@ -36,7 +36,6 @@
package hudson.util;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.util.ArrayList;
import java.util.List;
import java.util.NoSuchElementException;
@ -140,9 +139,6 @@ public class QuotedStringTokenizer
/* ------------------------------------------------------------ */
@Override
@SuppressFBWarnings(
value = {"SF_DEAD_STORE_DUE_TO_SWITCH_FALLTHROUGH", "SF_SWITCH_FALLTHROUGH"},
justification = "TODO needs triage")
public boolean hasMoreTokens()
{
// Already found a token

View File

@ -7,7 +7,7 @@ CLI.Usage=Jenkins CLI\n\
-noCertificateCheck : contourne entiérement la vérification des certificats HTTPS. A utiliser avec précaution\n\
-noKeyAuth : ne charge pas la clé privée d''authentification SSH. En conflit avec -i\n\
\n\
Les commandes disponibles dépendent du serveur. Lancer la commande 'help' pour\n\
Les commandes disponibles dépendent du serveur. Lancer la commande ''help'' pour\n\
obtenir la liste.
CLI.NoURL=Erreur, ni -s ou la variable d''environnement JENKINS_URL ne sont renseignées.
CLI.VersionMismatch=Conflit de versions. Cet outil ne peut fonctionner avec le serveur Jenkins renseigné.

View File

@ -29,7 +29,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-parent</artifactId>
<version>2.527</version>
<version>${revision}${changelist}</version>
</parent>
<artifactId>jenkins-core</artifactId>
@ -57,7 +57,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.xmlunit</groupId>
<artifactId>xmlunit-bom</artifactId>
<version>2.10.3</version>
<version>2.11.0</version>
<type>pom</type>
<scope>import</scope>
</dependency>

View File

@ -87,7 +87,10 @@ public @interface Extension {
/**
* If an extension is optional, don't log any class loading errors when reading it.
* @since 1.358
* @deprecated This is very difficult to use correctly and rarely what you actually wanted.
* Use {@code OptionalExtension} from the {@code variant} plugin instead.
*/
@Deprecated
boolean optional() default false;
/**

View File

@ -193,6 +193,7 @@ public abstract class ExtensionFinder implements ExtensionPoint {
super(Extension.class);
}
@SuppressWarnings("deprecation")
@Override
protected boolean isOptional(Extension annotation) {
return annotation.optional();
@ -779,6 +780,7 @@ public abstract class ExtensionFinder implements ExtensionPoint {
}
}
@SuppressWarnings("deprecation")
private Level logLevel(IndexItem<Extension, Object> item) {
return item.annotation().optional() ? Level.FINE : Level.WARNING;
}

View File

@ -36,17 +36,14 @@ import jenkins.model.Jenkins;
* in Jenkins that can be implemented by plugins.
*
* <p>
* See respective interfaces/classes for more about how to register custom
* implementations to Jenkins. See {@link Extension} for how to have
* Jenkins auto-discover your implementations.
* Use {@link Extension} to register an implementation.
* Use {@link ExtensionList} to look for implementations.
*
* <p>
* This interface is used for auto-generating
* documentation.
*
* @author Kohsuke Kawaguchi
* @see Plugin
* @see Extension
*/
public interface ExtensionPoint {
/**

View File

@ -718,10 +718,14 @@ public final class FilePath implements SerializableOnlyOverRemoting {
int mode = e.getUnixMode();
if (mode != 0) // Ant returns 0 if the archive doesn't record the access mode
target.chmod(mode);
} catch (InterruptedException ex) {
} catch (InterruptedException | NoSuchFileException ex) {
LOGGER.log(Level.WARNING, "unable to set permissions", ex);
}
try {
Files.setLastModifiedTime(Util.fileToPath(f), e.getLastModifiedTime());
} catch (NoSuchFileException ex) {
LOGGER.log(Level.WARNING, "unable to set last modified time", ex);
}
}
}
}
@ -1301,7 +1305,7 @@ public final class FilePath implements SerializableOnlyOverRemoting {
/**
* Takes a {@link FilePath}+{@link FileCallable} pair and returns the equivalent {@link Callable}.
* When executing the resulting {@link Callable}, it executes {@link FileCallable#act(FileCallable)}
* When executing the resulting {@link Callable}, it executes {@link FilePath#act(FileCallable)}
* on this {@link FilePath}.
*
* @since 1.522

View File

@ -2470,7 +2470,6 @@ public class Functions {
* Advertises the minimum set of HTTP headers that assist programmatic
* discovery of Jenkins.
*/
@SuppressFBWarnings(value = "UC_USELESS_VOID_METHOD", justification = "TODO needs triage")
public static void advertiseHeaders(HttpServletResponse rsp) {
Jenkins j = Jenkins.getInstanceOrNull();
if (j != null) {
@ -2621,7 +2620,7 @@ public class Functions {
for (Map.Entry<DetailGroup, List<Detail>> entry : result.entrySet()) {
List<Detail> detailList = entry.getValue();
detailList.sort(Comparator.comparingInt(Detail::getOrder));
detailList.sort(Comparator.comparingInt(Detail::getOrder).reversed());
}
return result;

View File

@ -50,6 +50,7 @@ import java.util.Base64;
import java.util.logging.Level;
import java.util.logging.Logger;
import jenkins.AgentProtocol;
import jenkins.health.HealthCheck;
import jenkins.model.Jenkins;
import jenkins.model.identity.InstanceIdentityProvider;
import jenkins.security.stapler.StaplerAccessibleType;
@ -445,4 +446,14 @@ public final class TcpSlaveAgentListener extends Thread {
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "Accessible via System Groovy Scripts")
@Restricted(NoExternalUse.class)
public static Integer CLI_PORT = SystemProperties.getInteger(TcpSlaveAgentListener.class.getName() + ".port");
@Extension
public static final class EnforcedPortHealthCheck implements HealthCheck {
@Override
public boolean check() {
var j = Jenkins.get();
return !j.isSlaveAgentPortEnforced() || j.getSlaveAgentPort() <= 0 || j.getTcpSlaveAgentListener() != null;
}
}
}

View File

@ -94,6 +94,11 @@ public class AnnotatedLargeText<T> extends LargeText {
this.context = context;
}
public AnnotatedLargeText(LargeText.Source source, Charset charset, boolean completed, T context) {
super(source, charset, completed);
this.context = context;
}
/**
* @since 2.475
*/
@ -236,8 +241,10 @@ public class AnnotatedLargeText<T> extends LargeText {
@CheckReturnValue
public long writeHtmlTo(long start, Writer w) throws IOException {
StaplerRequest2 req = Stapler.getCurrentRequest2();
StaplerResponse2 rsp = Stapler.getCurrentResponse2();
ConsoleAnnotationOutputStream<T> caw = new ConsoleAnnotationOutputStream<>(
w, createAnnotator(Stapler.getCurrentRequest2()), context, charset);
w, createAnnotator(req), context, charset);
long r = super.writeLogTo(start, caw);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
@ -246,9 +253,12 @@ public class AnnotatedLargeText<T> extends LargeText {
oos.writeLong(System.currentTimeMillis()); // send timestamp to prevent a replay attack
oos.writeObject(caw.getConsoleAnnotator());
oos.close();
StaplerResponse2 rsp = Stapler.getCurrentResponse2();
if (rsp != null)
rsp.setHeader("X-ConsoleAnnotator", Base64.getEncoder().encodeToString(baos.toByteArray()));
String state = Base64.getEncoder().encodeToString(baos.toByteArray());
if (isStreamingRequest(req)) {
putStreamingMeta("consoleAnnotator", state);
} else if (rsp != null) {
rsp.setHeader("X-ConsoleAnnotator", state);
}
return r;
}

View File

@ -57,7 +57,7 @@ public class ConsoleAnnotationOutputStream<T> extends LineTransformationOutputSt
/**
* Reused buffer that stores char representation of a single line.
*/
private final LineBuffer line = new LineBuffer(256);
private final LineBuffer line = new LineBuffer(4096);
/**
* {@link OutputStream} that writes to {@link #line}.
*/
@ -173,8 +173,8 @@ public class ConsoleAnnotationOutputStream<T> extends LineTransformationOutputSt
private void reset() {
StringBuffer buf = getStringBuffer();
if (buf.length() > 4096)
out = new StringWriter(256);
if (buf.length() > 64 * 1024)
out = new StringWriter(4096);
else
buf.setLength(0);
}

View File

@ -25,7 +25,6 @@
package hudson.lifecycle;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import hudson.util.BootFailure;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -44,7 +43,6 @@ import org.kohsuke.accmod.restrictions.NoExternalUse;
* @author Alon Bar-Lev
*/
@Restricted(NoExternalUse.class)
@Extension
public class ExitLifecycle extends Lifecycle {
private static final Logger LOGGER = Logger.getLogger(ExitLifecycle.class.getName());

View File

@ -26,7 +26,6 @@ package hudson.lifecycle;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.ExtensionPoint;
import hudson.Functions;
import hudson.PluginManager;
import hudson.Util;
@ -62,7 +61,7 @@ import org.kohsuke.accmod.restrictions.NoExternalUse;
* @author Kohsuke Kawaguchi
* @since 1.254
*/
public abstract class Lifecycle implements ExtensionPoint {
public abstract class Lifecycle {
private static Lifecycle INSTANCE = null;
/**

View File

@ -4,7 +4,6 @@ import com.sun.jna.Library;
import com.sun.jna.Native;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import java.util.concurrent.TimeUnit;
import java.util.logging.Level;
import java.util.logging.Logger;
@ -17,7 +16,6 @@ import org.kohsuke.accmod.restrictions.NoExternalUse;
* @author Basil Crow
*/
@Restricted(NoExternalUse.class)
@Extension(optional = true)
public class SystemdLifecycle extends ExitLifecycle {
private static final Logger LOGGER = Logger.getLogger(SystemdLifecycle.class.getName());

View File

@ -94,10 +94,6 @@ public abstract class AbstractCIBase extends Node implements ItemGroup<TopLevelI
ViewJob.interruptReloadThread();
}
protected void killComputer(Computer c) {
c.kill();
}
private final Set<String> disabledAdministrativeMonitors = new HashSet<>();
/**
@ -267,12 +263,12 @@ public abstract class AbstractCIBase extends Node implements ItemGroup<TopLevelI
// we need to start the process of reducing the executors on all computers as distinct
// from the killing action which should not excessively use the Queue lock.
for (Computer c : old) {
c.inflictMortalWound();
c.setNumExecutors(0);
}
});
for (Computer c : old) {
// when we get to here, the number of executors should be zero so this call should not need the Queue.lock
killComputer(c);
c.kill();
}
getQueue().scheduleMaintenance();
Listeners.notify(ComputerListener.class, false, ComputerListener::onConfigurationChange);

View File

@ -69,7 +69,6 @@ import jenkins.model.Jenkins;
import jenkins.model.Loadable;
import jenkins.model.queue.ItemDeletion;
import jenkins.security.ExtendedReadRedaction;
import jenkins.security.NotReallyRoleSensitiveCallable;
import jenkins.security.stapler.StaplerNotDispatchable;
import jenkins.util.SystemProperties;
import jenkins.util.xml.XMLUtils;
@ -914,6 +913,7 @@ public abstract class AbstractItem extends Actionable implements Loadable, Item,
* sources may not be handled.
* @since 1.473
*/
@SuppressWarnings("unchecked")
public void updateByXml(Source source) throws IOException {
checkPermission(CONFIGURE);
XmlFile configXmlFile = getConfigFile();
@ -934,12 +934,7 @@ public abstract class AbstractItem extends Actionable implements Loadable, Item,
throw new IOException("Expecting " + this.getClass() + " but got " + o.getClass() + " instead");
}
Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<Void, IOException>() {
@Override public Void call() throws IOException {
onLoad(getParent(), getRootDir().getName());
return null;
}
});
Items.runWhileUpdatingByXml(() -> onLoad(getParent(), getRootDir().getName()));
Jenkins.get().rebuildDependencyGraphAsync();
// if everything went well, commit this new version
@ -967,18 +962,13 @@ public abstract class AbstractItem extends Actionable implements Loadable, Item,
}
@Override
@SuppressWarnings("unchecked")
public void load() throws IOException {
checkPermission(CONFIGURE);
// try to reflect the changes by reloading
getConfigFile().unmarshal(this);
Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<Void, IOException>() {
@Override
public Void call() throws IOException {
onLoad(getParent(), getParent().getItemName(getRootDir(), AbstractItem.this));
return null;
}
});
Items.runWhileUpdatingByXml(() -> onLoad(getParent(), getParent().getItemName(getRootDir(), this)));
Jenkins.get().rebuildDependencyGraphAsync();
}

View File

@ -138,10 +138,11 @@ public abstract class Actionable extends AbstractModelObject implements ModelObj
*/
@NonNull
public <T extends Action> List<T> getActions(Class<T> type) {
List<T> _actions = Util.filter(getActions(), type);
List<T> _actions = new ArrayList<>();
for (TransientActionFactory<?> taf : TransientActionFactory.factoriesFor(getClass(), type)) {
_actions.addAll(Util.filter(createFor(taf), type));
}
_actions.addAll(Util.filter(getActions(), type));
return Collections.unmodifiableList(_actions);
}

View File

@ -24,6 +24,8 @@
package hudson.model;
import static hudson.Functions.getAvatar;
import com.thoughtworks.xstream.converters.UnmarshallingContext;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
@ -445,19 +447,30 @@ public abstract class Cause {
return userId != null ? userId : User.getUnknown().getId();
}
private User getUser() {
return userId == null ? null : User.getById(userId, false);
}
@Exported(visibility = 3)
public String getUserName() {
final User user = userId == null ? null : User.getById(userId, false);
final User user = getUser();
return user == null ? "anonymous" : user.getDisplayName();
}
@Restricted(DoNotUse.class) // for Jelly
@CheckForNull
public String getUserUrl() {
final User user = userId == null ? null : User.getById(userId, false);
final User user = getUser();
return user != null ? user.getUrl() : null;
}
@Restricted(DoNotUse.class) // for Jelly
@CheckForNull
public String getUserAvatar() {
final User user = getUser();
return user != null ? getAvatar(user, "48x48") : null;
}
@Override
public String getShortDescription() {
return Messages.Cause_UserIdCause_ShortDescription(getUserName());

View File

@ -827,23 +827,6 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
setNumExecutors(0);
}
/**
* Called by {@link Jenkins#updateComputerList(boolean, Collection)} to notify {@link Computer} that it will be discarded.
*
* <p>
* Note that at this point {@link #getNode()} returns null.
*
* <p>
* Note that the Queue lock is already held when this method is called.
*
* @see #onRemoved()
*/
@Restricted(NoExternalUse.class)
@GuardedBy("hudson.model.Queue.lock")
/*package*/ void inflictMortalWound() {
setNumExecutors(0);
}
/**
* Called by {@link Jenkins} when this computer is removed.
*
@ -865,7 +848,7 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
* Calling path, *means protected by Queue.withLock
*
* Computer.doConfigSubmit -> Computer.replaceBy ->Jenkins.setNodes* ->Computer.setNode
* AbstractCIBase.updateComputerList->Computer.inflictMortalWound*
* AbstractCIBase.updateComputerList->Computer.setNumExecutors*
* AbstractCIBase.updateComputerList->AbstractCIBase.updateComputer* ->Computer.setNode
* AbstractCIBase.updateComputerList->AbstractCIBase.killComputer->Computer.kill
* Computer.constructor->Computer.setNode
@ -873,8 +856,9 @@ public /*transient*/ abstract class Computer extends Actionable implements Acces
*
* @param n number of executors
*/
@Restricted(NoExternalUse.class)
@GuardedBy("hudson.model.Queue.lock")
private void setNumExecutors(int n) {
public void setNumExecutors(int n) {
this.numExecutors = n;
final int diff = executors.size() - n;

View File

@ -54,7 +54,6 @@ import java.util.Collections;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Vector;
import java.util.concurrent.Callable;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.locks.ReadWriteLock;
import java.util.concurrent.locks.ReentrantReadWriteLock;
@ -365,9 +364,7 @@ public class Executor extends Thread implements ModelObject, IExecutor {
SubTask task;
// transition from idle to building.
// perform this state change as an atomic operation wrt other queue operations
task = Queue.withLock(new Callable<>() {
@Override
public SubTask call() throws Exception {
task = Queue.callWithLock(() -> {
if (!(owner instanceof Jenkins.MasterComputer)) {
if (!owner.isOnline()) {
resetWorkUnit("went off-line before the task's worker thread was ready to execute");
@ -384,21 +381,20 @@ public class Executor extends Thread implements ModelObject, IExecutor {
queue.onStartExecuting(Executor.this);
if (LOGGER.isLoggable(FINE))
LOGGER.log(FINE, getName() + " grabbed " + workUnit + " from queue");
SubTask task = workUnit.work;
Executable executable = task.createExecutable();
if (executable == null) {
String displayName = task instanceof Queue.Task ? ((Queue.Task) task).getFullDisplayName() : task.getDisplayName();
SubTask _task = workUnit.work;
Executable _executable = _task.createExecutable();
if (_executable == null) {
String displayName = _task instanceof Queue.Task qt ? qt.getFullDisplayName() : _task.getDisplayName();
LOGGER.log(WARNING, "{0} cannot be run (for example because it is disabled)", displayName);
}
lock.writeLock().lock();
try {
Executor.this.executable = executable;
executable = _executable;
} finally {
lock.writeLock().unlock();
}
workUnit.setExecutable(executable);
return task;
}
workUnit.setExecutable(_executable);
return _task;
});
Executable executable;
lock.readLock().lock();

View File

@ -26,9 +26,11 @@ package hudson.model;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.EnvVars;
import hudson.Extension;
import hudson.FilePath;
import hudson.Launcher;
import hudson.Util;
import hudson.model.queue.QueueListener;
import hudson.tasks.BuildWrapper;
import hudson.util.VariableResolver;
import java.io.File;
@ -39,12 +41,17 @@ import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.nio.file.Files;
import java.nio.file.Path;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import jenkins.model.Jenkins;
import jenkins.util.SystemProperties;
import org.apache.commons.fileupload2.core.FileItem;
import org.apache.commons.fileupload2.core.FileItemFactory;
import org.apache.commons.fileupload2.core.FileItemHeaders;
import org.apache.commons.fileupload2.core.FileItemHeadersProvider;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.FilenameUtils;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
@ -58,6 +65,9 @@ import org.kohsuke.stapler.StaplerResponse2;
* @author Kohsuke Kawaguchi
*/
public class FileParameterValue extends ParameterValue {
private static final Logger LOGGER = Logger.getLogger(FileParameterValue.class.getName());
private static final String FOLDER_NAME = "fileParameters";
private static final Pattern PROHIBITED_DOUBLE_DOT = Pattern.compile(".*[\\\\/]\\.\\.[\\\\/].*");
private static final long serialVersionUID = -143427023159076073L;
@ -71,13 +81,16 @@ public class FileParameterValue extends ParameterValue {
public static /* Script Console modifiable */ boolean ALLOW_FOLDER_TRAVERSAL_OUTSIDE_WORKSPACE =
SystemProperties.getBoolean(FileParameterValue.class.getName() + ".allowFolderTraversalOutsideWorkspace");
private final transient FileItem file;
private transient FileItem file;
/**
* The name of the originally uploaded file.
*/
private final String originalFileName;
private String tmpFileName;
/**
* Overrides the location in the build to place this file. Initially set to {@link #getName()}
* The location could be directly the filename or also a hierarchical path.
@ -106,6 +119,16 @@ public class FileParameterValue extends ParameterValue {
protected FileParameterValue(String name, FileItem file, String originalFileName) {
super(name);
try {
File dir = new File(Jenkins.get().getRootDir(), "fileParameterValueFiles");
Files.createDirectories(dir.toPath());
File tmp = Files.createTempFile(dir.toPath(), "jenkins", ".tmp").toFile();
FileUtils.copyInputStreamToFile(file.getInputStream(), tmp);
tmpFileName = tmp.getAbsolutePath();
} catch (IOException e) {
throw new RuntimeException(e);
}
this.file = file;
this.originalFileName = originalFileName;
setLocation(name);
@ -149,7 +172,17 @@ public class FileParameterValue extends ParameterValue {
return originalFileName;
}
private void createFile() {
if (file == null && tmpFileName != null) {
File tmp = new File(tmpFileName);
if (tmp.exists()) {
file = new FileItemImpl2(tmp);
}
}
}
public FileItem getFile2() {
createFile();
return file;
}
@ -163,11 +196,13 @@ public class FileParameterValue extends ParameterValue {
@Override
public BuildWrapper createBuildWrapper(AbstractBuild<?, ?> build) {
createFile();
return new BuildWrapper() {
@SuppressFBWarnings(value = "NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", justification = "TODO needs triage")
@SuppressFBWarnings(value = {"NP_NULL_ON_SOME_PATH_FROM_RETURN_VALUE", "PATH_TRAVERSAL_IN"}, justification = "TODO needs triage, False positive, the path is a temporary file")
@Override
public Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException {
if (location != null && !location.isEmpty() && file.getName() != null && !file.getName().isEmpty()) {
if (location != null && !location.isBlank() && file != null && file.getName() != null && !file.getName().isBlank()) {
try {
listener.getLogger().println("Copying file to " + location);
FilePath ws = build.getWorkspace();
if (ws == null) {
@ -185,9 +220,20 @@ public class FileParameterValue extends ParameterValue {
if (locationFilePath.exists() && !locationFilePath.isDirectory()) {
locationFilePath.delete();
}
locationFilePath.copyFrom(file);
locationFilePath.copyTo(new FilePath(getLocationUnderBuild(build)));
} finally {
if (tmpFileName != null) {
File tmp = new File(tmpFileName);
try {
Files.deleteIfExists(tmp.toPath());
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Unable to delete temporary file {0} for parameter {1} of job {2}",
new Object[]{tmp.getAbsolutePath(), getName(), build.getParent().getName()});
}
}
tmpFileName = null;
}
}
return new Environment() {};
}
@ -257,6 +303,36 @@ public class FileParameterValue extends ParameterValue {
return new File(build.getRootDir(), FOLDER_NAME);
}
@Extension
public static class CancelledQueueListener extends QueueListener {
@Override
public void onLeft(Queue.LeftItem li) {
if (li.isCancelled()) {
List<ParametersAction> actions = li.getActions(ParametersAction.class);
actions.forEach(a -> {
a.getAllParameters().stream()
.filter(p -> p instanceof FileParameterValue)
.map(p -> (FileParameterValue) p)
.forEach(this::deleteTmpFile);
});
}
}
@SuppressFBWarnings(value = "PATH_TRAVERSAL_IN", justification = "False positive, the path is a temporary file")
private void deleteTmpFile(FileParameterValue p) {
if (p.tmpFileName != null) {
File tmp = new File(p.tmpFileName);
try {
Files.deleteIfExists(tmp.toPath());
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Unable to delete temporary file {0} for parameter {1}",
new Object[]{tmp.getAbsolutePath(), p.getName()});
}
}
}
}
/**
* Default implementation from {@link File}.
*

View File

@ -48,7 +48,6 @@ import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import jenkins.model.Jenkins;
import jenkins.security.ExtendedReadRedaction;
import jenkins.security.NotReallyRoleSensitiveCallable;
import jenkins.util.xml.XMLUtils;
import org.kohsuke.stapler.StaplerRequest;
import org.kohsuke.stapler.StaplerRequest2;
@ -264,11 +263,7 @@ public abstract class ItemGroupMixIn {
// reload from the new config
final File rootDir = result.getRootDir();
result = Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<T, IOException>() {
@Override public T call() throws IOException {
return (T) Items.load(parent, rootDir);
}
});
result = Items.callWhileUpdatingByXml(() -> (T) Items.load(parent, rootDir));
result.onCopiedFrom(src);
add(result);
@ -294,11 +289,7 @@ public abstract class ItemGroupMixIn {
XMLUtils.safeTransform(new StreamSource(xml), new StreamResult(configXml));
// load it
TopLevelItem result = Items.whileUpdatingByXml(new NotReallyRoleSensitiveCallable<TopLevelItem, IOException>() {
@Override public TopLevelItem call() throws IOException {
return (TopLevelItem) Items.load(parent, dir);
}
});
TopLevelItem result = Items.callWhileUpdatingByXml(() -> (TopLevelItem) Items.load(parent, dir));
boolean hasCreatePermission = acl.getACL().hasCreatePermission2(Jenkins.getAuthentication2(), parent, result.getDescriptor());
boolean applicableIn = result.getDescriptor().isApplicableIn(parent);

View File

@ -53,6 +53,8 @@ import java.util.function.Predicate;
import jenkins.model.DirectlyModifiableTopLevelItemGroup;
import jenkins.model.Jenkins;
import jenkins.util.MemoryReductionUtil;
import jenkins.util.ThrowingCallable;
import jenkins.util.ThrowingRunnable;
import org.apache.commons.io.FileUtils;
import org.springframework.security.core.Authentication;
@ -116,6 +118,23 @@ public class Items {
}
};
/**
* Runs a block while making {@link #currentlyUpdatingByXml} be temporarily true.
* Use this when you are creating or changing an item.
* @param <T> an error type (may be {@link Error})
* @param runnable a block, typically running {@link #load} or {@link Item#onLoad}
* @throws T anything {@code runnable} throws
* @since 2.534
*/
public static <T extends Throwable> void runWhileUpdatingByXml(ThrowingRunnable<T> runnable) throws T {
updatingByXml.set(true);
try {
runnable.run();
} finally {
updatingByXml.set(false);
}
}
/**
* Runs a block while making {@link #currentlyUpdatingByXml} be temporarily true.
* Use this when you are creating or changing an item.
@ -124,6 +143,19 @@ public class Items {
* @param callable a block, typically running {@link #load} or {@link Item#onLoad}
* @return whatever {@code callable} returned
* @throws T anything {@code callable} throws
* @since 2.534
*/
public static <V, T extends Throwable> V callWhileUpdatingByXml(ThrowingCallable<V, T> callable) throws T {
updatingByXml.set(true);
try {
return callable.call();
} finally {
updatingByXml.set(false);
}
}
/**
* Prefer {@link #runWhileUpdatingByXml} or {@link #callWhileUpdatingByXml}.
* @since 1.546
*/
public static <V, T extends Throwable> V whileUpdatingByXml(Callable<V, T> callable) throws T {
@ -138,7 +170,8 @@ public class Items {
/**
* Checks whether we are in the middle of creating or configuring an item via XML.
* Used to determine the {@code newInstance} parameter for {@link Trigger#start}.
* @return true if {@link #whileUpdatingByXml} is currently being called, false for example when merely starting Jenkins or reloading from disk
* @return true if {@link #runWhileUpdatingByXml} or {@link #callWhileUpdatingByXml} is currently being called,
* false for example when merely starting Jenkins or reloading from disk
* @since 1.546
*/
public static boolean currentlyUpdatingByXml() {

View File

@ -89,6 +89,7 @@ import java.util.Set;
import java.util.SortedMap;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Stream;
import jenkins.model.BuildDiscarder;
import jenkins.model.BuildDiscarderProperty;
import jenkins.model.DirectlyModifiableTopLevelItemGroup;
@ -98,6 +99,12 @@ import jenkins.model.JenkinsLocationConfiguration;
import jenkins.model.ModelObjectWithChildren;
import jenkins.model.PeepholePermalink;
import jenkins.model.ProjectNamingStrategy;
import jenkins.model.Tab;
import jenkins.model.details.Detail;
import jenkins.model.details.DetailFactory;
import jenkins.model.details.DownstreamProjectsDetail;
import jenkins.model.details.ProjectNameDetail;
import jenkins.model.details.UpstreamProjectsDetail;
import jenkins.model.lazy.LazyBuildMixIn;
import jenkins.scm.RunWithSCM;
import jenkins.security.HexStringConfidentialKey;
@ -1689,4 +1696,30 @@ public abstract class Job<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
}
private static final HexStringConfidentialKey SERVER_COOKIE = new HexStringConfidentialKey(Job.class, "serverCookie", 16);
@Extension
public static final class BasicJobDetailFactory extends DetailFactory<Job> {
@Override
public Class<Job> type() {
return Job.class;
}
@NonNull @Override public List<? extends Detail> createFor(@NonNull Job target) {
return Stream.of(new UpstreamProjectsDetail(target), new DownstreamProjectsDetail(target), new ProjectNameDetail(target)).filter(e -> e.getIconClassName() != null).toList();
}
}
/**
* Retrieves the tabs for a given job
*/
@Restricted(NoExternalUse.class)
public List<Tab> getJobTabs() {
return getActions(Tab.class).stream().filter(e -> e.getIconFileName() != null).toList();
}
@Restricted(NoExternalUse.class)
public final ParametersDefinitionProperty getParametersDefinitionProperty() {
return getProperty(ParametersDefinitionProperty.class);
}
}

View File

@ -48,6 +48,7 @@ import java.util.TreeSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import jenkins.model.RunAction2;
import jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag;
import jenkins.util.SystemProperties;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
@ -208,6 +209,12 @@ public class ParametersAction implements RunAction2, Iterable<ParameterValue>, Q
@Override
public String getIconFileName() {
Boolean newBuildPageEnabled = new NewBuildPageUserExperimentalFlag().getFlagValue();
if (newBuildPageEnabled) {
return null;
}
return "symbol-parameters";
}

View File

@ -85,6 +85,7 @@ import java.nio.channels.ClosedByInterruptException;
import java.nio.file.Files;
import java.nio.file.InvalidPathException;
import java.nio.file.StandardCopyOption;
import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
@ -122,6 +123,8 @@ import jenkins.security.stapler.StaplerAccessibleType;
import jenkins.util.AtmostOneTaskExecutor;
import jenkins.util.Listeners;
import jenkins.util.SystemProperties;
import jenkins.util.ThrowingCallable;
import jenkins.util.ThrowingRunnable;
import jenkins.util.Timer;
import net.jcip.annotations.GuardedBy;
import org.jenkinsci.remoting.RoleChecker;
@ -1274,6 +1277,22 @@ public class Queue extends ResourceController implements Saveable {
* Some operations require to be performed with the {@link Queue} lock held. Use one of these methods rather
* than locking directly on Queue in order to allow for future refactoring.
* @param runnable the operation to perform.
* @throws T if the runnable throws an exception.
* @since 2.534
*/
public static <T extends Throwable> void runWithLock(ThrowingRunnable<T> runnable) throws T {
final Jenkins jenkins = Jenkins.getInstanceOrNull();
// TODO confirm safe to assume non-null and use getInstance()
final Queue queue = jenkins == null ? null : jenkins.getQueue();
if (queue == null) {
runnable.run();
} else {
queue._runWithLock(runnable);
}
}
/**
* Prefer {@link #runWithLock}.
* @since 1.592
*/
public static void withLock(Runnable runnable) {
@ -1296,6 +1315,21 @@ public class Queue extends ResourceController implements Saveable {
* @param <T> the type of exception.
* @return the result of the callable.
* @throws T the exception of the callable
* @since 2.534
*/
public static <V, T extends Throwable> V callWithLock(ThrowingCallable<V, T> callable) throws T {
final Jenkins jenkins = Jenkins.getInstanceOrNull();
// TODO confirm safe to assume non-null and use getInstance()
final Queue queue = jenkins == null ? null : jenkins.getQueue();
if (queue == null) {
return callable.call();
} else {
return queue._callWithLock(callable);
}
}
/**
* Prefer {@link #callWithLock}.
* @since 1.592
*/
public static <V, T extends Throwable> V withLock(hudson.remoting.Callable<V, T> callable) throws T {
@ -1310,13 +1344,7 @@ public class Queue extends ResourceController implements Saveable {
}
/**
* Some operations require to be performed with the {@link Queue} lock held. Use one of these methods rather
* than locking directly on Queue in order to allow for future refactoring.
*
* @param callable the operation to perform.
* @param <V> the type of return value
* @return the result of the callable.
* @throws Exception if the callable throws an exception.
* Prefer {@link #callWithLock}.
* @since 1.592
*/
public static <V> V withLock(java.util.concurrent.Callable<V> callable) throws Exception {
@ -1348,6 +1376,26 @@ public class Queue extends ResourceController implements Saveable {
return queue._tryWithLock(runnable);
}
}
/**
* Invokes the supplied {@link Runnable} if the {@link Queue} lock was obtained within the given timeout.
*
* @param runnable the operation to perform.
* @return {@code true} if the lock was acquired within the timeout and the operation was performed.
* @since 2.529
*/
public static boolean tryWithLock(Runnable runnable, Duration timeout) throws InterruptedException {
final Jenkins jenkins = Jenkins.getInstanceOrNull();
// TODO confirm safe to assume non-null and use getInstance()
final Queue queue = jenkins == null ? null : jenkins.getQueue();
if (queue == null) {
runnable.run();
return true;
} else {
return queue._tryWithLock(runnable, timeout);
}
}
/**
* Wraps a {@link Runnable} with the {@link Queue} lock held.
*
@ -1399,6 +1447,25 @@ public class Queue extends ResourceController implements Saveable {
condition.signalAll();
}
/**
* Some operations require to be performed with the {@link Queue} lock held. Use one of these methods rather
* than locking directly on Queue in order to allow for future refactoring.
*
* @param runnable the operation to perform.
* @param <T> the type of exception.
* @throws T the exception of the runnable
* @since 2.534
*/
@Override
protected <T extends Throwable> void _runWithLock(ThrowingRunnable<T> runnable) throws T {
lock.lock();
try {
runnable.run();
} finally {
lock.unlock();
}
}
/**
* Some operations require to be performed with the {@link Queue} lock held. Use one of these methods rather
* than locking directly on Queue in order to allow for future refactoring.
@ -1435,6 +1502,47 @@ public class Queue extends ResourceController implements Saveable {
}
}
/**
* Invokes the supplied {@link Runnable} if the {@link Queue} lock was obtained within the given timeout
*
* @param runnable the operation to perform.
* @return {@code true} if the lock was acquired within the timeout and the operation was performed.
* @since 2.529
*/
protected boolean _tryWithLock(Runnable runnable, Duration timeout) throws InterruptedException {
if (lock.tryLock(timeout.toNanos(), TimeUnit.NANOSECONDS)) {
try {
runnable.run();
} finally {
lock.unlock();
}
return true;
} else {
return false;
}
}
/**
* Some operations require to be performed with the {@link Queue} lock held. Use one of these methods rather
* than locking directly on Queue in order to allow for future refactoring.
*
* @param callable the operation to perform.
* @param <V> the type of return value
* @param <T> the type of exception.
* @return the result of the callable.
* @throws T the exception of the callable
* @since 2.534
*/
@Override
protected <V, T extends Throwable> V _callWithLock(ThrowingCallable<V, T> callable) throws T {
lock.lock();
try {
return callable.call();
} finally {
lock.unlock();
}
}
/**
* Some operations require to be performed with the {@link Queue} lock held. Use one of these methods rather
* than locking directly on Queue in order to allow for future refactoring.
@ -1573,7 +1681,13 @@ public class Queue extends ResourceController implements Saveable {
updateSnapshot();
}
} else {
p.setCauseOfBlockage(causeOfBlockage);
if (causeOfBlockage.isFatal()) {
cancel(p);
} else {
p.leave(this);
new BlockedItem(p, causeOfBlockage).enter(this);
updateSnapshot();
}
}
}
}
@ -1586,10 +1700,9 @@ public class Queue extends ResourceController implements Saveable {
LOGGER.log(Level.FINEST, "Finished moving all ready items from queue.");
break; // finished moving all ready items from queue
}
top.leave(this);
CauseOfBlockage causeOfBlockage = getCauseOfBlockageForItem(top);
if (causeOfBlockage == null) {
top.leave(this);
// ready to be executed immediately
Runnable r = makeBuildable(new BuildableItem(top));
String topTaskDisplayName = LOGGER.isLoggable(Level.FINEST) ? top.task.getFullDisplayName() : null;
@ -1601,11 +1714,16 @@ public class Queue extends ResourceController implements Saveable {
new BlockedItem(top, CauseOfBlockage.fromMessage(Messages._Queue_HudsonIsAboutToShutDown())).enter(this);
}
} else {
if (causeOfBlockage.isFatal()) {
cancel(top);
} else {
top.leave(this);
// this can't be built now because another build is in progress
// set this project aside.
new BlockedItem(top, causeOfBlockage).enter(this);
}
}
}
if (s != null) {
try {
@ -1626,12 +1744,16 @@ public class Queue extends ResourceController implements Saveable {
// one last check to make sure this build is not blocked.
CauseOfBlockage causeOfBlockage = getCauseOfBlockageForItem(p);
if (causeOfBlockage != null) {
if (causeOfBlockage.isFatal()) {
cancel(p);
} else {
p.leave(this);
new BlockedItem(p, causeOfBlockage).enter(this);
LOGGER.log(Level.FINE, "Catching that {0} is blocked in the last minute", p);
// JENKINS-28926 we have moved an unblocked task into the blocked state, update snapshot
// so that other buildables which might have been blocked by this can see the state change
updateSnapshot();
}
continue;
}
@ -2617,15 +2739,7 @@ public class Queue extends ResourceController implements Saveable {
* {@link Item} in the {@link Queue#blockedProjects} stage.
*/
public final class BlockedItem extends NotWaitingItem {
private transient CauseOfBlockage causeOfBlockage = null;
public BlockedItem(WaitingItem wi) {
this(wi, null);
}
public BlockedItem(NotWaitingItem ni) {
this(ni, null);
}
private final transient CauseOfBlockage causeOfBlockage;
BlockedItem(WaitingItem wi, CauseOfBlockage causeOfBlockage) {
super(wi);
@ -2637,10 +2751,6 @@ public class Queue extends ResourceController implements Saveable {
this.causeOfBlockage = causeOfBlockage;
}
void setCauseOfBlockage(CauseOfBlockage causeOfBlockage) {
this.causeOfBlockage = causeOfBlockage;
}
@Restricted(NoExternalUse.class)
public boolean isCauseOfBlockageNull() {
if (causeOfBlockage == null) {

View File

@ -31,9 +31,9 @@ import java.util.AbstractCollection;
import java.util.Collection;
import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.Callable;
import java.util.concurrent.CopyOnWriteArraySet;
import jenkins.security.NotReallyRoleSensitiveCallable;
import jenkins.util.ThrowingCallable;
import jenkins.util.ThrowingRunnable;
/**
* Controls mutual exclusion of {@link ResourceList}.
@ -82,9 +82,7 @@ public class ResourceController {
*/
public void execute(@NonNull Runnable task, final ResourceActivity activity) throws InterruptedException {
final ResourceList resources = activity.getResourceList();
_withLock(new NotReallyRoleSensitiveCallable<Void, InterruptedException>() {
@Override
public Void call() throws InterruptedException {
_runWithLock(() -> {
while (inUse.isCollidingWith(resources)) {
// TODO revalidate the resource list after re-acquiring lock, for now we just let the build fail
_await();
@ -93,21 +91,16 @@ public class ResourceController {
// we have a go
inProgress.add(activity);
inUse = ResourceList.union(inUse, resources);
return null;
}
});
try {
task.run();
} finally {
// TODO if AsynchronousExecution, do that later
_withLock(new Runnable() {
@Override
public void run() {
_runWithLock(() -> {
inProgress.remove(activity);
inUse = ResourceList.union(resourceView);
_signalAll();
}
});
}
}
@ -122,16 +115,7 @@ public class ResourceController {
* gets to call {@link #execute(Runnable, ResourceActivity)}.
*/
public boolean canRun(final ResourceList resources) {
try {
return _withLock(new Callable<>() {
@Override
public Boolean call() {
return !inUse.isCollidingWith(resources);
}
});
} catch (Exception e) {
throw new IllegalStateException("Inner callable does not throw exception", e);
}
return _callWithLock(() -> !inUse.isCollidingWith(resources));
}
/**
@ -143,16 +127,7 @@ public class ResourceController {
* This method is used for reporting what's causing the blockage.
*/
public Resource getMissingResource(final ResourceList resources) {
try {
return _withLock(new Callable<>() {
@Override
public Resource call() {
return resources.getConflict(inUse);
}
});
} catch (Exception e) {
throw new IllegalStateException("Inner callable does not throw exception", e);
}
return _callWithLock(() -> resources.getConflict(inUse));
}
/**
@ -177,12 +152,24 @@ public class ResourceController {
notifyAll();
}
protected <T extends Throwable> void _runWithLock(ThrowingRunnable<T> runnable) throws T {
synchronized (this) {
runnable.run();
}
}
protected void _withLock(Runnable runnable) {
synchronized (this) {
runnable.run();
}
}
protected <V, T extends Throwable> V _callWithLock(ThrowingCallable<V, T> callable) throws T {
synchronized (this) {
return callable.call();
}
}
protected <V> V _withLock(java.util.concurrent.Callable<V> callable) throws Exception {
synchronized (this) {
return callable.call();

View File

@ -120,6 +120,8 @@ import jenkins.model.Jenkins;
import jenkins.model.JenkinsLocationConfiguration;
import jenkins.model.RunAction2;
import jenkins.model.StandardArtifactManager;
import jenkins.model.Tab;
import jenkins.model.details.CauseDetail;
import jenkins.model.details.Detail;
import jenkins.model.details.DetailFactory;
import jenkins.model.details.DurationDetail;
@ -385,7 +387,7 @@ public abstract class Run<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
*/
@SuppressWarnings("deprecation")
protected void onLoad() {
for (Action a : getAllActions()) {
for (Action a : getActions()) {
if (a instanceof RunAction2) {
try {
((RunAction2) a).onLoad(this);
@ -2706,7 +2708,15 @@ public abstract class Run<JobT extends Job<JobT, RunT>, RunT extends Run<JobT, R
}
@NonNull @Override public List<? extends Detail> createFor(@NonNull Run target) {
return List.of(new TimestampDetail(target), new DurationDetail(target));
return List.of(new CauseDetail(target), new TimestampDetail(target), new DurationDetail(target));
}
}
/**
* Retrieves the tabs for a given run
*/
@Restricted(NoExternalUse.class)
public List<Tab> getRunTabs() {
return getActions(Tab.class).stream().filter(e -> e.getIconFileName() != null).toList();
}
}

View File

@ -114,7 +114,7 @@ public class TimeZoneProperty extends UserProperty {
@Override
public @NonNull UserPropertyCategory getUserPropertyCategory() {
return UserPropertyCategory.get(UserPropertyCategory.Account.class);
return UserPropertyCategory.get(UserPropertyCategory.Preferences.class);
}
}

View File

@ -89,6 +89,7 @@ import javax.xml.transform.TransformerException;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.stream.StreamResult;
import javax.xml.transform.stream.StreamSource;
import jenkins.model.Badgeable;
import jenkins.model.Jenkins;
import jenkins.model.ModelObjectWithChildren;
import jenkins.model.ModelObjectWithContextMenu;
@ -144,7 +145,7 @@ import org.xml.sax.SAXException;
* @see ViewGroup
*/
@ExportedBean
public abstract class View extends AbstractModelObject implements AccessControlled, Describable<View>, ExtensionPoint, Saveable, ModelObjectWithChildren, DescriptorByNameOwner, HasWidgets {
public abstract class View extends AbstractModelObject implements AccessControlled, Describable<View>, ExtensionPoint, Saveable, ModelObjectWithChildren, DescriptorByNameOwner, HasWidgets, Badgeable {
/**
* Container of this view. Set right after the construction
@ -368,6 +369,19 @@ public abstract class View extends AbstractModelObject implements AccessControll
return getViewName();
}
/**
* Returns the icon file name for this action.
* <p>
* Only displays if {@link jenkins.model.experimentalflags.NewDashboardPageUserExperimentalFlag} is enabled.
* <p>
* This behaves similarly to {@link Action#getIconFileName()}, except that
* returning {@code null} here does not hide the associated view; the view
* will still be displayed even when this method returns {@code null}.
*/
public String getIconFileName() {
return null;
}
public String getNewPronoun() {
return AlternativeUiTextProvider.get(NEW_PRONOUN, this, Messages.AbstractItem_Pronoun());
}
@ -1236,6 +1250,12 @@ public abstract class View extends AbstractModelObject implements AccessControll
}
}
// for Jelly
@Restricted(DoNotUse.class)
public boolean isMyViewsProperty() {
return getOwner() instanceof MyViewsProperty;
}
public static class PropertyList extends DescribableList<ViewProperty, ViewPropertyDescriptor> {
private PropertyList(View owner) {
super(owner);

View File

@ -35,6 +35,14 @@ public abstract class CauseOfBlockage {
*/
public abstract String getShortDescription();
/**
* @return {@code true} if the blockage is fatal and the item should be removed from the queue.
* @since 2.532
*/
public boolean isFatal() {
return false;
}
/**
* Report a line to the listener about this cause.
*/

View File

@ -41,7 +41,6 @@ import java.util.function.BiFunction;
import java.util.stream.Collectors;
import jenkins.model.Jenkins;
import jenkins.security.NonSerializableSecurityContext;
import jenkins.security.NotReallyRoleSensitiveCallable;
import org.acegisecurity.acls.sid.PrincipalSid;
import org.acegisecurity.acls.sid.Sid;
import org.kohsuke.accmod.Restricted;
@ -438,10 +437,6 @@ public abstract class ACL {
}
/**
* Safer variant of {@link #impersonate2(Authentication)} that does not require a finally-block.
* @param auth authentication, such as {@link #SYSTEM2}
* @param body an action to run with this alternate authentication in effect (try {@link NotReallyRoleSensitiveCallable})
* @since 2.266
* @deprecated use try with resources and {@link #as2(Authentication)}
*/
@Deprecated
@ -455,7 +450,7 @@ public abstract class ACL {
}
/**
* @deprecated use {@link #impersonate2(Authentication, Callable)}
* @deprecated use try with resources and {@link #as2(Authentication)}
* @since 1.587
*/
@Deprecated

View File

@ -67,9 +67,7 @@ public class ComputerRetentionWork extends AperiodicWork {
protected void doAperiodicRun() {
final long startRun = System.currentTimeMillis();
for (final Computer c : Jenkins.get().getComputers()) {
Queue.withLock(new Runnable() {
@Override
public void run() {
Queue.runWithLock(() -> {
Node n = c.getNode();
if (n != null && n.isHoldOffLaunchUntilSave())
return;
@ -78,7 +76,6 @@ public class ComputerRetentionWork extends AperiodicWork {
final long waitInMins = Math.max(0, Math.min(60, c.getRetentionStrategy().check(c)));
nextCheck.put(c, startRun + TimeUnit.MINUTES.toMillis(waitInMins));
}
}
});
}
}

View File

@ -101,7 +101,7 @@ public abstract class RetentionStrategy<T extends Computer> implements Describab
* @since 1.275
*/
public void start(final @NonNull T c) {
Queue.withLock((Runnable) () -> check(c));
Queue.runWithLock(() -> check(c));
}
/**

View File

@ -211,28 +211,22 @@ public class SimpleScheduledRetentionStrategy extends RetentionStrategy<SlaveCom
new Object[]{c.getName()});
return 0;
} else if (c.isIdle() && c.isAcceptingTasks()) {
Queue.withLock(new Runnable() {
@Override
public void run() {
Queue.runWithLock(() -> {
if (c.isIdle()) {
LOGGER.log(INFO, "Disconnecting computer {0} as it has finished its scheduled uptime",
new Object[]{c.getName()});
c.disconnect(OfflineCause
.create(Messages._SimpleScheduledRetentionStrategy_FinishedUpTime()));
}
}
});
} else if (c.isIdle() && !c.isAcceptingTasks()) {
Queue.withLock(new Runnable() {
@Override
public void run() {
Queue.runWithLock(() -> {
if (c.isIdle()) {
LOGGER.log(INFO, "Disconnecting computer {0} as it has finished all jobs running when "
+ "it completed its scheduled uptime", new Object[]{c.getName()});
c.disconnect(OfflineCause
.create(Messages._SimpleScheduledRetentionStrategy_FinishedUpTime()));
}
}
});
}
} else {

View File

@ -625,6 +625,7 @@ public class SlaveComputer extends Computer {
* @param listener Channel event listener to be attached (if not {@code null})
* @since 1.444
*/
@SuppressFBWarnings(value = "NN_NAKED_NOTIFY", justification = "False positive, the warning isn't for this scenario")
public void setChannel(@NonNull Channel channel,
@CheckForNull OutputStream launchLog,
@CheckForNull Channel.Listener listener) throws IOException, InterruptedException {
@ -916,12 +917,7 @@ public class SlaveComputer extends Computer {
protected void kill() {
super.kill();
closeChannel();
try {
log.close();
} catch (IOException x) {
LOGGER.log(Level.WARNING, "Failed to close agent log", x);
}
closeLog();
try {
Util.deleteRecursive(getLogDir());
} catch (IOException ex) {
@ -929,6 +925,15 @@ public class SlaveComputer extends Computer {
}
}
@Restricted(NoExternalUse.class)
public void closeLog() {
try {
log.close();
} catch (IOException x) {
LOGGER.log(Level.WARNING, "Failed to close agent log", x);
}
}
@Override
public RetentionStrategy getRetentionStrategy() {
Slave n = getNode();
@ -959,6 +964,7 @@ public class SlaveComputer extends Computer {
@Override
@SuppressFBWarnings(value = "UR_UNINIT_READ_CALLED_FROM_SUPER_CONSTRUCTOR", justification = "TODO needs triage")
@SuppressWarnings("unchecked")
protected void setNode(final Node node) {
super.setNode(node);
launcher = grabLauncher(node);
@ -967,13 +973,8 @@ public class SlaveComputer extends Computer {
// "constructed==null" test is an ugly hack to avoid launching before the object is fully
// constructed.
if (constructed != null) {
if (node instanceof Slave) {
Queue.withLock(new Runnable() {
@Override
public void run() {
((Slave) node).getRetentionStrategy().check(SlaveComputer.this);
}
});
if (node instanceof Slave slave) {
Queue.runWithLock(() -> slave.getRetentionStrategy().check(SlaveComputer.this));
} else {
connect(false);
}

View File

@ -32,7 +32,6 @@ import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Job;
import hudson.model.Run;
import hudson.util.RunList;
import java.io.IOException;
import java.util.Arrays;
import java.util.Calendar;
@ -165,20 +164,12 @@ public class LogRotator extends BuildDiscarder {
Run lstb = removeLastBuild ? null : job.getLastStableBuild();
if (numToKeep != -1) {
// Note that RunList.size is deprecated, and indeed here we are loading all the builds of the job.
// However we would need to load the first numToKeep anyway, just to skip over them;
// and we would need to load the rest anyway, to delete them.
// (Using RunMap.headMap would not suffice, since we do not know if some recent builds have been deleted for other reasons,
// so simply subtracting numToKeep from the currently last build number might cause us to delete too many.)
RunList<? extends Run<?, ?>> builds = job.getBuilds();
for (Run r : builds.subList(Math.min(builds.size(), numToKeep), builds.size())) {
if (shouldKeepRun(r, lsb, lstb)) {
continue;
}
job.getBuildsAsMap().entrySet().stream().skip(numToKeep).map(Map.Entry::getValue)
.filter(r -> !shouldKeepRun(r, lsb, lstb)).forEach(r -> {
LOGGER.log(FINE, "{0} is to be removed", r);
try { r.delete(); }
catch (IOException ex) { exceptionMap.computeIfAbsent(r, key -> new HashSet<>()).add(ex); }
}
});
}
if (daysToKeep != -1) {
@ -199,15 +190,12 @@ public class LogRotator extends BuildDiscarder {
}
if (artifactNumToKeep != null && artifactNumToKeep != -1) {
RunList<? extends Run<?, ?>> builds = job.getBuilds();
for (Run r : builds.subList(Math.min(builds.size(), artifactNumToKeep), builds.size())) {
if (shouldKeepRun(r, lsb, lstb)) {
continue;
}
job.getBuildsAsMap().entrySet().stream().skip(artifactNumToKeep).map(Map.Entry::getValue)
.filter(r -> !shouldKeepRun(r, lsb, lstb)).forEach(r -> {
LOGGER.log(FINE, "{0} is to be purged of artifacts", r);
try { r.deleteArtifacts(); }
catch (IOException ex) { exceptionMap.computeIfAbsent(r, key -> new HashSet<>()).add(ex); }
}
});
}
if (artifactDaysToKeep != null && artifactDaysToKeep != -1) {

View File

@ -633,31 +633,4 @@ public abstract class FormFieldValidator {
error(errorMessage);
}
}
/**
* Verifies that the {@code value} parameter is an integer 0.
*
* @since 1.282
* @deprecated as of 1.294
* Use {@link FormValidation#validateNonNegativeInteger(String)}
*/
@Deprecated
public static class NonNegativeInteger extends FormFieldValidator {
public NonNegativeInteger() {
super(null);
}
@Override
protected void check() throws IOException, ServletException {
try {
String value = request.getParameter("value");
if (Integer.parseInt(value) < 0)
error(hudson.model.Messages.Hudson_NotAPositiveNumber());
else
ok();
} catch (NumberFormatException e) {
error(hudson.model.Messages.Hudson_NotANumber());
}
}
}
}

View File

@ -25,7 +25,6 @@
package hudson.util;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import hudson.ExtensionPoint;
import hudson.security.SecurityRealm;
import io.jenkins.servlet.FilterWrapper;
import io.jenkins.servlet.ServletExceptionWrapper;
@ -51,19 +50,16 @@ import org.kohsuke.accmod.restrictions.NoExternalUse;
import org.kohsuke.stapler.CompatibleFilter;
/**
* Servlet {@link Filter} that chains multiple {@link Filter}s, provided by plugins
*
* Servlet {@link Filter} that chains multiple {@link Filter}s, provided by plugins.
* <p>
* While this class by itself is not an extension point, I'm marking this class
* as an extension point so that this class will be more discoverable.
*
* In most cases you should rather use {@link HttpServletFilter}.
* <p>
* {@link SecurityRealm} that wants to contribute {@link Filter}s should first
* check if {@link SecurityRealm#createFilter(FilterConfig)} is more appropriate.
*
* @see SecurityRealm
*/
public final class PluginServletFilter implements CompatibleFilter, ExtensionPoint {
public final class PluginServletFilter implements CompatibleFilter {
private final List<Filter> list = new CopyOnWriteArrayList<>();
private /*almost final*/ FilterConfig config;

View File

@ -17,7 +17,6 @@ Lesser General Public License for more details.
package hudson.util.jna;
import com.sun.jna.ptr.IntByReference;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import java.nio.charset.StandardCharsets;
import java.util.Collection;
import java.util.TreeMap;
@ -90,7 +89,6 @@ public class RegistryKey implements AutoCloseable {
return convertBufferToInt(getValue(valueName));
}
@SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH", justification = "TODO needs triage")
private byte[] getValue(String valueName) {
IntByReference pType, lpcbData;
byte[] lpData = new byte[1];
@ -151,7 +149,6 @@ public class RegistryKey implements AutoCloseable {
/**
* Does a specified value exist?
*/
@SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH", justification = "TODO needs triage")
public boolean valueExists(String name) {
IntByReference pType, lpcbData;
byte[] lpData = new byte[1];
@ -226,7 +223,6 @@ public class RegistryKey implements AutoCloseable {
*
* @return TreeMap with name and value pairs
*/
@SuppressFBWarnings(value = "SF_SWITCH_FALLTHROUGH", justification = "TODO needs triage")
public TreeMap<String, Object> getValues() {
int dwIndex, result;
char[] lpValueName;

View File

@ -34,8 +34,7 @@ import org.jenkinsci.Symbol;
*
* @author Kohsuke Kawaguchi
*/
@Extension(optional = true) @Symbol("hsErrPid")
// TODO why would an extension using a built-in extension point need to be marked optional?
@Extension @Symbol("hsErrPid")
public class HsErrPidList extends AdministrativeMonitor {
/**
* hs_err_pid files that we think belong to us.

View File

@ -26,8 +26,19 @@ package jenkins.health;
import hudson.Extension;
import hudson.ExtensionList;
import hudson.FilePath;
import hudson.model.InvisibleAction;
import hudson.model.UnprotectedRootAction;
import hudson.util.RemotingDiagnostics;
import java.io.IOException;
import java.time.Duration;
import java.util.Timer;
import java.util.TimerTask;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import jenkins.util.JenkinsJVM;
import jenkins.util.SystemProperties;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
import org.kohsuke.accmod.Restricted;
@ -42,6 +53,10 @@ import org.kohsuke.stapler.json.JsonHttpResponse;
@Restricted(NoExternalUse.class)
public final class HealthCheckAction extends InvisibleAction implements UnprotectedRootAction {
private static final Logger LOGGER = Logger.getLogger(HealthCheckAction.class.getName());
private static final Duration THRESHOLD_TIMEOUT = SystemProperties.getDuration(
HealthCheckAction.class.getName() + ".thresholdTimeout", Duration.ofSeconds(10));
@Override
public String getUrlName() {
return "health";
@ -50,6 +65,26 @@ public final class HealthCheckAction extends InvisibleAction implements Unprotec
public HttpResponse doIndex() {
boolean success = true;
var failing = new JSONArray();
var watchdog = new Timer("HealthCheckActionWatchdog", true);
watchdog.schedule(new TimerTask() {
@Override
public void run() {
if (JenkinsJVM.isJenkinsJVM()) {
try {
var threadDump = RemotingDiagnostics.getThreadDump(FilePath.localChannel);
LOGGER.severe(() -> "health check did not complete in timely fashion:\n\n"
+ threadDump.values().stream().collect(Collectors.joining()).trim());
} catch (IOException e) {
LOGGER.log(Level.WARNING, "Failed to get thread dump during slow health check", e);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
}
}
}
}, THRESHOLD_TIMEOUT.toMillis());
try {
for (var healthCheck : ExtensionList.lookup(HealthCheck.class)) {
var check = healthCheck.check();
success &= check;
@ -62,5 +97,8 @@ public final class HealthCheckAction extends InvisibleAction implements Unprotec
payload = payload.element("failures", failing);
}
return new JsonHttpResponse(payload, success ? 200 : 503);
} finally {
watchdog.cancel();
}
}
}

View File

@ -1,7 +1,7 @@
/*
* The MIT License
*
* Copyright (c) 2018 CloudBees, Inc.
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
@ -22,28 +22,29 @@
* THE SOFTWARE.
*/
package jenkins.util.java;
package jenkins.job;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.api.Assumptions.assumeFalse;
import static org.junit.jupiter.api.Assumptions.assumeTrue;
import hudson.model.Actionable;
import jenkins.model.Tab;
import org.junit.jupiter.api.Test;
import org.jvnet.hudson.test.For;
public class OverviewTab extends Tab {
@For(JavaUtils.class)
class JavaUtilsTest {
@Test
void verifyJava8() {
assumeTrue(System.getProperty("java.version").startsWith("1."), "Test is for Java 8 only");
assertFalse(JavaUtils.isRunningWithPostJava8(), "isRunningWithPostJava8() should return false on Java 8 and below");
public OverviewTab(Actionable object) {
super(object);
}
@Test
void verifyPostJava8() {
assumeFalse(System.getProperty("java.version").startsWith("1."), "Test is for Java 9+ only");
assertTrue(JavaUtils.isRunningWithPostJava8(), "isRunningWithPostJava8() should return true on Java 9 and above");
@Override
public String getIconFileName() {
return "symbol-overview";
}
@Override
public String getDisplayName() {
return "Overview";
}
@Override
public String getUrlName() {
return null;
}
}

View File

@ -0,0 +1,55 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.job;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Job;
import java.util.Collection;
import java.util.Collections;
import jenkins.model.Tab;
import jenkins.model.TransientActionFactory;
import jenkins.model.experimentalflags.NewJobPageUserExperimentalFlag;
@Extension(ordinal = Integer.MAX_VALUE)
public class OverviewTabFactory extends TransientActionFactory<Job> {
@Override
public Class<Job> type() {
return Job.class;
}
@NonNull
@Override
public Collection<? extends Tab> createFor(@NonNull Job target) {
boolean isExperimentalUiEnabled = new NewJobPageUserExperimentalFlag().getFlagValue();
if (!isExperimentalUiEnabled) {
return Collections.emptySet();
}
return Collections.singleton(new OverviewTab(target));
}
}

View File

@ -0,0 +1,51 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.model;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import jenkins.management.Badge;
/**
* Represents an entity that can display a {@link Badge}.
* <p>
* Implementations of this interface may provide a badge
* to be shown on an associated action or UI element.
* If no badge is provided, {@code null} may be returned.
* </p>
*
* @since 2.532
*/
public interface Badgeable {
/**
* A {@link Badge} shown on the action.
*
* @return badge or {@code null} if no badge should be shown.
* @since 2.532
*/
default @CheckForNull Badge getBadge() {
return null;
}
}

View File

@ -1,39 +0,0 @@
package jenkins.model;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import hudson.Extension;
import hudson.RestrictedSince;
import hudson.model.RootAction;
import org.jenkinsci.Symbol;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
/**
* Redirects from /configureClouds to /cloud/.
* Previously was the form for clouds.
* @deprecated Replaced by {@link jenkins.agents.CloudsLink} and {@link jenkins.agents.CloudSet}.
*/
@Extension
@Symbol("cloud")
@Restricted(NoExternalUse.class)
@RestrictedSince("2.205")
@Deprecated
public class GlobalCloudConfiguration implements RootAction {
@CheckForNull
@Override
public String getIconFileName() {
return null;
}
@CheckForNull
@Override
public String getDisplayName() {
return Messages.GlobalCloudConfiguration_DisplayName();
}
@Override
public String getUrlName() {
return "configureClouds";
}
}

View File

@ -34,6 +34,7 @@ import static hudson.init.InitMilestone.EXTENSIONS_AUGMENTED;
import static hudson.init.InitMilestone.JOB_CONFIG_ADAPTED;
import static hudson.init.InitMilestone.JOB_LOADED;
import static hudson.init.InitMilestone.PLUGINS_PREPARED;
import static hudson.init.InitMilestone.SYSTEM_CONFIG_ADAPTED;
import static hudson.init.InitMilestone.SYSTEM_CONFIG_LOADED;
import static jakarta.servlet.http.HttpServletResponse.SC_BAD_REQUEST;
import static jakarta.servlet.http.HttpServletResponse.SC_NOT_FOUND;
@ -41,6 +42,7 @@ import static java.util.logging.Level.FINE;
import static java.util.logging.Level.INFO;
import static java.util.logging.Level.SEVERE;
import static java.util.logging.Level.WARNING;
import static jenkins.model.Messages.Hudson_Computer_IncorrectNumberOfExecutors;
import com.google.common.annotations.VisibleForTesting;
import com.google.inject.Inject;
@ -176,6 +178,7 @@ import hudson.slaves.NodePropertyDescriptor;
import hudson.slaves.NodeProvisioner;
import hudson.slaves.OfflineCause;
import hudson.slaves.RetentionStrategy;
import hudson.slaves.SlaveComputer;
import hudson.tasks.BuildWrapper;
import hudson.tasks.Builder;
import hudson.tasks.Publisher;
@ -3496,7 +3499,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
List<Handle> loadJobs = new ArrayList<>();
for (final File subdir : subdirs) {
loadJobs.add(g.requires(loadJenkins).attains(JOB_LOADED).notFatal().add("Loading item " + subdir.getName(), new Executable() {
loadJobs.add(g.requires(loadJenkins).requires(SYSTEM_CONFIG_ADAPTED).attains(JOB_LOADED).notFatal().add("Loading item " + subdir.getName(), new Executable() {
@Override
public void run(Reactor session) throws Exception {
if (!Items.getConfigFile(subdir).exists()) {
@ -3775,7 +3778,10 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
for (Computer c : getComputersCollection()) {
try {
c.interrupt();
killComputer(c);
c.setNumExecutors(0);
if (Main.isUnitTest && c instanceof SlaveComputer sc) {
sc.closeLog(); // help TemporaryDirectoryAllocator.dispose esp. on Windows
}
pending.add(c.disconnect(null));
} catch (OutOfMemoryError e) {
// we should just propagate this, no point trying to log
@ -3950,9 +3956,15 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
if (!pending.isEmpty()) {
LOGGER.log(Main.isUnitTest ? Level.FINE : Level.INFO, "Waiting for node disconnection completion");
}
long end = System.nanoTime() + Duration.ofSeconds(10).toNanos();
for (Future<?> f : pending) {
try {
f.get(10, TimeUnit.SECONDS); // if clean up operation didn't complete in time, we fail the test
long remaining = end - System.nanoTime();
if (remaining <= 0) {
LOGGER.warning("Ran out of time waiting for agents to disconnect");
break;
}
f.get(remaining, TimeUnit.NANOSECONDS);
} catch (InterruptedException e) {
Thread.currentThread().interrupt();
break; // someone wants us to die now. quick!
@ -4090,28 +4102,6 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
return d.configure(req, js);
}
/**
* Accepts submission from the node configuration page.
*/
@POST
public synchronized void doConfigExecutorsSubmit(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException, FormException {
checkPermission(ADMINISTER);
try (BulkChange bc = new BulkChange(this)) {
JSONObject json = req.getSubmittedForm();
ExtensionList.lookupSingleton(MasterBuildConfiguration.class).configure(req, json);
getNodeProperties().rebuild(req, json.optJSONObject("nodeProperties"), NodeProperty.all());
bc.commit();
}
updateComputers(this);
FormApply.success(req.getContextPath() + '/' + toComputer().getUrl()).generateResponse(req, rsp, null);
}
/**
* Accepts the new description.
*/
@ -5498,7 +5488,44 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
@Override
@POST
public void doConfigSubmit(StaplerRequest2 req, StaplerResponse2 rsp) throws IOException, ServletException, FormException {
Jenkins.get().doConfigExecutorsSubmit(req, rsp);
checkPermission(ADMINISTER);
Jenkins jenkins = Jenkins.get();
try (BulkChange bc = new BulkChange(jenkins)) {
JSONObject json = req.getSubmittedForm();
try {
// For compatibility reasons, this value is stored in Jenkins
String num = json.getString("numExecutors");
if (!num.matches("\\d+")) {
throw new Descriptor.FormException(Hudson_Computer_IncorrectNumberOfExecutors(), "numExecutors");
}
jenkins.setNumExecutors(json.getInt("numExecutors"));
if (req.hasParameter("builtin.mode")) {
jenkins.setMode(Mode.valueOf(req.getParameter("builtin.mode")));
} else {
jenkins.setMode(Mode.NORMAL);
}
jenkins.setLabelString(json.optString("labelString", ""));
} catch (IOException e) {
throw new Descriptor.FormException(e, "numExecutors");
}
jenkins.getNodeProperties().rebuild(req, json.optJSONObject("nodeProperties"), NodeProperty.all());
bc.commit();
}
jenkins.updateComputers(jenkins);
Computer computer = jenkins.toComputer();
if (computer == null) {
throw new IllegalStateException("Cannot find the computer object for the controller node");
}
FormApply.success(req.getContextPath() + '/' + computer.getUrl()).generateResponse(req, rsp, null);
}
@WebMethod(name = "config.xml")

View File

@ -1,72 +0,0 @@
/*
* The MIT License
*
* Copyright (c) 2011, CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.model;
import hudson.Extension;
import hudson.model.Node.Mode;
import java.io.IOException;
import net.sf.json.JSONObject;
import org.jenkinsci.Symbol;
import org.kohsuke.stapler.StaplerRequest2;
/**
* Adds the configuration regarding building on the built-in node.
*
* @author Kohsuke Kawaguchi
*/
@Extension(ordinal = 500) @Symbol({"builtInNode", "masterBuild"})
public class MasterBuildConfiguration extends GlobalConfiguration {
public int getNumExecutors() {
return Jenkins.get().getNumExecutors();
}
public String getLabelString() {
return Jenkins.get().getLabelString();
}
@Override
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
Jenkins j = Jenkins.get();
try {
// for compatibility reasons, this value is stored in Jenkins
String num = json.getString("numExecutors");
if (!num.matches("\\d+")) {
throw new FormException(Messages.Hudson_Computer_IncorrectNumberOfExecutors(), "numExecutors");
}
j.setNumExecutors(json.getInt("numExecutors"));
if (req.hasParameter("builtin.mode"))
j.setMode(Mode.valueOf(req.getParameter("builtin.mode")));
else
j.setMode(Mode.NORMAL);
j.setLabelString(json.optString("labelString", ""));
return true;
} catch (IOException e) {
throw new FormException(e, "numExecutors");
}
}
}

View File

@ -140,6 +140,35 @@ public class Nodes implements PersistenceRoot {
}
}
/**
* Adds a node if a node with the given name doesn't already exist. This is equivalent to
*
* <pre>
* if (nodes.getNode(node.getNodeName()) == null) {
* nodes.addNode(node);
* }
* </pre>
*
* except that it happens atomically.
*
* @param node the new node.
* @return True if the node was added. False otherwise (indicating a node with the given name already exists)
* @throws IOException if the list of nodes could not be persisted.
* @since 2.529
*/
public boolean addNodeIfAbsent(final @NonNull Node node) throws IOException {
if (ENFORCE_NAME_RESTRICTIONS) {
Jenkins.checkGoodName(node.getNodeName());
}
Node old = nodes.putIfAbsent(node.getNodeName(), node);
if (old == null) {
handleAddedNode(node, null);
return true;
}
return false;
}
/**
* Adds a node. If a node of the same name already exists then that node will be replaced.
*
@ -153,6 +182,11 @@ public class Nodes implements PersistenceRoot {
Node old = nodes.put(node.getNodeName(), node);
if (node != old) {
handleAddedNode(node, old);
}
}
private void handleAddedNode(final @NonNull Node node, final Node old) throws IOException {
node.onLoad(this, node.getNodeName());
jenkins.updateNewComputer(node);
jenkins.trimLabels(node, old);
@ -162,9 +196,7 @@ public class Nodes implements PersistenceRoot {
} catch (IOException | RuntimeException e) {
// JENKINS-50599: If persisting the node throws an exception, we need to remove the node from
// memory before propagating the exception.
Queue.withLock(new Runnable() {
@Override
public void run() {
Queue.runWithLock(() -> {
nodes.compute(node.getNodeName(), (ignoredNodeName, ignoredNode) -> old);
jenkins.updateComputers(node);
if (old != null) {
@ -172,7 +204,6 @@ public class Nodes implements PersistenceRoot {
} else {
jenkins.trimLabels(node);
}
}
});
throw e;
}
@ -182,7 +213,6 @@ public class Nodes implements PersistenceRoot {
NodeListener.fireOnCreated(node);
}
}
}
public XmlFile getConfigFile(Node node) {
return getConfigFile(node.getRootDir());
@ -250,13 +280,10 @@ public class Nodes implements PersistenceRoot {
if (oldOne == nodes.get(oldOne.getNodeName())) {
// use the queue lock until Nodes has a way of directly modifying a single node.
Queue.withLock(new Runnable() {
@Override
public void run() {
Queue.runWithLock(() -> {
Nodes.this.nodes.remove(oldOne.getNodeName());
Nodes.this.nodes.put(newOne.getNodeName(), newOne);
newOne.onLoad(Nodes.this, newOne.getNodeName());
}
});
updateNode(newOne, false);
if (!newOne.getNodeName().equals(oldOne.getNodeName())) {
@ -285,16 +312,13 @@ public class Nodes implements PersistenceRoot {
public void removeNode(final @NonNull Node node) throws IOException {
if (node == nodes.get(node.getNodeName())) {
AtomicBoolean match = new AtomicBoolean();
Queue.withLock(new Runnable() {
@Override
public void run() {
Queue.runWithLock(() -> {
Computer c = node.toComputer();
if (c != null) {
c.recordTermination();
c.disconnect(OfflineCause.create(hudson.model.Messages._Hudson_NodeBeingRemoved()));
}
match.set(node == nodes.remove(node.getNodeName()));
}
});
// no need for a full save() so we just do the minimum
LOGGER.fine(() -> "deleting " + new File(getRootDir(), node.getNodeName()));
@ -354,9 +378,7 @@ public class Nodes implements PersistenceRoot {
}
}
}
Queue.withLock(new Runnable() {
@Override
public void run() {
Queue.runWithLock(() -> {
newNodes.entrySet().removeIf(stringNodeEntry -> ExtensionList.lookup(NodeListener.class).stream().anyMatch(nodeListener -> {
if (!nodeListener.allowLoad(stringNodeEntry.getValue())) {
LOGGER.log(Level.FINE, () -> "Loading of node " + stringNodeEntry.getKey() + " vetoed by " + nodeListener);
@ -368,7 +390,6 @@ public class Nodes implements PersistenceRoot {
nodes.putAll(newNodes);
jenkins.updateComputerList();
jenkins.trimLabels();
}
});
}

View File

@ -29,6 +29,8 @@ import static jakarta.servlet.http.HttpServletResponse.SC_CONFLICT;
import static jakarta.servlet.http.HttpServletResponse.SC_CREATED;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Util;
import hudson.cli.declarative.CLIMethod;
import hudson.cli.declarative.CLIResolver;
@ -60,6 +62,9 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.concurrent.TimeUnit;
import jenkins.model.details.Detail;
import jenkins.model.details.DetailFactory;
import jenkins.model.details.ParameterizedDetail;
import jenkins.model.lazy.LazyBuildMixIn;
import jenkins.security.stapler.StaplerNotDispatchable;
import jenkins.triggers.SCMTriggerItem;
@ -561,6 +566,25 @@ public abstract class ParameterizedJobMixIn<JobT extends Job<JobT, RunT> & Param
return !isDisabled() && !((Job) this).isHoldOffBuildUntilSave();
}
@Extension
final class ParameterizedDetailFactory extends DetailFactory<Run> {
@Override
public Class<Run> type() {
return Run.class;
}
@NonNull
@Override public List<? extends Detail> createFor(@NonNull Run target) {
var action = target.getAction(ParametersAction.class);
if (action == null || action.getParameters().isEmpty()) {
return List.of();
}
return List.of(new ParameterizedDetail(target));
}
}
}
}

View File

@ -0,0 +1,55 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.model;
import hudson.model.Action;
import hudson.model.Actionable;
/**
* Represents a tab element shown on {@link Actionable} views.
* <p>
* A {@code Tab} is an {@link Action} that can be attached to an {@link Actionable} object
* (such as a job or build) and displayed as a separate tab in the UI.
* </p>
*
* <p>
* Tabs may also implement {@link Badgeable} to display a visual badge associated
* with the tabs action
* </p>
*
* @since 2.532
*/
public abstract class Tab implements Action, Badgeable {
protected transient Actionable object;
public Tab(Actionable object) {
this.object = object;
}
public Actionable getObject() {
return object;
}
}

View File

@ -0,0 +1,29 @@
package jenkins.model.details;
import hudson.model.Cause;
import hudson.model.CauseAction;
import hudson.model.Run;
import java.util.Map;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
/**
* Displays the cause for the given run
*/
public class CauseDetail extends Detail {
public CauseDetail(Run<?, ?> run) {
super(run);
}
@Override
public int getOrder() {
return Integer.MAX_VALUE;
}
@Restricted(NoExternalUse.class)
public Map<Cause, Integer> getCauseCounts() {
CauseAction causeAction = getObject().getAction(CauseAction.class);
return causeAction.getCauseCounts();
}
}

View File

@ -60,9 +60,9 @@ public abstract class Detail implements ModelObject, IconSpec {
}
/**
* @return order in the group, zero is first, MAX_VALUE is any order
* @return order in the group, MAX_VALUE is first, zero is any order
*/
public int getOrder() {
return Integer.MAX_VALUE;
return 0;
}
}

View File

@ -0,0 +1,45 @@
package jenkins.model.details;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.model.AbstractProject;
import hudson.model.Actionable;
import hudson.model.Item;
import java.util.List;
/**
* Displays downstream projects of a project (if any)
*/
public class DownstreamProjectsDetail extends Detail {
public DownstreamProjectsDetail(Actionable object) {
super(object);
}
public @Nullable String getIconClassName() {
if (getProjects().isEmpty()) {
return null;
}
return "symbol-arrow-down-circle-outline plugin-ionicons-api";
}
@Override
public @Nullable String getDisplayName() {
int projectSize = getProjects().size();
if (projectSize == 1) {
return "1 downstream project";
}
return projectSize + " downstream projects";
}
public List<AbstractProject> getProjects() {
if (!(getObject() instanceof AbstractProject)) {
return List.of();
}
List<AbstractProject> projects = ((AbstractProject) getObject()).getDownstreamProjects();
return projects.stream().filter(e -> e.hasPermission(Item.READ)).toList();
}
}

View File

@ -0,0 +1,27 @@
package jenkins.model.details;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.model.ParametersAction;
import hudson.model.Run;
/**
* Displays if a run has parameters
*/
public class ParameterizedDetail extends Detail {
public final ParametersAction action;
public ParameterizedDetail(Run<?, ?> run) {
super(run);
this.action = getObject().getAction(ParametersAction.class);
}
public @Nullable String getIconClassName() {
return "symbol-parameters";
}
@Override
public @Nullable String getDisplayName() {
return action.getDisplayName();
}
}

View File

@ -0,0 +1,39 @@
package jenkins.model.details;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.model.Actionable;
import hudson.model.Hudson;
import hudson.model.Job;
import java.util.Objects;
/**
* Displays the full name of a project (if necessary)
*/
public class ProjectNameDetail extends Detail {
public ProjectNameDetail(Actionable object) {
super(object);
}
public @Nullable String getIconClassName() {
if (getDisplayName() == null) {
return null;
}
return "symbol-information-circle";
}
@Override
public @Nullable String getDisplayName() {
var it = (Job<?, ?>) getObject();
if (Objects.equals(it.getFullName(), it.getFullDisplayName()) || it.getClass().getName().equals("MatrixConfiguration")) {
return null;
}
boolean nested = it.getParent().getClass() != Hudson.class;
String label = nested ? "Full project name" : "Project name";
return label + ": " + it.getFullName();
}
}

View File

@ -10,4 +10,9 @@ public class TimestampDetail extends Detail {
public TimestampDetail(Run<?, ?> run) {
super(run);
}
@Override
public int getOrder() {
return Integer.MAX_VALUE - 1;
}
}

View File

@ -0,0 +1,45 @@
package jenkins.model.details;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.model.AbstractProject;
import hudson.model.Actionable;
import hudson.model.Item;
import java.util.List;
/**
* Displays upstream projects of a project (if any)
*/
public class UpstreamProjectsDetail extends Detail {
public UpstreamProjectsDetail(Actionable object) {
super(object);
}
public @Nullable String getIconClassName() {
if (getProjects().isEmpty()) {
return null;
}
return "symbol-arrow-up-circle-outline plugin-ionicons-api";
}
@Override
public @Nullable String getDisplayName() {
int projectSize = getProjects().size();
if (projectSize == 1) {
return "1 upstream project";
}
return projectSize + " upstream projects";
}
public List<AbstractProject> getProjects() {
if (!(getObject() instanceof AbstractProject)) {
return List.of();
}
List<AbstractProject> projects = ((AbstractProject) getObject()).getUpstreamProjects();
return projects.stream().filter(e -> e.hasPermission(Item.READ)).toList();
}
}

View File

@ -25,6 +25,7 @@
package jenkins.model.experimentalflags;
import edu.umd.cs.findbugs.annotations.NonNull;
import jenkins.util.SystemProperties;
/**
* @since 2.395
@ -36,7 +37,7 @@ public abstract class BooleanUserExperimentalFlag extends UserExperimentalFlag<B
@Override
public @NonNull Boolean getDefaultValue() {
return false;
return SystemProperties.getBoolean(getFlagKey() + ".defaultValue");
}
@Override

View File

@ -0,0 +1,49 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.model.experimentalflags;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.Extension;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
@Extension
@Restricted(NoExternalUse.class)
public class NewDashboardPageUserExperimentalFlag extends BooleanUserExperimentalFlag {
public NewDashboardPageUserExperimentalFlag() {
super("new-dashboard-page.flag");
}
@Override
public String getDisplayName() {
return "New dashboard page";
}
@Nullable
@Override
public String getShortDescription() {
return "Enables a revamped dashboard page. This feature is still a work in progress, so some things might not work perfectly yet.";
}
}

View File

@ -0,0 +1,49 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.model.experimentalflags;
import edu.umd.cs.findbugs.annotations.Nullable;
import hudson.Extension;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
@Extension
@Restricted(NoExternalUse.class)
public class NewJobPageUserExperimentalFlag extends BooleanUserExperimentalFlag {
public NewJobPageUserExperimentalFlag() {
super("new-job-page.flag");
}
@Override
public String getDisplayName() {
return "New job page";
}
@Nullable
@Override
public String getShortDescription() {
return "Enables a revamped job page. This feature is still a work in progress, so some things might not work perfectly yet.";
}
}

View File

@ -82,11 +82,6 @@ import org.kohsuke.accmod.restrictions.NoExternalUse;
* from concurrent modifications, where another thread deletes a build while one thread iterates them.
*
* <p>
* Some of the {@link SortedMap} operations are inefficiently implemented, by
* loading all the build records eagerly. We hope to replace
* these implementations by more efficient lazy-loading ones as we go.
*
* <p>
* Object lock of {@code this} is used to make sure mutation occurs sequentially.
* That is, ensure that only one thread is actually calling {@link #retrieve(File)} and
* updating {@link jenkins.model.lazy.AbstractLazyLoadRunMap#core}.
@ -116,7 +111,7 @@ public abstract class AbstractLazyLoadRunMap<R> extends AbstractMap<Integer, R>
}
@Override
public Set<Entry<Integer, R>> entrySet() {
public Set<Map.Entry<Integer, R>> entrySet() {
assert baseDirInitialized();
return adapter.entrySet();
}

View File

@ -71,7 +71,7 @@ public final class BuildReference<R> {
/**
* check if reference holder set.
* means there war a try to load build object and we have some result of that try
* means there was a try to load build object and we have some result of that try
*
* @return true if there was a try to
*/

View File

@ -97,7 +97,7 @@ class BuildReferenceMapAdapter<R> extends AbstractMap<Integer, R> implements Sor
}
@Override
public Set<Entry<Integer, R>> entrySet() {
public Set<Map.Entry<Integer, R>> entrySet() {
return entrySet;
}
@ -171,7 +171,7 @@ class BuildReferenceMapAdapter<R> extends AbstractMap<Integer, R> implements Sor
public Iterator<Integer> iterator() {
return new AdaptedIterator<>(BuildReferenceMapAdapter.this.entrySet().iterator()) {
@Override
protected Integer adapt(Entry<Integer, R> e) {
protected Integer adapt(Map.Entry<Integer, R> e) {
return e.getKey();
}
};
@ -227,7 +227,7 @@ class BuildReferenceMapAdapter<R> extends AbstractMap<Integer, R> implements Sor
public Iterator<R> iterator() {
return new AdaptedIterator<>(BuildReferenceMapAdapter.this.entrySet().iterator()) {
@Override
protected R adapt(Entry<Integer, R> e) {
protected R adapt(Map.Entry<Integer, R> e) {
return e.getValue();
}
};
@ -239,7 +239,7 @@ class BuildReferenceMapAdapter<R> extends AbstractMap<Integer, R> implements Sor
}
}
private class EntrySetAdapter extends AbstractSet<Entry<Integer, R>> {
private class EntrySetAdapter extends AbstractSet<Map.Entry<Integer, R>> {
@Override
public int size() {
return BuildReferenceMapAdapter.this.core.size();
@ -268,13 +268,24 @@ class BuildReferenceMapAdapter<R> extends AbstractMap<Integer, R> implements Sor
}
@Override
public Iterator<Entry<Integer, R>> iterator() {
public Iterator<Map.Entry<Integer, R>> iterator() {
return new Iterator<>() {
private Entry<Integer, R> current;
private final Iterator<Entry<Integer, R>> it = Iterators.removeNull(Iterators.map(
private Map.Entry<Integer, R> current;
private final Iterator<Map.Entry<Integer, R>> it = Iterators.removeNull(Iterators.map(
BuildReferenceMapAdapter.this.core.entrySet().iterator(), coreEntry -> {
R v = BuildReferenceMapAdapter.this.resolver.resolveBuildRef(coreEntry.getValue());
return v == null ? null : new AbstractMap.SimpleEntry<>(coreEntry.getKey(), v);
BuildReference<R> ref = coreEntry.getValue();
if (!ref.isSet()) {
R r = resolver.resolveBuildRef(ref);
// load not loaded or unloadable build
if (r == null) {
return null;
}
return new EntryAdapter(coreEntry, r);
}
if (ref.isUnloadable()) {
return null;
}
return new EntryAdapter(coreEntry);
}));
@Override
@ -283,7 +294,7 @@ class BuildReferenceMapAdapter<R> extends AbstractMap<Integer, R> implements Sor
}
@Override
public Entry<Integer, R> next() {
public Map.Entry<Integer, R> next() {
return current = it.next();
}
@ -303,6 +314,59 @@ class BuildReferenceMapAdapter<R> extends AbstractMap<Integer, R> implements Sor
}
}
private class EntryAdapter implements Entry<Integer, R> {
private final Map.Entry<Integer, BuildReference<R>> coreEntry;
private volatile R resolvedValue;
EntryAdapter(Map.Entry<Integer, BuildReference<R>> coreEntry) {
this(coreEntry, null);
}
EntryAdapter(Map.Entry<Integer, BuildReference<R>> coreEntry, R resolvedValue) {
this.coreEntry = coreEntry;
this.resolvedValue = resolvedValue;
}
private Map.Entry<Integer, R> getResolvedEntry() {
return new AbstractMap.SimpleEntry<>(getKey(), getValue());
}
@Override
public Integer getKey() {
return coreEntry.getKey();
}
@Override
public R getValue() {
R value = resolvedValue;
if (value != null) {
return value;
}
return resolvedValue = resolver.resolveBuildRef(coreEntry.getValue());
}
@Override
public R setValue(R value) {
// BuildReferenceAdapter is read only
throw new UnsupportedOperationException();
}
@Override
public String toString() {
return getResolvedEntry().toString();
}
@Override
public boolean equals(Object o) {
return (o instanceof Map.Entry<?, ?>) && getResolvedEntry().equals(o);
}
@Override
public int hashCode() {
return getResolvedEntry().hashCode();
}
}
/**
* An interface for resolving build references into actual build instances
* and extracting basic metadata from them.

View File

@ -0,0 +1,50 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.run;
import hudson.model.Actionable;
import jenkins.model.Tab;
public class ChangesTab extends Tab {
public ChangesTab(Actionable object) {
super(object);
}
@Override
public String getIconFileName() {
return "symbol-changes";
}
@Override
public String getDisplayName() {
return "Changes";
}
@Override
public String getUrlName() {
return "changes";
}
}

View File

@ -0,0 +1,63 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.run;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Run;
import java.util.Collection;
import java.util.Collections;
import jenkins.model.Tab;
import jenkins.model.TransientActionFactory;
import jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag;
import jenkins.scm.RunWithSCM;
@Extension(ordinal = Integer.MAX_VALUE - 2)
public class ChangesTabFactory extends TransientActionFactory<Run> {
@Override
public Class<Run> type() {
return Run.class;
}
@NonNull
@Override
public Collection<? extends Tab> createFor(@NonNull Run target) {
boolean isExperimentalUiEnabled = new NewBuildPageUserExperimentalFlag().getFlagValue();
if (!isExperimentalUiEnabled) {
return Collections.emptySet();
}
if (target instanceof RunWithSCM<?, ?> targetWithSCM) {
var hasChangeSet = !targetWithSCM.getChangeSets().isEmpty();
if (hasChangeSet) {
return Collections.singleton(new ChangesTab(target));
}
}
return Collections.emptySet();
}
}

View File

@ -0,0 +1,50 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.run;
import hudson.model.Actionable;
import jenkins.model.Tab;
public class ConsoleTab extends Tab {
public ConsoleTab(Actionable object) {
super(object);
}
@Override
public String getIconFileName() {
return "symbol-terminal";
}
@Override
public String getDisplayName() {
return "Console";
}
@Override
public String getUrlName() {
return "console";
}
}

View File

@ -0,0 +1,58 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.run;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Functions;
import hudson.model.Run;
import java.util.Collection;
import java.util.Collections;
import jenkins.console.DefaultConsoleUrlProvider;
import jenkins.model.Tab;
import jenkins.model.TransientActionFactory;
import jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag;
@Extension(ordinal = Integer.MAX_VALUE - 1)
public class ConsoleTabFactory extends TransientActionFactory<Run> {
@Override
public Class<Run> type() {
return Run.class;
}
@NonNull
@Override
public Collection<? extends Tab> createFor(@NonNull Run target) {
var consoleProvider = Functions.getConsoleProviderFor(target);
boolean isExperimentalUiEnabled = new NewBuildPageUserExperimentalFlag().getFlagValue();
if (!consoleProvider.getClass().equals(DefaultConsoleUrlProvider.class) || !isExperimentalUiEnabled) {
return Collections.emptySet();
}
return Collections.singleton(new ConsoleTab(target));
}
}

View File

@ -0,0 +1,50 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.run;
import hudson.model.Actionable;
import jenkins.model.Tab;
public class OverviewTab extends Tab {
public OverviewTab(Actionable object) {
super(object);
}
@Override
public String getIconFileName() {
return "symbol-overview";
}
@Override
public String getDisplayName() {
return "Overview";
}
@Override
public String getUrlName() {
return null;
}
}

View File

@ -0,0 +1,55 @@
/*
* The MIT License
*
* Copyright (c) 2025, Jan Faracik
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.run;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Run;
import java.util.Collection;
import java.util.Collections;
import jenkins.model.Tab;
import jenkins.model.TransientActionFactory;
import jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag;
@Extension(ordinal = Integer.MAX_VALUE)
public class OverviewTabFactory extends TransientActionFactory<Run> {
@Override
public Class<Run> type() {
return Run.class;
}
@NonNull
@Override
public Collection<? extends Tab> createFor(@NonNull Run target) {
boolean isExperimentalUiEnabled = new NewBuildPageUserExperimentalFlag().getFlagValue();
if (!isExperimentalUiEnabled) {
return Collections.emptySet();
}
return Collections.singleton(new OverviewTab(target));
}
}

View File

@ -1,15 +1,13 @@
package jenkins.security;
import hudson.remoting.Callable;
import jenkins.util.ThrowingCallable;
import org.jenkinsci.remoting.RoleChecker;
/**
* {@link Callable} adapter for situations where Callable is not used for remoting but
* just as a convenient function that has parameterized return value and exception type.
*
* @author Kohsuke Kawaguchi
* @since 1.587 / 1.580.1
* @deprecated use {@link ThrowingCallable} instead
*/
@Deprecated
public abstract class NotReallyRoleSensitiveCallable<V, T extends Throwable> implements Callable<V, T> {
@Override
public void checkRoles(RoleChecker checker) throws SecurityException {

View File

@ -134,7 +134,7 @@ public abstract class ProgressiveRendering {
((ScheduledExecutorService) executorService).schedule(new Runnable() {
@Override public void run() {
LOG.log(Level.FINE, "some time has elapsed since {0} finished, so releasing", boundId);
release();
boundObjectTable.release(boundId);
}
}, timeout() /* add some grace period for browser/network overhead */ * 2, TimeUnit.MILLISECONDS);
}
@ -142,17 +142,6 @@ public abstract class ProgressiveRendering {
});
}
/** {@link BoundObjectTable#releaseMe} just cannot work the way we need it to. */
private void release() {
try {
Method release = BoundObjectTable.Table.class.getDeclaredMethod("release", String.class);
release.setAccessible(true);
release.invoke(boundObjectTable, boundId);
} catch (Exception x) {
LOG.log(Level.WARNING, "failed to unbind " + boundId, x);
}
}
/**
* Copies important fields from the current HTTP request and makes them available during {@link #compute}.
* This is necessary because some model methods such as {@link AbstractItem#getUrl} behave differently when called from a request.
@ -281,7 +270,7 @@ public abstract class ProgressiveRendering {
r.put("status", statusJSON);
if (statusJSON instanceof String) { // somehow completed
LOG.log(Level.FINE, "finished in news so releasing {0}", boundId);
release();
boundObjectTable.release(boundId);
}
lastNewsTime = System.currentTimeMillis();
LOG.log(Level.FINER, "news from {0}", uri);

View File

@ -0,0 +1,54 @@
/*
* The MIT License
*
* Copyright 2025 CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.util;
import java.io.Serializable;
import jenkins.security.NotReallyRoleSensitiveCallable;
import org.jenkinsci.remoting.RoleSensitive;
/**
* A task that returns a result and may throw an exception.
* Similar to {@link java.util.concurrent.Callable} except that the exception type can be constrained.
* Similar to {@link hudson.remoting.Callable} or {@link NotReallyRoleSensitiveCallable} except
* <ul>
* <li>It is not {@link Serializable}, which would cause SpotBugs to complain about captured local variables.
* <li>It does not have the {@link RoleSensitive#checkRoles} so it can be a {@link FunctionalInterface}.
* </ul>
* Similar to {@link ThrowingRunnable} but returns a value.
* @param <V> the return type
* @param <T> the checked exception type, or might be {@link RuntimeException}
* @since 2.534
*/
@FunctionalInterface
public interface ThrowingCallable<V, T extends Throwable> {
/**
* Computes a result, or throws an exception if unable to do so.
* @return computed result
* @throws T if unable to compute a result
*/
V call() throws T;
}

View File

@ -0,0 +1,42 @@
/*
* The MIT License
*
* Copyright 2025 CloudBees, Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package jenkins.util;
/**
* Represents an operation that does not return a result.
* Similar to {@link Runnable} but can throw a checked exception.
* Similar to {@link ThrowingCallable} but does not return a value.
* @param <T> the checked exception type, or might be {@link RuntimeException}
*/
@FunctionalInterface
public interface ThrowingRunnable<T extends Throwable> {
/**
* Runs this operation.
* @throws T if unable to run
*/
void run() throws T;
}

View File

@ -40,24 +40,6 @@ public class JavaUtils {
// Cannot construct
}
/**
* Check whether the current JVM is running with Java 8 or below
* @return {@code true} if it is Java 8 or older version
*/
public static boolean isRunningWithJava8OrBelow() {
String javaVersion = getCurrentRuntimeJavaVersion();
return javaVersion.startsWith("1.");
}
/**
* Check whether the current JVM is running with Java 9 or above.
* @return {@code true} if it is Java 9 or above
*/
public static boolean isRunningWithPostJava8() {
String javaVersion = getCurrentRuntimeJavaVersion();
return !javaVersion.startsWith("1.");
}
/**
* Returns the JVM's current version as a {@link VersionNumber} instance.
*/

View File

@ -67,6 +67,7 @@ PluginWrapper.PluginWrapperAdministrativeMonitor.DisplayName=Plugin-Ladefehler
ProxyConfiguration.FailedToConnectViaProxy=Konnte nicht mit {0} verbinden.
ProxyConfiguration.FailedToConnect=Konnte nicht mit {0} verbinden (code {1}).
ProxyConfiguration.NonTLSWarning=Jenkins unterstützt nur die Verwendung einer HTTP-Verbindung zum Proxy. Die Zugangsdaten könnten für andere im selben Netzwerk sichtbar sein.
ProxyConfiguration.MalformedTestUrl=Format der Test-URL ungültig
ProxyConfiguration.Success=Erfolg (code {0})
ProxyConfiguration.TestUrlRequired=Test-URL muss angegeben werden.

View File

@ -131,7 +131,7 @@ THE SOFTWARE.
<j:forEach var="label" items="${p.categories}">
<j:if test="${!it.isMetaLabel(label)}">
<a href="?filter=${app.updateCenter.getCategoryDisplayName(label)}"
class="jenkins-table__link jenkins-table__badge">
class="jenkins-badge">
${app.updateCenter.getCategoryDisplayName(label)}
</a>
</j:if>

View File

@ -26,7 +26,7 @@ Update=Mettre à jour
Name=Nom
Released=Publié(e)
Installed=Installé
Applying\ this\ update\ will\ address\ security\ vulnerabilities\ in\ the\ currently\ installed\ version.=L'application de cette mise à jour corrigera les failles de sécurité de la version actuellement installée.
Applying\ this\ update\ will\ address\ security\ vulnerabilities\ in\ the\ currently\ installed\ version.=L''application de cette mise à jour corrigera les failles de sécurité de la version actuellement installée.
No\ updates=Aucunes mises à jour
Inactive=Inactif
No\ updates\ available=Aucune mise à jour disponible

View File

@ -1,32 +0,0 @@
package hudson.ProxyConfiguration
def f=namespace(lib.FormTagLib)
def l=namespace(lib.LayoutTagLib)
set("readOnlyMode", !app.hasPermission(app.ADMINISTER))
f.entry(title:_("Server"),field:"name") {
f.textbox()
}
f.entry(title:_("Port"),field:"port") {
f.number(clazz:"number",min:0,max:65535,step:1)
}
f.entry(title:_("User name"),field:"userName") {
f.textbox()
}
f.entry(title:_("Password"),field:"secretPassword") {
f.password()
}
f.entry(title:_("No Proxy Host"),field:"noProxyHost") {
f.textarea()
}
l.isAdmin() {
f.advanced() {
f.entry(title: _("Test URL"), field: "testUrl") {
f.textbox()
}
f.validateButton(title:_("Validate Proxy"),
method:"validateProxy", with:"testUrl,name,port,userName,secretPassword,noProxyHost")
}
}

View File

@ -0,0 +1,48 @@
<!--
The MIT License
Copyright (c) 2025, Stefan Spieker
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:l="/lib/layout">
<j:set var="readOnlyMode" value="${!app.hasPermission(app.ADMINISTER)}"/>
<f:entry title="${%Server}">
<f:textbox field="name"/>
</f:entry>
<f:entry title="${%Port}">
<f:number field="port" min="0" max="65535" step="1"/>
</f:entry>
<f:entry title="${%User name}">
<f:textbox field="userName"/>
</f:entry>
<f:entry title="${%Password}">
<f:password field="secretPassword"/>
</f:entry>
<f:entry title="${%No Proxy Host}">
<f:textarea field="noProxyHost"/>
</f:entry>
<l:isAdmin>
<f:advanced>
<f:entry title="${%Test URL}">
<f:textbox field="testUrl"/>
</f:entry>
<f:validateButton title="${%Validate Proxy}" method="validateProxy" with="testUrl,name,port,userName,secretPassword,noProxyHost"/>
</f:advanced>
</l:isAdmin>
</j:jelly>

View File

@ -24,5 +24,6 @@ Server=Server
Port=Port
User\ name=Benutzername
Password=Passwort
Test\ URL=Test-URL
No\ Proxy\ Host=Proxy-Ausnahmen
Validate\ Proxy=Proxy-Konfiguration prüfen

View File

@ -22,27 +22,34 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<!--
Displays the console output
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form" xmlns:i="jelly:fmt">
<l:layout title="${it.fullDisplayName} ${%Changes}">
<st:include page="sidepanel.jelly" />
<l:breadcrumb title="${%Changes}" />
<l:main-panel>
<t:buildCaption>${%Changes}</t:buildCaption>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:l="/lib/layout">
<j:new className="jenkins.run.ChangesTab" var="it">
<j:arg value="${it}"/>
</j:new>
<l:run-subpage>
<l:app-bar title="${it.displayName}">
<l:details-bar it="${it.object}" />
</l:app-bar>
<j:set var="changeSets" value="${it.object.changeSets}" />
<j:choose>
<j:when test="${it.hasChangeSetComputed()}">
<st:include page="index.jelly" it="${it.changeSet}" />
</j:when>
<j:when test="${it.building}">
${%Not yet determined}
<j:when test="${!empty(changeSets)}">
<div class="jenkins-card">
<div class="jenkins-card__content">
<j:forEach var="changeSet" items="${changeSets}">
<st:include page="index.jelly" it="${changeSet}" />
</j:forEach>
</div>
</div>
</j:when>
<j:otherwise>
${%Failed to determine} (<a href="${h.getConsoleUrl(it)}">${%log}</a>)
<l:notice icon="${it.iconFileName}" title="${%Failed to determine}">
<a href="${h.getConsoleUrl(it.object)}">${%log}</a>
</l:notice>
</j:otherwise>
</j:choose>
</l:main-panel>
</l:layout>
</l:run-subpage>
</j:jelly>

View File

@ -30,7 +30,17 @@ THE SOFTWARE.
<l:header />
<l:side-panel>
<l:tasks>
<l:userExperimentalFlag var="newBuildPage" flagClassName="jenkins.model.experimentalflags.NewBuildPageUserExperimentalFlag" />
<j:set var="buildUrl" value="${h.decompose(request2)}" />
<j:choose>
<j:when test="${newBuildPage}">
<st:include page="tasks.jelly"/>
<st:include page="actions.jelly" />
<t:actions actions="${it.transientActions}"/>
<st:include page="delete.jelly" />
</j:when>
<j:otherwise>
<st:include page="tasks.jelly"/>
<st:include page="delete.jelly" />
<st:include page="actions.jelly" />
@ -41,6 +51,8 @@ THE SOFTWARE.
<j:if test="${it.nextBuild!=null}">
<l:task contextMenu="false" href="${buildUrl.nextBuildUrl}" icon="icon-next icon-md" title="${%Next Build}"/>
</j:if>
</j:otherwise>
</j:choose>
</l:tasks>
</l:side-panel>
</j:jelly>

View File

@ -27,6 +27,18 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout" xmlns:p="/lib/hudson/project">
<j:choose>
<j:when test="${newBuildPage}">
<j:choose>
<j:when test="${h.hasPermission(it,it.UPDATE)}">
<l:task icon="symbol-edit-note" href="${buildUrl.baseUrl}/configure" title="${%Edit Build Information}"/>
</j:when>
<j:otherwise>
<l:task icon="symbol-view" href="${buildUrl.baseUrl}/configure" title="${%View Build Information}"/>
</j:otherwise>
</j:choose>
</j:when>
<j:otherwise>
<l:task contextMenu="false" href="${buildUrl.baseUrl}/" icon="symbol-details" title="${%Status}"/>
<l:task href="${buildUrl.baseUrl}/changes" icon="symbol-changes" title="${%Changes}"/>
<p:console-link/>
@ -38,4 +50,6 @@ THE SOFTWARE.
<l:task icon="symbol-view" href="${buildUrl.baseUrl}/configure" title="${%View Build Information}"/>
</j:otherwise>
</j:choose>
</j:otherwise>
</j:choose>
</j:jelly>

View File

@ -46,5 +46,8 @@ THE SOFTWARE.
<st:include page="jobMain.jelly" it="${a}" optional="true" />
</j:forEach>
<l:userExperimentalFlag var="newJobPage" flagClassName="jenkins.model.experimentalflags.NewJobPageUserExperimentalFlag" />
<j:if test="${!newJobPage}">
<p:upstream-downstream />
</j:if>
</j:jelly>

Some files were not shown because too many files have changed in this diff Show More