Skip to content

Commit fb686ea

Browse files
committed
Merge commit '6107a8888b' into stable-2.541
2 parents d460d1a + 6107a88 commit fb686ea

File tree

50 files changed

+1295
-190
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+1295
-190
lines changed

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,15 @@
11
<!-- Comment:
22
A great PR typically begins with the line below.
3-
Replace XXXXX with the numeric part of the issue ID you created in Jira.
4-
Note that if you want your changes backported into LTS, you need to create a Jira issue. See https://www.jenkins.io/download/lts/#backporting-process for more information.
3+
Replace <issue-number> with the issue number.
54
-->
65

7-
See [JENKINS-XXXXX](https://issues.jenkins.io/browse/JENKINS-XXXXX).
6+
Fixes #<issue-number>
87

98
<!-- Comment:
10-
If the issue is not fully described in Jira, add more information here (justification, pull request links, etc.).
9+
If the issue is not fully described in the issue tracker, add more information here (justification, pull request links, etc.).
1110
12-
* We do not require Jira issues for minor improvements.
13-
* Bug fixes should have a Jira issue to facilitate the backporting process.
14-
* Major new features should have a Jira issue.
11+
* We do not require an issue for minor improvements.
12+
* Major new features should have an issue created.
1513
-->
1614

1715
### Testing done
@@ -34,8 +32,8 @@ For refactoring and code cleanup changes, exercise the code before and after the
3432
The changelog entry should be in the imperative mood; e.g., write "do this"/"return that" rather than "does this"/"returns that".
3533
For examples, see: https://www.jenkins.io/changelog/
3634
37-
Do not include the Jira issue in the changelog entry.
38-
Include the Jira issue in the description of the pull request so that the changelog generator can find it and include it in the generated changelog.
35+
Do not include the issue in the changelog entry.
36+
Include the issue in the description of the pull request so that the changelog generator can find it and include it in the generated changelog.
3937
4038
You may add multiple changelog entries if applicable by adding a new entry to the list, e.g.
4139
- First changelog entry
@@ -82,7 +80,7 @@ The changelog generator relies on the presence of the upgrade guidelines section
8280

8381
### Submitter checklist
8482

85-
- [ ] The Jira issue, if it exists, is well-described.
83+
- [ ] The issue, if it exists, is well-described.
8684
- [ ] The changelog entries and upgrade guidelines are appropriate for the audience affected by the change (users or developers, depending on the change) and are in the imperative mood (see [examples](https://github.com/jenkins-infra/jenkins.io/blob/master/content/_data/changelogs/weekly.yml)). Fill in the **Proposed upgrade guidelines** section only if there are breaking changes or changes that may require extra steps from users during upgrade.
8785
- [ ] There is automated testing or an explanation as to why this change has no tests.
8886
- [ ] New public classes, fields, and methods are annotated with `@Restricted` or have `@since TODO` Javadocs, as appropriate.
@@ -108,4 +106,4 @@ Before the changes are marked as `ready-for-merge`:
108106
- [ ] Changelog entries in the pull request title and/or **Proposed changelog entries** are accurate, human-readable, and in the imperative mood.
109107
- [ ] Proper changelog labels are set so that the changelog can be generated automatically.
110108
- [ ] If the change needs additional upgrade steps from users, the `upgrade-guide-needed` label is set and there is a **Proposed upgrade guidelines** section in the pull request title (see [example](https://github.com/jenkinsci/jenkins/pull/4387)).
111-
- [ ] If it would make sense to backport the change to LTS, a Jira issue must exist, be a _Bug_ or _Improvement_, and be labeled as `lts-candidate` to be considered (see [query](https://issues.jenkins.io/issues/?filter=12146)).
109+
- [ ] If it would make sense to backport the change to LTS, be a _Bug_ or _Improvement_, and either the issue or pull request must be labeled as `lts-candidate` to be considered.

.github/workflows/publish-release-artifact.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
2020
- name: Set up JDK 21
21-
uses: actions/setup-java@46c56d6f92c88cf540acf95a12a4a41197499222 #v 5.0.0
21+
uses: actions/setup-java@4e7e684fbb6e33f88ecb2cf1e6b3797739cf499b #v 5.0.0
2222
with:
2323
distribution: "temurin"
2424
java-version: 21
@@ -74,7 +74,7 @@ jobs:
7474
wget -q https://get.jenkins.io/${REPO}/${PROJECT_VERSION}/${FILE_NAME}
7575
- name: Upload Release Asset
7676
id: upload-war
77-
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
77+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
7878
env:
7979
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8080
with:
@@ -109,7 +109,7 @@ jobs:
109109
- name: Upload Release Asset
110110
id: upload-deb
111111
if: always()
112-
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
112+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
113113
env:
114114
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115115
with:
@@ -146,7 +146,7 @@ jobs:
146146
- name: Upload Release Asset
147147
id: upload-rpm
148148
if: always()
149-
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
149+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
150150
env:
151151
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
152152
with:
@@ -182,7 +182,7 @@ jobs:
182182
- name: Upload Release Asset
183183
id: upload-msi
184184
if: always()
185-
uses: softprops/action-gh-release@5be0e66d93ac7ed76da52eca8bb058f665c3a5fe # v2.4.2
185+
uses: softprops/action-gh-release@a06a81a03ee405af7f2048a818ed3f03bbf83c7b # v2.5.0
186186
env:
187187
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
188188
with:

CONTRIBUTING.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ This page provides information about contributing code to the Jenkins core codeb
1818

1919
If you want to contribute to Jenkins, or just learn about the project,
2020
you can start by fixing some easier issues.
21-
In the Jenkins issue tracker we mark such issues as `newbie-friendly`.
22-
You can find them by using this query (check the link) for [newbie friendly issues](<https://issues.jenkins.io/issues/?jql=project%20%3D%20JENKINS%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20component%20%3D%20core%20AND%20labels%20in%20(newbie-friendly)>).
21+
In the Jenkins issue tracker we mark such issues as `good first issue`.
22+
You can find them by using this query (check the link) for [good first issues](https://github.com/jenkinsci/jenkins/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22).
2323

2424
## Building and Debugging
2525

@@ -261,4 +261,4 @@ just submit a pull request.
261261
- [Jenkins Contribution Landing Page](https://www.jenkins.io/participate/)
262262
- [Jenkins Chat Channels](https://www.jenkins.io/chat/)
263263
- [Beginners Guide To Contributing](https://www.jenkins.io/participate/)
264-
- [List of newbie-friendly issues in the core](<https://issues.jenkins.io/issues/?jql=project%20%3D%20JENKINS%20AND%20status%20in%20(Open%2C%20%22In%20Progress%22%2C%20Reopened)%20AND%20component%20%3D%20core%20AND%20labels%20in%20(newbie-friendly)>)
264+
- [List of good first issues in core](https://github.com/jenkinsci/jenkins/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22)

Jenkinsfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@ properties([
1414

1515
def axes = [
1616
platforms: ['linux', 'windows'],
17-
jdks: [17, 21, 25],
17+
jdks: [21, 25],
1818
]
1919

2020
stage('Record build') {
2121
retry(conditions: [kubernetesAgent(handleNonKubernetes: true), nonresumable()], count: 2) {
22-
node('maven-17') {
22+
node('maven-21') {
2323
infra.checkoutSCM()
2424

2525
/*

README.md

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,32 @@
22
<img width="400" src="https://www.jenkins.io/images/jenkins-logo-title-dark.svg" alt="Jenkins logo">
33
</a>
44

5-
# About
6-
75
[![Jenkins Regular Release](https://img.shields.io/endpoint?url=https%3A%2F%2Fwww.jenkins.io%2Fchangelog%2Fbadge.json)](https://www.jenkins.io/changelog)
86
[![Jenkins LTS Release](https://img.shields.io/endpoint?url=https%3A%2F%2Fwww.jenkins.io%2Fchangelog-stable%2Fbadge.json)](https://www.jenkins.io/changelog-stable)
97
[![Docker Pulls](https://img.shields.io/docker/pulls/jenkins/jenkins.svg)](https://hub.docker.com/r/jenkins/jenkins/)
108
[![CII Best Practices](https://bestpractices.coreinfrastructure.org/projects/3538/badge)](https://bestpractices.coreinfrastructure.org/projects/3538)
119
[![Reproducible Builds](https://img.shields.io/badge/Reproducible_Builds-ok-green)](https://maven.apache.org/guides/mini/guide-reproducible-builds.html)
1210
[![Gitter](https://img.shields.io/gitter/room/jenkinsci/jenkins)](https://app.gitter.im/#/room/#jenkinsci_jenkins:gitter.im)
1311

12+
---
13+
14+
# Table of Contents
15+
16+
- [About](#about)
17+
- [What to Use Jenkins for and When to Use It](#what-to-use-jenkins-for-and-when-to-use-it)
18+
- [Downloads](#downloads)
19+
- [Getting Started (Development)](#getting-started-development)
20+
- [Source](#source)
21+
- [Contributing to Jenkins](#contributing-to-jenkins)
22+
- [News and Website](#news-and-website)
23+
- [Governance](#governance)
24+
- [Adopters](#adopters)
25+
- [License](#license)
26+
27+
---
28+
29+
# About
30+
1431
In a nutshell, Jenkins is the leading open-source automation server.
1532
Built with Java, it provides over 2,000 [plugins](https://plugins.jenkins.io/) to support automating virtually anything,
1633
so that humans can spend their time doing things machines cannot.
@@ -39,35 +56,64 @@ For all distributions Jenkins offers two release lines:
3956
Older release line which gets periodically updated via bug fix backports.
4057

4158
Latest releases:
59+
4260
[![Jenkins Regular Release](https://img.shields.io/endpoint?url=https%3A%2F%2Fwww.jenkins.io%2Fchangelog%2Fbadge.json)](https://www.jenkins.io/changelog)
4361
[![Jenkins LTS Release](https://img.shields.io/endpoint?url=https%3A%2F%2Fwww.jenkins.io%2Fchangelog-stable%2Fbadge.json)](https://www.jenkins.io/changelog-stable)
4462

63+
# Getting Started (Development)
64+
65+
For more information on setting up your development environment, contributing, and working with Jenkins internals, check the [contributing guide](CONTRIBUTING.md) and the [Jenkins Developer Documentation](https://www.jenkins.io/doc/developer/).
66+
4567
# Source
4668

4769
Our latest and greatest source of Jenkins can be found on [GitHub](https://github.com/jenkinsci/jenkins). Fork us!
4870

4971
# Contributing to Jenkins
5072

51-
Follow the [contributing guidelines](CONTRIBUTING.md) if you want to propose a change in the Jenkins core.
73+
New to open source or Jenkins? Here’s how to get started:
74+
75+
- Read the [Contribution Guidelines](CONTRIBUTING.md)
76+
- Check our [good first issues](https://github.com/jenkinsci/jenkins/issues?q=is%3Aissue%20is%3Aopen%20label%3A%22good%20first%20issue%22)
77+
- Join our [Gitter chat](https://app.gitter.im/#/room/#jenkinsci_newcomer-contributors:gitter.im) for questions and help
78+
5279
For more information about participating in the community and contributing to the Jenkins project,
5380
see [this page](https://www.jenkins.io/participate/).
5481

5582
Documentation for Jenkins core maintainers is in the [maintainers guidelines](docs/MAINTAINERS.adoc).
5683

5784
# News and Website
5885

59-
All information about Jenkins can be found on our [website](https://www.jenkins.io/).
60-
Follow us on [Twitter](https://twitter.com/jenkinsci) or [LinkedIn](https://www.linkedin.com/company/jenkins-project/).
86+
All information about Jenkins can be found on our [official website](https://www.jenkins.io/), including documentation, blog posts, plugin listings, community updates, and more.
87+
88+
Stay up-to-date with the latest Jenkins news, tutorials, and release notes:
89+
90+
- [Jenkins Blog](https://www.jenkins.io/blog/)
91+
- [Documentation](https://www.jenkins.io/doc/)
92+
- [Plugins Index](https://plugins.jenkins.io/)
93+
- [Events](https://www.jenkins.io/events/)
94+
95+
Follow Jenkins on social media to stay connected with the community:
96+
97+
- [Twitter / X](https://x.com/jenkinsci)
98+
- [YouTube](https://www.youtube.com/@jenkinscicd)
99+
- [LinkedIn](https://www.linkedin.com/company/jenkins-project/)
61100

62101
# Governance
63102

64-
See the [Jenkins Governance Document](https://www.jenkins.io/project/governance/) for information about the project's open governance, our philosophy and values, and development practices.
65-
Jenkins Code of Conduct can be found [here](https://www.jenkins.io/project/conduct/).
103+
The Jenkins project is governed by an open source community.
104+
To learn more about the governance structure, project leadership, and how decisions are made, visit the [Governance Page](https://www.jenkins.io/project/governance/).
66105

67106
# Adopters
68107

69-
Jenkins is used by millions of users and thousands of companies.
70-
See [adopters](https://www.jenkins.io/project/adopters/) for the list of Jenkins adopters and their success stories.
108+
Jenkins is trusted by **millions of users** and adopted by **thousands of companies** around the world — from startups to enterprises — to automate their software delivery pipelines.
109+
110+
Explore the [Adopters Page](https://www.jenkins.io/project/adopters/) and https://stories.jenkins.io to see:
111+
112+
- Companies and organizations using Jenkins
113+
- Success stories and case studies
114+
- How Jenkins is used in different industries
115+
116+
> If your company uses Jenkins and you'd like to be featured, feel free to [submit your story](https://www.jenkins.io/project/adopters/contributing/#share-your-story)!
71117
72118
# License
73119

cli/src/main/java/hudson/cli/PlainCLIProtocol.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,14 @@ public void run() {
153153
}
154154
} catch (ClosedChannelException x) {
155155
LOGGER.log(Level.FINE, null, x);
156-
side.handleClose();
157156
} catch (IOException x) {
158157
LOGGER.log(Level.WARNING, null, flightRecorder.analyzeCrash(x, "broken stream"));
159158
} catch (ReadPendingException x) {
160159
// in case trick in CLIAction does not work
161160
LOGGER.log(Level.FINE, null, x);
162-
side.handleClose();
163161
} catch (RuntimeException x) {
164162
LOGGER.log(Level.WARNING, null, x);
163+
} finally {
165164
side.handleClose();
166165
}
167166
}

core/src/main/java/hudson/Functions.java

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -203,6 +203,12 @@ public class Functions {
203203
private static final AtomicLong iota = new AtomicLong();
204204
private static Logger LOGGER = Logger.getLogger(Functions.class.getName());
205205

206+
/**
207+
* Escape hatch to use the non-recursive f:password masking.
208+
*/
209+
private static /* non-final */ boolean NON_RECURSIVE_PASSWORD_MASKING_PERMISSION_CHECK = SystemProperties.getBoolean(Functions.class.getName() + ".nonRecursivePasswordMaskingPermissionCheck");
210+
211+
206212
public Functions() {
207213
}
208214

@@ -1990,7 +1996,7 @@ public static String toEmailSafeString(String projectName) {
19901996
else
19911997
buf.append('_'); // escape
19921998
}
1993-
return String.valueOf(buf);
1999+
return buf.toString();
19942000
}
19952001

19962002
/**
@@ -2252,13 +2258,38 @@ public String getPasswordValue(Object o) {
22522258
StaplerRequest2 req = Stapler.getCurrentRequest2();
22532259
if (o instanceof Secret || Secret.BLANK_NONSECRET_PASSWORD_FIELDS_WITHOUT_ITEM_CONFIGURE) {
22542260
if (req != null) {
2255-
Item item = req.findAncestorObject(Item.class);
2256-
if (item != null && !item.hasPermission(Item.CONFIGURE)) {
2257-
return "********";
2258-
}
2259-
Computer computer = req.findAncestorObject(Computer.class);
2260-
if (computer != null && !computer.hasPermission(Computer.CONFIGURE)) {
2261-
return "********";
2261+
if (NON_RECURSIVE_PASSWORD_MASKING_PERMISSION_CHECK) {
2262+
Item item = req.findAncestorObject(Item.class);
2263+
if (item != null && !item.hasPermission(Item.CONFIGURE)) {
2264+
return "********";
2265+
}
2266+
Computer computer = req.findAncestorObject(Computer.class);
2267+
if (computer != null && !computer.hasPermission(Computer.CONFIGURE)) {
2268+
return "********";
2269+
}
2270+
} else {
2271+
List<Ancestor> ancestors = req.getAncestors();
2272+
for (Ancestor ancestor : Iterators.reverse(ancestors)) {
2273+
Object type = ancestor.getObject();
2274+
if (type instanceof Item item) {
2275+
if (!item.hasPermission(Item.CONFIGURE)) {
2276+
return "********";
2277+
}
2278+
break;
2279+
}
2280+
if (type instanceof Computer computer) {
2281+
if (!computer.hasPermission(Computer.CONFIGURE)) {
2282+
return "********";
2283+
}
2284+
break;
2285+
}
2286+
if (type instanceof View view) {
2287+
if (!view.hasPermission(View.CONFIGURE)) {
2288+
return "********";
2289+
}
2290+
break;
2291+
}
2292+
}
22622293
}
22632294
}
22642295
}

core/src/main/java/hudson/cli/CLIAction.java

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,11 @@
4040
import java.nio.charset.Charset;
4141
import java.nio.charset.UnsupportedCharsetException;
4242
import java.util.ArrayList;
43-
import java.util.HashMap;
4443
import java.util.List;
4544
import java.util.Locale;
4645
import java.util.Map;
4746
import java.util.UUID;
47+
import java.util.concurrent.ConcurrentHashMap;
4848
import java.util.logging.Level;
4949
import java.util.logging.Logger;
5050
import jenkins.model.Jenkins;
@@ -80,7 +80,7 @@ public class CLIAction implements UnprotectedRootAction, StaplerProxy {
8080
*/
8181
/* package-private for testing */ static /* non-final for Script Console */ Boolean ALLOW_WEBSOCKET = SystemProperties.optBoolean(CLIAction.class.getName() + ".ALLOW_WEBSOCKET");
8282

83-
private final transient Map<UUID, FullDuplexHttpService> duplexServices = new HashMap<>();
83+
private final transient Map<UUID, FullDuplexHttpService> duplexServices = new ConcurrentHashMap<>();
8484

8585
@Override
8686
public String getIconFileName() {
@@ -315,8 +315,13 @@ private synchronized void ready() {
315315

316316
void run() throws IOException, InterruptedException {
317317
synchronized (this) {
318-
while (!ready) {
319-
wait();
318+
long end = System.currentTimeMillis() + FullDuplexHttpService.CONNECTION_TIMEOUT;
319+
while (!ready && System.currentTimeMillis() < end) {
320+
wait(1000);
321+
}
322+
if (!ready) {
323+
LOGGER.log(Level.FINE, "CLI timeout waiting for client");
324+
return;
320325
}
321326
}
322327
PrintStream stdout = new PrintStream(streamStdout(), false, encoding);

0 commit comments

Comments
 (0)