Skip to content

Commit

Permalink
Merge branch 'master' into move-manage-jenkins-less
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Jun 8, 2022
2 parents 8b22270 + 77a36fc commit 8c4b466
Show file tree
Hide file tree
Showing 125 changed files with 353 additions and 177 deletions.
75 changes: 48 additions & 27 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
version: 2
updates:
- package-ecosystem: "github-actions"
Expand All @@ -9,36 +10,56 @@ updates:
schedule:
interval: "daily"
ignore:
# see https://github.com/jenkinsci/jenkins/pull/5112#issuecomment-744429487 and https://github.com/jenkinsci/jenkins/pull/5116#issuecomment-744526638
# it would be good to update it at some point, but requires significant testing
# Exclusions in this section have been triaged and determined to be
# permanent. We do not anticipate removing exclusions from this section.

# Provided by Jetty and should be aligned with the version provided by the
# version of Jetty we deliver. See:
# https://github.com/jenkinsci/jenkins/pull/5211
- dependency-name: "javax.servlet:javax.servlet-api"

# Jetty Maven Plugin and Winstone should be upgraded in lockstep in order
# to keep their corresponding Jetty versions aligned.
- dependency-name: "org.eclipse.jetty:jetty-maven-plugin"
- dependency-name: "org.jenkins-ci:winstone"

# Log4j 1.2.17 is the final 1.x release.
- dependency-name: "log4j:log4j"


# Here lies technical debt. Exclusions in this section have been triaged
# and determined to be temporary. Exclusions should be removed from this
# section once the remaining action items have been completed.

# Fails test automation; needs further investigation.
- dependency-name: "com.google.inject:guice-bom"

# Requires Java 11 starting with version 10.0.
- dependency-name: "com.puppycrawl.tools:checkstyle"
versions: [">=10.0"]

# Contains incompatible API changes and needs compatibility work.
- dependency-name: "jakarta.servlet.jsp.jstl:jakarta.servlet.jsp.jstl-api"

# This is a banned dependency, and we have a redundant trick in our POM to
# prevent it from being pulled in. If and when the reference is removed in
# our POM, this exclusion can also be removed.
- dependency-name: "javax.servlet:servlet-api"

# Needs significant testing. See:
# https://github.com/jenkinsci/jenkins/pull/5112#issuecomment-744429487
# https://github.com/jenkinsci/jenkins/pull/5116#issuecomment-744526638
- dependency-name: "org.codehaus.groovy:groovy-all"
versions: [">=2.5.0"]
# see https://github.com/jenkinsci/jenkins/pull/5184 should be updated with groovy-all

# Consumed by Groovy and should be updated in lockstep with Groovy. See:
# https://github.com/jenkinsci/jenkins/pull/5184
- dependency-name: "org.fusesource.jansi:jansi"
# see https://github.com/jenkinsci/jenkins/pull/5144#pullrequestreview-559661934
# will require source code changes to replace javax.mail with jakarta.mail
# and some handling for plugins that depend on javax.mail being provided by Jenkins core.
- dependency-name: "com.sun.mail:jakarta.mail"
# this is a banned dependency, we have a hack in our pom to prevent anyone else pulling it in
- dependency-name: "javax.servlet.servlet-api"
# needs a jakarta upgrade project, imports changed
- dependency-name: "jakarta.servlet.jsp.jstl.jakarta.servlet.jsp.jstl-api"
# Starting with version 2.0.2, this library requires Java 11

# Requires Java 11 starting with version 2.0.2.
- dependency-name: "org.glassfish.tyrus.bundles:tyrus-standalone-client-jdk"
versions: [">=2.0.2"]
# see https://github.com/jenkinsci/jenkins/pull/4224 can't be updated without breaking api

# Contains incompatible API changes and needs compatibility work. See:
# https://github.com/jenkinsci/jenkins/pull/4224
- dependency-name: "org.jfree:jfreechart"
# the dependency is actually provided by the Web container, hence it is aligned with Jetty. See https://github.com/jenkinsci/jenkins/pull/5211
- dependency-name: "javax.servlet:javax.servlet-api"
# log4j 1.2.17 is the final 1.x release
- dependency-name: "log4j:log4j"
# using a newer version clashes in RequireUpperBoundDeps with plugins using a valid script-security dependency
- dependency-name: "org.jenkins-ci:symbol-annotation"
# Must remain within jetty 9.x until Java 8 support is removed, ignore jetty 10.x and jetty 11.x updates
- dependency-name: "org.eclipse.jetty:jetty-maven-plugin"
versions: [">=10.0.0"]
# Winstone upgrades require multiple changes in pom.xml. See https://github.com/jenkinsci/jenkins/pull/5439#discussion_r616418468
- dependency-name: "org.jenkins-ci:winstone"
# Starting with version 10.0, this library requires Java 11
- dependency-name: "com.puppycrawl.tools:checkstyle"
versions: [">=10.0"]
10 changes: 6 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
[![][ButlerImage]][website]
<a href="https://jenkins.io">
<picture>
<source width="400" media="(prefers-color-scheme: dark)" srcset="https://www.jenkins.io/images/jenkins-logo-title-dark.svg">
<img width="400" src="https://www.jenkins.io/images/jenkins-logo-title.svg">
</picture>
</a>

# About

Expand Down Expand Up @@ -68,9 +73,6 @@ See [adopters](https://www.jenkins.io/project/adopters/) for the list of Jenkins
# License
Jenkins is **licensed** under the **[MIT License]**.


[ButlerImage]: https://www.jenkins.io/sites/default/files/jenkins_logo.png
[MIT License]: https://github.com/jenkinsci/jenkins/blob/master/LICENSE.txt
[Mirrors]: http://mirrors.jenkins-ci.org
[GitHub]: https://github.com/jenkinsci/jenkins
[website]: https://www.jenkins.io/
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ THE SOFTWARE.
<!-- https://docs.spring.io/spring-security/site/docs/5.5.4/reference/html5/#getting-maven-no-boot -->
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-bom</artifactId>
<version>5.6.3</version>
<version>5.7.1</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down Expand Up @@ -239,7 +239,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci</groupId>
<artifactId>symbol-annotation</artifactId>
<version>1.1</version>
<version>1.23</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci</groupId>
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -832,7 +832,7 @@ THE SOFTWARE.
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- Make sure to keep the directives in test/pom.xml and war/pom.xml in sync with these. -->
<argLine>@{jacocoSurefireArgs} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED</argLine>
<argLine>@{jacocoSurefireArgs} --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.io=ALL-UNNAMED --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.desktop/com.sun.beans.introspect=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
Expand Down
8 changes: 8 additions & 0 deletions core/src/main/java/hudson/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@
import java.util.SortedMap;
import java.util.TimeZone;
import java.util.TreeMap;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.function.Predicate;
import java.util.logging.Level;
Expand Down Expand Up @@ -699,6 +700,13 @@ public static String getUserTimeZonePostfix() {
return tz.getDisplayName(tz.observesDaylightTime(), TimeZone.SHORT);
}

@Restricted(NoExternalUse.class)
public static long getHourLocalTimezone() {
// Work around JENKINS-68215. When JENKINS-68215 is resolved, this logic can be moved back to Jelly.
TimeZone tz = TimeZone.getDefault();
return TimeUnit.MILLISECONDS.toHours(tz.getRawOffset() + tz.getDSTSavings());
}

/**
* Finds the given object in the ancestor list and returns its URL.
* This is used to determine the "current" URL assigned to the given object,
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/ProxyConfiguration.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@

import com.thoughtworks.xstream.XStream;
import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.model.AbstractDescribableImpl;
import hudson.model.Descriptor;
import hudson.model.Saveable;
Expand Down Expand Up @@ -400,6 +401,7 @@ private static void decorate(URLConnection con) throws IOException {

@Extension @Symbol("proxy")
public static class DescriptorImpl extends Descriptor<ProxyConfiguration> {
@NonNull
@Override
public String getDisplayName() {
return "Proxy Configuration";
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/java/hudson/cli/CLIAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public void close() throws IOException {
}
}

private void doClose() {
private void doClose() throws IOException {
close();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.console;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.DescriptorExtensionList;
import hudson.ExtensionPoint;
import hudson.model.Descriptor;
Expand Down Expand Up @@ -55,6 +56,7 @@ protected ConsoleAnnotationDescriptor() {
*
* Users use this name to enable/disable annotations.
*/
@NonNull
@Override
public String getDisplayName() {
return super.getDisplayName();
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/console/ExpandableDetailsNote.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.console;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.MarkupText;
import java.io.IOException;
Expand Down Expand Up @@ -67,6 +68,7 @@ public static String encodeTo(String buttonCaption, String html) {

@Extension
public static final class DescriptorImpl extends ConsoleAnnotationDescriptor {
@NonNull
@Override
public String getDisplayName() {
return "Expandable details";
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/console/HyperlinkNote.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.console;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.MarkupText;
import hudson.Util;
Expand Down Expand Up @@ -102,6 +103,7 @@ static String encodeTo(String url, String text, BiFunction<String, Integer, Cons

@Extension @Symbol("hyperlink")
public static class DescriptorImpl extends ConsoleAnnotationDescriptor {
@NonNull
@Override
public String getDisplayName() {
return "Hyperlinks";
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/hudson/console/ModelHyperlinkNote.java
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ public static String encodeTo(String url, String text) {

@Extension @Symbol("hyperlinkToModels")
public static class DescriptorImpl extends HyperlinkNote.DescriptorImpl {
@NonNull
@Override
public String getDisplayName() {
return "Hyperlinks to models";
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/markup/EscapedMarkupFormatter.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.markup;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Util;
import java.io.IOException;
Expand Down Expand Up @@ -53,6 +54,7 @@ public void translate(String markup, Writer output) throws IOException {
@Extension @Symbol("plainText")
public static class DescriptorImpl extends MarkupFormatterDescriptor {

@NonNull
@Override
public String getDisplayName() {
return Messages.EscapedMarkupFormatter_DisplayName();
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/hudson/model/AllView.java
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ public boolean isApplicableIn(ViewGroup owner) {
return true;
}

@NonNull
@Override
public String getDisplayName() {
return Messages.Hudson_ViewName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ public boolean equals(Object obj) {
// to avoid picking the Java reserved word "boolean" as the primary identifier
@Extension @Symbol("booleanParam")
public static class DescriptorImpl extends ParameterDescriptor {
@NonNull
@Override
public String getDisplayName() {
return Messages.BooleanParameterDefinition_DisplayName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,7 @@ public boolean equals(Object obj) {

@Extension @Symbol({"choice", "choiceParam"})
public static class DescriptorImpl extends ParameterDescriptor {
@NonNull
@Override
public String getDisplayName() {
return Messages.ChoiceParameterDefinition_DisplayName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ public FileParameterValue createValue(StaplerRequest req, JSONObject jo) {

@Extension @Symbol({"file", "fileParam"})
public static class DescriptorImpl extends ParameterDescriptor {
@NonNull
@Override
public String getDisplayName() {
return Messages.FileParameterDefinition_DisplayName();
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/model/FreeStyleProject.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.model;

import edu.umd.cs.findbugs.annotations.NonNull;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import hudson.Extension;
import jenkins.model.Jenkins;
Expand Down Expand Up @@ -82,6 +83,7 @@ public DescriptorImpl() {
DESCRIPTOR = this;
}

@NonNull
@Override
public String getDisplayName() {
return Messages.FreeStyleProject_DisplayName();
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/model/JDK.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.model;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.EnvVars;
import hudson.Extension;
import hudson.Launcher;
Expand Down Expand Up @@ -174,6 +175,7 @@ public static boolean isDefaultJDKValid(Node n) {
@Extension @Symbol("jdk")
public static class DescriptorImpl extends ToolDescriptor<JDK> {

@NonNull
@Override
public String getDisplayName() {
return Messages.JDK_DisplayName();
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/model/ListView.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
package hudson.model;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Util;
import hudson.diagnosis.OldDataMonitor;
Expand Down Expand Up @@ -499,6 +500,7 @@ public void setStatusFilter(Boolean statusFilter) {

@Extension @Symbol("list")
public static class DescriptorImpl extends ViewDescriptor {
@NonNull
@Override
public String getDisplayName() {
return Messages.ListView_DisplayName();
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/model/MyView.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.model;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.model.Descriptor.FormException;
import java.io.IOException;
Expand Down Expand Up @@ -99,6 +100,7 @@ public boolean isInstantiable() {
return Jenkins.get().isUseSecurity();
}

@NonNull
@Override
public String getDisplayName() {
return Messages.MyView_DisplayName();
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/model/MyViewsProperty.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
package hudson.model;

import edu.umd.cs.findbugs.annotations.CheckForNull;
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Util;
import hudson.model.Descriptor.FormException;
Expand Down Expand Up @@ -235,6 +236,7 @@ public String getUrlName() {
@Extension @Symbol("myView")
public static class DescriptorImpl extends UserPropertyDescriptor {

@NonNull
@Override
public String getDisplayName() {
return Messages.MyViewsProperty_DisplayName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ public boolean equals(Object obj) {

@Extension @Symbol("password")
public static final class ParameterDescriptorImpl extends ParameterDescriptor {
@NonNull
@Override
public String getDisplayName() {
return Messages.PasswordParameterDefinition_DisplayName();
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/java/hudson/model/ProxyView.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@

package hudson.model;

import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.Extension;
import hudson.Util;
import hudson.model.Descriptor.FormException;
Expand Down Expand Up @@ -129,6 +130,7 @@ public FormValidation doViewExistsCheck(@QueryParameter String value) {
@Extension @Symbol("proxy")
public static class DescriptorImpl extends ViewDescriptor {

@NonNull
@Override
public String getDisplayName() {
return Messages.ProxyView_DisplayName();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ public RunList getBuilds() {

@Extension @Symbol({"run", "runParam"})
public static class DescriptorImpl extends ParameterDescriptor {
@NonNull
@Override
public String getDisplayName() {
return Messages.RunParameterDefinition_DisplayName();
Expand Down
Loading

0 comments on commit 8c4b466

Please sign in to comment.