Commit Graph
14421 Commits
Author SHA1 Message Date
Basil Crow 8793619682 Miscellaneous code cleanup (#9384) 2024-06-15 06:27:17 -06:00
Basil Crow 1381726b2f Use isEmpty() where possible (#9383) 2024-06-14 07:21:57 -06:00
Daniel BeckandDaniel Beck df0a13d8fb Fix web references in comment on obtaining process info on Mac OS (#9378)
Co-authored-by: Daniel Beck <daniel-beck@users.noreply.github.com>
2024-06-14 07:21:40 -06:00
Basil Crow d2d1d0d20f Use pattern matching for instanceof (#9382) 2024-06-13 06:04:42 +01:00
Basil Crow 75f6c56c77 Require Java 17 or newer (#9358) 2024-06-11 15:52:23 +01:00
Bob Du 0ad66571bf [JENKINS-73246] Fix text shown in unexpected locale (#9370)
Signed-off-by: Bob Du <i@bobdu.cc>
2024-06-10 19:02:09 -06:00
Markus Winter 5978ebe594 [JENKINS-73243] quote replacement string in symbol tooltips (#9347) 2024-06-06 13:20:38 +01:00
Mark Waite 62bdd5229c Retain Java 11 EOL date for LTS lines (#9323)
Return to the Java 11 end of life date of 30 Sep 2024 for the LTS lines
rather than changing it to match the expected 30 Oct 2024 release date
of the first LTS to require Java 17.

Little benefit to LTS users to extend the end of life message until end of October.

Changing the date will cause the administrative monitor to reappear.
Better to leave it hidden if they have decided to hide it.
2024-05-30 11:18:17 +02:00
Mark Waite 4ff2f4183d Warn Java 11 users of 18 Jun 2024 end of life in weekly (#9314)
Alert Java 11 users of 18 Jun 2024 end of life in weekly

Also updates the Java 11 end of life date for Java 11 users running with
the long term support release.
2024-05-26 21:15:26 -06:00
Basil Crow f6e9283921 Replace usages of JZlib with native Java Platform functionality (#9312)
* Replace usages of JZlib with native Java Platform functionality

* Simplify import of class

* Pull in Stapler version of this change
2024-05-26 21:14:58 -06:00
Basil Crow c10cafc2b5 [JENKINS-10629] Migrate from Commons Compress to Ant (#9311) 2024-05-26 21:14:41 -06:00
Markus Winter dae17374aa [JENKINS-64553] fix ItemListener not called after updating job via REST API or CLI (#9304)
[JENKINS-64553] call ItemListener after updating job via cli

when a job is updated via REST API or CLI, the
ItemListener.fireOnUpdated is now called to inform about the change.
2024-05-26 21:14:14 -06:00
Markus Winter c46dc4becb [JENKINS-64356] fix legacyIds missing when creating jobs via REST API or CLI (#9303)
* [JENKINS-64356] call onCreatedFromScratch after creating item via api or cli

When creating jobs via the rest api or cli the call to
onCreatedFromScratch was missing. This can lead to long startup times
when many jobs are created this way.

* remove unused import
2024-05-26 21:13:58 -06:00
Vincent Latombe b52201b020 Clarify state of {Job,LazyBuildMixIn}#createHistoryWidget() method. (#9268)
* Clarify state of `{Job,LazyBuildMixIn}#createHistoryWidget()` method.

These methods are no longer needed and should not be called nor overridden.

Instead, history widgets are instantiated via `jenkins.widgets.WidgetFactory` annotated with `@Extension`.

* Javadoc
2024-05-19 05:36:11 -06:00
Markus Winter afaf96ebc3 [JENKINS-73156] handle svg cleanup of symbols via an xml document (#9266)
[JENKINS-71356] handle svg cleanup via a xml document

some attributes and elements where removed via regular expressions.
Additionally `stroke:#000 was replaced with currentColor because there
are some icons that still use that.
This had sideeffects when symbols are used that are not just
black/white, e.g. using svg from jenkins artwork via customizable-header
plugin. There are construct like using class attributes and a style
definition referring to the classes. At other places there where color
definitions with `stroke:#000abc` which were incorrectly modified.

svg cleanup is now implemented with DOM manipulation which is more
robust.
5 icons that still used `stroke:#000` are converted to use
`stroke:currentColor`
2024-05-19 05:35:58 -06:00
Allan Burdajewicz eb65336ed5 [JENKINS-72622] Rename CloudSet query parameter to avoid conflict (#9198)
* [JENKINS-72622] Rename CloudSet query parameter to avoid conflict

* [JENKINS-72622] Address SpotBugs warning
2024-05-19 05:35:47 -06:00
Basil Crow 0117bf3e34 [JENKINS-73170] Upgrade Commons FileUpload from 1.5 to 2.0.0-M2 (#9259) 2024-05-18 09:42:08 -07:00
James NordandJesse Glick 94f715407c Ensure ClassLoaders have names for debugging (#9277)
* Ensure Classloaders have names for debugging

* update incremental version

* simplify name of UberClassloader and update since TODOs

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

* use released version of remoting

* set the minimum version of remoting

* pick up backward compatable remoting version

* update from remoting incremental version to release version

https://github.com/jenkinsci/remoting/releases/tag/3248.v65ecb_254c298

---------

Co-authored-by: Jesse Glick <jglick@cloudbees.com>
2024-05-18 09:20:56 -06:00
Jesse Glick aaf4b64cc0 [JENKINS-73090] Handle CR from LineTransformationOutputStream (#9219)
* [JENKINS-73090] Handle CR from `LineTransformationOutputStream`

* Spotless

* Strengthening test to assert that actual linefeed is passed to `eol`

* Also needed to adjust `HyperlinkNote` trick
2024-05-18 09:19:31 -06:00
Basil Crow ad571f8dec Clean up file parameter tests (#9260) 2024-05-12 15:39:20 +02:00
Scott K Logan 53b5e90aa6 [JENKINS-21605] Further reduce number of recorded upstream causes (#9248)
* Fix non-determinism in nested cause tests

For deeplyNestedCauses, quickly triggering a jobs with no quiet period
runs the possibility that a job is triggered while it is still in the
queue. Triggering and waiting for the jobs to execute synchronously
avoids this and also simplifies the code.

The broadlyNesstedCauses test suffers from the same problem, but is
additionally not structured in the way the original issue describes to
reproduce the issue. Using the quiet period argument to scheduleBuild2,
we can reliably produce a graph where each build is triggered by the
other two jobs. An additional final job outside of the loop cuts off the
1 second quiet period from the last loop's iteration so that the test is
never waiting for the quiet period of any jobs even though half of the
schedule operations specify one.

* Re-work nested cause trimming algorithm
2024-05-10 17:55:12 -06:00
Markus Winter fa0464cce6 [JENKINS-53958] allow pipeline jobs to run when built-in is offline (#9203) 2024-05-08 08:52:35 +01:00
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