Skip to content

Commit

Permalink
Merge branch 'master' into search-overhaul
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed May 30, 2022
2 parents 19587f6 + d2e3468 commit bc9a82b
Show file tree
Hide file tree
Showing 25 changed files with 114 additions and 131 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"]
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.7.0</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
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
import edu.umd.cs.findbugs.annotations.NonNull;
import hudson.ExtensionList;
import java.net.URL;
import org.apache.log4j.Logger;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.kohsuke.MetaInfServices;
import org.kohsuke.accmod.Restricted;
import org.kohsuke.accmod.restrictions.NoExternalUse;
Expand All @@ -53,7 +54,7 @@ public URL lookup(@NonNull String s) {
return url;
}
} catch (RuntimeException e) {
LOGGER.warn("Failed to lookup URL for '" + s + "' from '" + provider.toString(), e);
LOGGER.log(Level.WARNING, "Failed to lookup URL for '" + s + "' from '" + provider.toString(), e);
}
}
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ THE SOFTWARE.
<link rel="stylesheet" type="text/css" href="${resURL}/scripts/yui/assets/skins/sam/resize.css"/>
<script type="text/javascript" src="${resURL}/scripts/yui/resize/resize-min.js"></script>

<j:invokeStatic var="tz" className="java.util.TimeZone" method="getDefault"/>
<div id="build-timeline-div" data-hour-local-timezone="${(tz.rawOffset + tz.DSTSavings) / 3600000}"></div>
<j:invokeStatic var="hourLocalTimezone" className="hudson.Functions" method="getHourLocalTimezone"/>
<div id="build-timeline-div" data-hour-local-timezone="${hourLocalTimezone}"></div>
<st:adjunct includes="hudson.model.BuildTimelineWidget.build-timeline-widget" />
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

OK=OK
OK=Tudo certo
7 changes: 3 additions & 4 deletions core/src/main/resources/hudson/scm/Messages_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@

NullSCM.DisplayName=Nenhum
SCM.Permissions.Title=SCM
# \
# This permission allows users to create a new tag in the source code repository \
# for a given build.
SCM.TagPermission.Description=Essa op\u00e7\u00e3o permite aos usu\u00e1rios criarem uma nova TAG no reposit\u00f3rio de c\u00f3digo fonte
SCM.TagPermission.Description=\
Permite aos usu\u00E1rios criarem etiquetas no reposit\u00F3rio do c\u00F3digo-fonte para uma dada constru\u00E7\u00E3o.

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
# THE SOFTWARE.

Tunnel\ connection\ through=T\u00FAnel conecta atrav\u00E9s
JVM\ options=Op\u00E7\u00F5es da JVM
Enable\ work\ directory=Habilitar\ diret\u00F3rio\ de\ trabalho
Enable\ work\ directory=Habilitar diret\u00F3rio de trabalho
Use\ WebSocket=Usar\ um\ websocket
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# The MIT License
#
# Copyright (c) 2004-2010, Sun Microsystems, Inc., Cleiber Silva, Fernando Boaglio
# Copyright (c) 2004-, Kohsuke Kawaguchi, Sun Microsystems, Inc., and a number
# of other of contributors
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
Expand All @@ -20,12 +21,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

launch\ agent=Lan\u00E7ar agente
slaveAgentPort.disabled=Porta TCP para JNLP est\u00E1 desativada
configure.link.text=V\u00E1 para a p\u00E1gina de configura\u00E7\u00E3o de seguran\u00E7a para alterar
Or\ if\ the\ agent\ is\ headless\:=Ou\ se\ o\ agente\ for\ do\ tipo\ sem\ interface\ gr\u00E1fica
Agent\ is\ connected.=O\ agente\ est\u00E1\ conectado.
Run\ from\ agent\ command\ line,\ with\ the\ secret\ stored\ in\ a\ file\:=Executar\ da\ linha\ de\ comando\ do\ agente\ com\ um\ segredo\ armazenado\ em\ um\ arquivo\:
Launch\ agent\ from\ browser=Lan\u00E7ar\ um\ agente\ de\ um\ navegador
Connect\ agent\ to\ Jenkins\ one\ of\ these\ ways\:=Conectar\ o\ agente\ com\ o\ Jenkins\ usando\ uma\ das\ seguintes\ maneiras\:
Run\ from\ agent\ command\ line\:=Executar\ da\ linha\ de\ comando\ do\ agente\:
Or\ run\ from\ agent\ command\ line,\ with\ the\ secret\ stored\ in\ a\ file\:=Ou execute pela linha de comando do \
agente com o segredo armazenado em um arquivo:
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ THE SOFTWARE.
<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">
<td style="${indenter.getCss(job)}">
<!-- TODO consider using ${rootURL}/${job.url} instead (also in other column.jelly) -->
<a href="${jobBaseUrl}${job.shortUrl}" class='jenkins-table__link model-link inside'> <l:breakable value="${h.getRelativeDisplayNameFrom(job, itemGroup)}"/></a>
<a href="${jobBaseUrl}${job.shortUrl}" class='jenkins-table__link model-link inside'><span><l:breakable value="${h.getRelativeDisplayNameFrom(job, itemGroup)}"/></span></a>
</td>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,8 @@
Check\ File\ Fingerprint=Verificar impress\u00E3o digital do arquivo
File\ to\ check=Arquivo para verificar
Check=Verificar
# https://www.jenkins.io/redirect/fingerprint
fingerprint.link=https://www.jenkins.io/redirect/fingerprint
# \
# Got a jar file but don''t know which version it is? <br /> \
# Find that out by checking the fingerprint against \
# the database in Jenkins
description=\
Tem um arquivo jar mas n\u00E3o sabe em qual vers\u00e3o est\u00e1? <br /> \
Descubra atrav\u00e9s dos fingerprints na base de dados do Jenkins
Tem um arquivo jar mas n\u00E3o sabe em qual vers\u00E3o est\u00E1? <br /> \
Descubra atrav\u00E9s dos fingerprints na base de dados do Jenkins
more\ details=mais detalhes

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ DefaultProjectNamingStrategy.DisplayName=Padr\u00E3o
ParameterizedJobMixIn.build_with_parameters=Construir com par\u00E2metros
ParameterizedJobMixIn.build_now=Construir agora
BlockedBecauseOfBuildInProgress.shortDescription=A constru\u00E7\u00E3o #{0} j\u00E1 est\u00E1 em progresso {1}
BlockedBecauseOfBuildInProgress.ETA=\ (ETA: {0})
BlockedBecauseOfBuildInProgress.ETA=\ (Tempo estimado de t\u00E9rmino: {0})
BuildDiscarderProperty.displayName=Descartar constru\u00E7\u00F5es antigas
CLI.disable-job.shortDescription=Desabilitar uma tarefa
CLI.enable-job.shortDescription=Habilita uma tarefa
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,10 @@

More\ Info=Mais informa\u00E7\u00E3o
Dismiss=Dispensar
Recommended_Java_Version=<p class="jenkins-!-margin-bottom-0">Voc\u00EA est\u00E1 executando o Jenkins com o Java {0}, cujo \
suporte ser\u00E1 encerrado em <strong>21 de junho de 2022</strong>. Isto \u00E9 antes do que a data previamente anunciada.</p>\
<p class="jenkins-!-margin-top-0">A linha de suporte de longo per\u00EDodo (LTS) do Jenkins continuar\u00E1 a suportar esta \
vers\u00E3o at\u00E9 setembro de 2022.</p><p>Por favor se refira a \
<a href="https://www.jenkins.io/redirect/upgrading-jenkins-java-version-8-to-11" target="_blank" rel="noopener noreferrer">\
a documenta\u00E7\u00E3o</a> para maiores detalhes sobre atualizar para o Java vers\u00E3o 11.</p>
Recommended_Java_Version_Heading=Fim de suporte ao Java {0} pelo Jenkins
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
import hudson.slaves.SlaveComputer

def fmt = new java.text.DecimalFormat("0.0")
def right = 'text-align: right'
if (my instanceof SlaveComputer) {
SlaveComputer c = my

table(class: 'bigtable') {
tr {
th _('Loading Type')
th _('Time (s)')
th _('Count')
table(class: 'jenkins-table') {
thead {
tr {
th { text(_('Loading Type')) }
th { text(_('Time (s)')) }
th { text(_('Count')) }
}
}
tr {
td _('Classes')
td(style: right) {text(fmt.format(c.classLoadingTime / 1000000000))}
td(style: right) {
td {text(fmt.format(c.classLoadingTime / 1000000000))}
td {
text(c.classLoadingCount)
def classLoadingPrefetchCacheCount = c.classLoadingPrefetchCacheCount
if (classLoadingPrefetchCacheCount != -1) {
Expand All @@ -26,8 +27,8 @@ if (my instanceof SlaveComputer) {
}
tr {
td _('Resources')
td(style: right) {text(fmt.format(c.resourceLoadingTime / 1000000000))}
td(style: right) {text(c.resourceLoadingCount)}
td {text(fmt.format(c.resourceLoadingTime / 1000000000))}
td {text(c.resourceLoadingCount)}
}
}
}
3 changes: 2 additions & 1 deletion core/src/main/resources/lib/hudson/buildListTable.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ THE SOFTWARE.
insert(generateSVGIcon(e.iconName, "${iconSizeClass}"))));
tr.insert(new Element('td').
insert(new Element('a', {class: 'jenkins-table__link model-link', href: '${rootURL}/' + e.parentUrl}).
update(e.parentFullDisplayName)).
insert(new Element('span').
update(e.parentFullDisplayName))).
insert(new Element('a', {class: 'jenkins-table__link jenkins-table__badge model-link inside', href: '${rootURL}/' + e.url}).
update(e.displayName.escapeHTML())));
tr.insert(new Element('td', {data: e.timestampString2}).
Expand Down
2 changes: 0 additions & 2 deletions core/src/main/resources/lib/layout/layout.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,6 @@ THE SOFTWARE.
<l:yui module="storage" />
<!--l:yui module="editor" suffix="-beta" /-->

<script src="${resURL}/scripts/polyfills.js" type="text/javascript" />

<script src="${resURL}/scripts/hudson-behavior.js" type="text/javascript"></script>
<script src="${resURL}/scripts/sortable.js" type="text/javascript"/>

Expand Down
2 changes: 0 additions & 2 deletions core/src/main/resources/lib/layout/layout_pt_BR.properties
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@
# THE SOFTWARE.

search=pesquisar
# https://www.jenkins.io/redirect/search-box
searchBox.url=https://www.jenkins.io/redirect/search-box
# log out
logout=sair
title=Jenkins
jenkinshead.alt=Jenkins
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ THE SOFTWARE.
</issueManagement>

<properties>
<revision>2.349</revision>
<revision>2.350</revision>
<changelist>-SNAPSHOT</changelist>

<!-- *.html files are in UTF-8, and *.properties are in iso-8859-1, so this configuration is actually incorrect,
Expand Down
2 changes: 1 addition & 1 deletion src/checkstyle/checkstyle-configuration.xml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
</module>
<module name="IllegalImport">
<!-- prevent the use of jsr-305 annotations and Spring utilities -->
<property name="illegalClasses" value="javax.annotation.MatchesPattern.Checker, javax.annotation.Nonnegative.Checker, javax.annotation.Nonnull.Checker, javax.annotation.RegEx.Checker, javax.annotation.CheckForNull, javax.annotation.CheckForSigned, javax.annotation.CheckReturnValue, javax.annotation.Detainted, javax.annotation.MatchesPattern, javax.annotation.Nonnegative, javax.annotation.Nonnull, javax.annotation.Nullable, javax.annotation.OverridingMethodsMustInvokeSuper, javax.annotation.ParametersAreNonnullByDefault, javax.annotation.ParametersAreNullableByDefault, javax.annotation.PropertyKey, javax.annotation.RegEx, javax.annotation.Signed, javax.annotation.Syntax, javax.annotation.Tainted, javax.annotation.Untainted, javax.annotation.WillClose, javax.annotation.WillCloseWhenClosed, javax.annotation.WillNotClose, javax.annotation.concurrent.GuardedBy, javax.annotation.concurrent.Immutable, javax.annotation.concurrent.NotThreadSafe, javax.annotation.concurrent.ThreadSafe, javax.annotation.meta.TypeQualifierValidator, javax.annotation.meta.When, javax.annotation.meta.Exclusive, javax.annotation.meta.Exhaustive, javax.annotation.meta.TypeQualifier, javax.annotation.meta.TypeQualifierDefault, javax.annotation.meta.TypeQualifierNickname, org.springframework.util.Assert, org.springframework.util.StringUtils"/>
<property name="illegalClasses" value="javax.annotation.MatchesPattern.Checker, javax.annotation.Nonnegative.Checker, javax.annotation.Nonnull.Checker, javax.annotation.RegEx.Checker, javax.annotation.CheckForNull, javax.annotation.CheckForSigned, javax.annotation.CheckReturnValue, javax.annotation.Detainted, javax.annotation.MatchesPattern, javax.annotation.Nonnegative, javax.annotation.Nonnull, javax.annotation.Nullable, javax.annotation.OverridingMethodsMustInvokeSuper, javax.annotation.ParametersAreNonnullByDefault, javax.annotation.ParametersAreNullableByDefault, javax.annotation.PropertyKey, javax.annotation.RegEx, javax.annotation.Signed, javax.annotation.Syntax, javax.annotation.Tainted, javax.annotation.Untainted, javax.annotation.WillClose, javax.annotation.WillCloseWhenClosed, javax.annotation.WillNotClose, javax.annotation.concurrent.GuardedBy, javax.annotation.concurrent.Immutable, javax.annotation.concurrent.NotThreadSafe, javax.annotation.concurrent.ThreadSafe, javax.annotation.meta.TypeQualifierValidator, javax.annotation.meta.When, javax.annotation.meta.Exclusive, javax.annotation.meta.Exhaustive, javax.annotation.meta.TypeQualifier, javax.annotation.meta.TypeQualifierDefault, javax.annotation.meta.TypeQualifierNickname, org.apache.log4j.Logger, org.springframework.util.Assert, org.springframework.util.StringUtils"/>
<!-- Prevent the expansion of Guava usages and ban internal library packages -->
<property name="illegalPkgs" value="com.google.common.base, com.google.common.escape, com.google.common.eventbus, com.google.common.graph, com.google.common.hash, com.google.common.html, com.google.common.io, com.google.common.math, com.google.common.net, com.google.common.primitives, com.google.common.reflect, com.google.common.xml, com.google.thirdparty, jline.internal"/>
</module>
Expand Down
Loading

0 comments on commit bc9a82b

Please sign in to comment.