Commit Graph
14399 Commits
Author SHA1 Message Date
dependabot[bot]andMark Waite cabf1a9cec Bump com.puppycrawl.tools:checkstyle from 10.15.0 to 10.16.0 (#9208)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2024-04-29 10:28:34 -07:00
Jesse Glick f95badea16 Log explanation for denial from MappingWorksheet (#9196) 2024-04-25 15:07:41 -06:00
growfrow 136d310bdf Remove duplicate words in Javadoc and test comments (#9178)
Remove duplicate words in Javadoc and JavaScript comments

Signed-off-by: growfrow <growfrow@outlook.com>
2024-04-18 23:06:12 +02:00
Bob Du aa7ac0b634 Set Locale.ROOT when use String.toLowerCase (#9162)
Signed-off-by: Bob Du <i@bobdu.cc>
2024-04-18 05:49:03 -07:00
Jesse Glick 13dc52c476 [JENKINS-73011] Round-trip JNLPLauncher.tunnel to null not "" (#9170) 2024-04-15 05:43:06 -07:00
Allan Burdajewicz 323ad6a4a1 [JENKINS-65829] Fix WorkspaceCleanupThread to consider suffixed works… (#9083)
* [JENKINS-65829] Fix WorkspaceCleanupThread to consider suffixed workspaces even if original is inexistent

* [JENKINS-65829] Make sur controller system properties is used across all nodes

* [JENKINS-65829] Adapt test for tmp + rename test for libs
2024-04-14 09:31:42 +02:00
Markus Winter e9adbc9833 [JENKINS-72947] Support symbols in TopLevelItemDescriptor#getIconClassName() (#9127)
* [JENKINS-72947] Support symbols in TopLevelItemDescriptor#getIconClassName()

When adding a new Item via `newJob` the corresponding Decriptor can now
make use of symbols

* update icon

* add test
2024-04-14 09:31:32 +02:00
James Nord cb89cad9df [JENKINS-72998] call refresh on the Extension providers again (#9157)
[JENKINS-58302] call refresh on the Extension providers again

In the case the ExtensionFinder is itself extensible we refresh it again
to catch extensions that would be discovered by a newly installed
extension.

This seems a little overzerlous, as there is only the variant plugin
that I know of, however calling `Jenkins.get().refreshExtensions() from
any point in the `variant` plugin would seem to be a little bit
dangerous as it would call back into a place where the reactor is
already calling back from.
2024-04-14 09:29:51 +02:00
Tim Jacomb d14b380c78 [JENKINS-69588] Stop installed plugins page jumping on load (#9141) 2024-04-10 20:07:40 +02:00
Tim Jacomb 8a89117123 Add /manage to uninstall plugin redirect to preserve breadcrumb (#9120) 2024-04-04 18:35:05 +02:00
dependabot[bot] 5a1d9725aa Bump org.jenkins-ci.main:jenkins-test-harness from 2182.v0138ccb_c0b_cb_ to 2185.v796448319b_7c (#9117)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-04-02 12:50:47 -07:00
Basil CrowandMark Waite 53b271283b Deprecate hudson.Util#XS_DATETIME_FORMATTER (#9088)
Co-authored-by: Mark Waite <mark.earl.waite@gmail.com>
2024-03-30 07:29:29 -06:00
Basil Crow 9882ec67f2 Replace usages of org.apache.commons.lang.StringEscapeUtils with Guava (#9094) 2024-03-30 07:26:04 -06:00
Basil Crow 47306c20ed Remove JENKINS-24380 unmigrate functionality (#9092) 2024-03-30 07:25:39 -06:00
Basil Crow f8a6ee542d Deprecate Util#RFC822_DATETIME_FORMATTER (#9085) 2024-03-30 07:23:47 -06:00
Daniel BeckandDaniel Beck 28ed39d800 [JENKINS-18884] Remove 'People' view (#9060)
* [JENKINS-18884] Remove 'People' view

* Add placeholder pages when someone tries to access removed URLs

* Remove obsolete UserInfo class, inapplicable tests

* Restore test with a different core-contributed object

It's not entirely clear what this test signifies, given the
existence of `testTopLevelItemIsLegal`, but whatever.

* Remove probably unnecessary code

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-03-28 14:55:00 -06:00
Basil Crow b60c3aa980 Remove usage of org.apache.commons.lang.Validate (#9084) 2024-03-28 14:54:31 -06:00
Bob Du 8197702484 Further reduce usages of StringUtils (#9044)
* Remove usages of StringUtils#containsIgnoreCase

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#removeStart StringUtils#removeEnd

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#defaultString

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#defaultIfBlank

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#isAlphanumeric

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils.EMPTY

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#split

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#startsWithIgnoreCase

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#countMatches

Signed-off-by: Bob Du <i@bobdu.cc>

* Remove usages of StringUtils#endsWithAny

Signed-off-by: Bob Du <i@bobdu.cc>

* fix spotbugs warning

Signed-off-by: Bob Du <i@bobdu.cc>

* Use Objects.toString

Signed-off-by: Bob Du <i@bobdu.cc>

* revert unrelated change

Signed-off-by: Bob Du <i@bobdu.cc>

---------

Signed-off-by: Bob Du <i@bobdu.cc>
2024-03-27 06:38:23 -06:00
Alexander Brandes e914bb6d76 Fill in since todos (#9077)
Signed-off-by: Alexander Brandes <mc.cache@web.de>
2024-03-26 19:44:24 +01:00
jean pierre Lerbscher c729b41763 Use Collection.isEmpty() to test if collections are empty (#9072)
Fix issue S1155 'Collection.isEmpty()' should be used to test for emptiness
2024-03-26 09:13:21 -06:00
Jesse Glick c3e3a4a6e1 Follow-up fixes to Nodes refactoring (#9053) 2024-03-24 05:32:31 -06:00
Jesse Glick 5cec09d7ed RunListener.allowLoad + AbstractLazyLoadRunMap.recognizeNumber (#9050) 2024-03-24 05:32:17 -06:00
Smith Chang 50269cabe4 Remove duplicated words in Javadoc comments (#9056)
chore: remove repetitive words

Signed-off-by: veryyet <zhengxingru@outlook.com>
2024-03-21 17:03:13 +01:00
Jesse Glick c0f27461fc QueueIdStrategy (#9020) 2024-03-18 15:59:19 +01:00
Markus Winter 229724953b [JENKINS-69191] new icon for agent not accepting tasks and computer icon legend (#8823)
* [JENKINS-69191] icon for agent not accepting tasks

This change adds another icon for the case when an agent is not
accepting tasks, e.g. because the retention strategy avoids this.
The makes it easier to decide whether an agent is in a non healthy
state.
A legend button is added below the computer overview table that shows an
explanation for the icons.

* fix style
2024-03-18 15:59:05 +01:00
Jesse Glick 46b0db7783 Lifecycle.supportsDynamicLoad (#9013) 2024-03-10 08:57:30 +01:00
Jesse Glick 2dca2b18ae Job.fastUpdateNextBuildNumber (#9019) 2024-03-10 08:57:12 +01:00
Basil Crow 434bf2b0f8 [JENKINS-72833] Do not attempt to self-exec on systems without libc (#9025) 2024-03-10 08:56:31 +01:00
Basil Crow c9af352f6f [JENKINS-65911] Correct JNA method signature for fcntl(2) (#9026) 2024-03-10 08:56:17 +01:00
James NordandTim Jacomb 89195cc248 [JENKINS-72796] stable context classloader for Computer.threadPoolForRemoting (#9012)
* [JENKINS-72796] stable context classloader for Computer.threadPoolForRemoting

Whilst the threadpool used reset the context classloader at the end of
any task, it did not ensure that the initial c;lassloader used was
anything sepcific, rather it would use whatever the calling threads
contextClassLoader was.

This is now fixed as we use the Jenkins WebApp classloader (same as
the Timer) which is used by (A)PeriodicTasks.

Whilst we should really not have a context classloader (aka null) and
this should be set where needed by code, almost everywhere in Jenkins
the context classloader is already the webapp classloader, and so
setting this to be different depending on how things where called would
seemingly be a little scary.  Arguably this and other context
classloaders should be all set to null and any code that wants different
should be changed, but this is a larger piece of work that would have
potential impact on an unknown number of plugins in the ecosystem, so
this fix uses what was set > 90% of the time.

* Update core/src/test/java/hudson/model/ComputerTest.java

---------

Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
2024-03-06 15:19:31 +01:00
Abhishek Kumar b5c5caa7ea Adds support of sessionId for External-Job-Monitor (#8825)
adds support of sessionId and minor bug fix
2024-03-05 21:01:47 +01:00
Lutz Neugebauer 9f68c181de [JENKINS-72540] FilePath.copyRecursiveTo() copying now also if local and remote have incompatible character sets at binary level (#8860)
* allow specification of achrive's file name encoding in Archiver#create()

For JENKINS-72540 only needed for tar, but changed zip for consistency as well.

* revise copyRecursiveTo to use same file name encoding locally and remote

such that local and remote understand each other
Otherwise, if remote is z/OS with native EBCDIC encoding the file names
will be in EBCDIC and fails reading
2024-03-05 21:01:35 +01:00
Jesse GlickandVincent Latombe 13c86eeaf6 Nodes persistence cleanup, APIs to control loading (#8979)
Co-authored-by: Vincent Latombe <vincent@latombe.net>
2024-03-05 21:01:15 +01:00
Jesse Glick c7ccbfdde1 [JENKINS-72799] Apply SlaveComputer.decorate also to openLogFile (#9009) 2024-03-04 15:46:10 +01:00
Basil Crow 77731ddea9 Remove usages of ArrayUtils (#9001) 2024-03-03 10:35:02 +01:00
Jesse Glick e82487f257 Use ABORTED from Run.reload (#8986) 2024-03-03 10:34:40 +01:00
Basil Crow b8e916a536 Further reduce usages of StringUtils (#9002) 2024-03-02 11:36:43 +01:00
Basil Crow 3c042d12b8 Reduce usage of StringUtils (#8999) 2024-03-01 23:18:05 +01:00
Jesse Glick d42e0786a4 Null out ProxyConfiguration.userName on save (#8990)
* Null out `ProxyConfiguration.userName` on save

* Since we already have a `readResolve`, may as well use it to clean up historical `userName` of `""` https://github.com/jenkinsci/jenkins/pull/8990#discussion_r1502295510

* Linking to new JDK-8326949
2024-02-28 22:21:50 +01:00
Jesse GlickandVincent Latombe 20263d06d4 Move CloudList.setOwner call from Jenkins.loadTasks to load (#8976)
Co-authored-by: Vincent Latombe <vincent@latombe.net>
2024-02-28 22:20:57 +01:00
dependabot[bot] 0eed048866 Bump org.jenkins-ci:jenkins from 1.110 to 1.111 (#8993)
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-02-27 13:24:55 -08:00
64607784f8 [JENKINS-60866][JENKINS-71513] Apply Stapler update for CSP-compliant st:bind and renderOnDemand (#6865)
* [JENKINS-60866] Apply Stapler update for CSP-compliant st:bind

* [JENKINS-60866] Make renderOnDemand CSP-compliant

* Thanks Spotless

* Make Stapler incrementals work

* Update Stapler to new incremental

* Fixup bad merge

* Update Stapler, add test demonstrating st:bind working

* Address review feedback

* Add test for null bind, update Stapler

* Checkstyle

* More tests

* Use released Stapler

---------

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
Co-authored-by: Basil Crow <me@basilcrow.com>
2024-02-24 07:34:33 +01:00
824f64c23e Allow update sites to define a custom URL for wizard plugin suggestion (#8951)
* currently suggested plugins list as setup time is hardcoded, we can make it configurable

Signed-off-by: Olivier Lamy <olamy@apache.org>

* add new method to UpdateSite to avoid using System property

Signed-off-by: Olivier Lamy <olamy@apache.org>

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

Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>

---------

Signed-off-by: Olivier Lamy <olamy@apache.org>
Co-authored-by: Tim Jacomb <21194782+timja@users.noreply.github.com>
Co-authored-by: Alexander Brandes <mc.cache@web.de>
2024-02-18 08:17:50 +00:00
Jesse Glick db61f04af8 WebSockets.upgradeResponse (#8917) 2024-02-13 16:48:45 +01:00
eduardojandreandAlexander Brandes 8b949243a9 [JENKINS-71326] - Support colored badges in breadcrumb dropdown (#8853)
* [JENKINS-71326] - Support colored badges in breadcrumb dropdown

* [JENKINS-71326] - Support colored badges in breadcrumb dropdown - Creating a badge jelly view.

* [JENKINS-71326] - Support colored badges in breadcrumb dropdown - Adding class attribute to the badge jelly.

* Apply suggestions from code review

Co-authored-by: Alexander Brandes <brandes.alexander@web.de>

* [JENKINS-71326] - Support colored badges in breadcrumb dropdown - Lint and license Fix

---------

Co-authored-by: Alexander Brandes <brandes.alexander@web.de>
2024-02-12 14:09:21 +01:00
Daniel BeckandDaniel Beck e05ffb8a78 [JENKINS-72637] Make Cloud permission scope inherit from Jenkins (#8944)
[JENKINS-72637] Make Cloud permission scope inherit from Overall

Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-02-09 09:04:56 +01:00
Daniel BeckandDaniel Beck b8236f8290 Create new index page for heap dump creation (#8929)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-02-08 10:00:18 +01:00
Robert Sandell b91a57ca20 Cleaning up more FilePath API restrictions (#8924) 2024-02-06 23:14:52 +01:00
Daniel BeckandDaniel Beck 3ad945f7f3 [JENKINS-72636] Prevent authenticated access to Resource Root URL (#8922)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-02-02 16:44:33 +01:00
Jesse Glick 81679b4598 AbstractPasswordBasedSecurityRealm.authenticateByPassword (#8921) 2024-02-02 16:40:21 +01:00