Skip to content

Commit

Permalink
Merge branch 'master' into no-updates-notice
Browse files Browse the repository at this point in the history
  • Loading branch information
timja authored Aug 12, 2023
2 parents def56f5 + f4ff508 commit d2fd271
Show file tree
Hide file tree
Showing 52 changed files with 671 additions and 606 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/label-lts-prs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Label PRs targeting LTS branches

on: [pull_request_target]

permissions:
pull-requests: write

jobs:
label:
runs-on: ubuntu-latest
steps:
- name: Check if PR targets LTS branch
if: startsWith(github.event.pull_request.base.ref, 'stable-')
uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
issue_number: context.payload.pull_request.number,
labels: ['into-lts']
});
2 changes: 1 addition & 1 deletion .gitpod/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM gitpod/workspace-full

ARG MAVEN_VERSION=3.9.3
ARG MAVEN_VERSION=3.9.4

RUN brew install gh && \
bash -c ". /home/gitpod/.sdkman/bin/sdkman-init.sh && sdk install maven ${MAVEN_VERSION} && sdk default maven ${MAVEN_VERSION}"
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ properties([

def axes = [
platforms: ['linux', 'windows'],
jdks: [11, 17, 19],
jdks: [11, 17, 21],
]

stage('Record build') {
Expand Down
2 changes: 1 addition & 1 deletion ath.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -o xtrace
cd "$(dirname "$0")"

# https://github.com/jenkinsci/acceptance-test-harness/releases
export ATH_VERSION=5659.v28d85a_47a_73a_
export ATH_VERSION=5689.v4df8c8248244

if [[ $# -eq 0 ]]; then
export JDK=17
Expand Down
2 changes: 1 addition & 1 deletion bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ THE SOFTWARE.
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>32.1.1-jre</version>
<version>32.1.2-jre</version>
</dependency>
<dependency>
<!-- Overriding Stapler’s 1.1.3 version to diagnose JENKINS-20618: -->
Expand Down
2 changes: 1 addition & 1 deletion core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ THE SOFTWARE.
<!-- Version specified in grandparent POM -->
<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 --add-opens java.desktop/com.sun.beans.introspect=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</argLine>
<reuseForks>false</reuseForks>
</configuration>
</plugin>
Expand Down
1 change: 1 addition & 0 deletions core/src/main/java/hudson/TcpSlaveAgentListener.java
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ private void respondHello(String header, Socket s) throws IOException {
if (header.startsWith("GET / ")) {
response = "HTTP/1.0 200 OK\r\n" +
"Content-Type: text/plain;charset=UTF-8\r\n" +
"X-Content-Type-Options: nosniff\r\n" +
"\r\n" +
"Jenkins-Agent-Protocols: " + getAgentProtocolNames() + "\r\n" +
"Jenkins-Version: " + Jenkins.VERSION + "\r\n" +
Expand Down
25 changes: 25 additions & 0 deletions core/src/main/java/hudson/Util.java
Original file line number Diff line number Diff line change
Expand Up @@ -1927,4 +1927,29 @@ public static long daysElapsedSince(@NonNull Date date) {
private static PathRemover newPathRemover(@NonNull PathRemover.PathChecker pathChecker) {
return PathRemover.newFilteredRobustRemover(pathChecker, DELETION_RETRIES, GC_AFTER_FAILED_DELETE, WAIT_BETWEEN_DELETION_RETRIES);
}

/**
* Returns SHA-256 Digest of input bytes
*/
@Restricted(NoExternalUse.class)
public static byte[] getSHA256DigestOf(@NonNull byte[] input) {
try {
MessageDigest messageDigest = MessageDigest.getInstance("SHA-256");
messageDigest.update(input);
return messageDigest.digest();
} catch (NoSuchAlgorithmException noSuchAlgorithmException) {
throw new IllegalStateException("SHA-256 could not be instantiated, but is required to" +
" be implemented by the language specification", noSuchAlgorithmException);
}
}

/**
* Returns Hex string of SHA-256 Digest of passed input
*/
@Restricted(NoExternalUse.class)
public static String getHexOfSHA256DigestOf(byte[] input) throws IOException {
//get hex string of sha 256 of payload
byte[] payloadDigest = Util.getSHA256DigestOf(input);
return (payloadDigest != null) ? Util.toHexString(payloadDigest) : null;
}
}
6 changes: 3 additions & 3 deletions core/src/main/java/hudson/model/ManageJenkinsAction.java
Original file line number Diff line number Diff line change
Expand Up @@ -79,13 +79,13 @@ public ContextMenu doContextMenu(StaplerRequest request, StaplerResponse respons
* menu.
*/
@Restricted(NoExternalUse.class)
public void addContextMenuItem(ContextMenu menu, String url, String icon, String iconXml, String text, boolean post, boolean requiresConfirmation, Badge badge) {
public void addContextMenuItem(ContextMenu menu, String url, String icon, String iconXml, String text, boolean post, boolean requiresConfirmation, Badge badge, String message) {
if (Stapler.getCurrentRequest().findAncestorObject(this.getClass()) != null || !Util.isSafeToRedirectTo(url)) {
// Default behavior if the URL is absolute or scheme-relative, or the current object is an ancestor (i.e. would resolve correctly)
menu.add(url, icon, iconXml, text, post, requiresConfirmation, badge);
menu.add(url, icon, iconXml, text, post, requiresConfirmation, badge, message);
return;
}
// If neither is the case, rewrite the relative URL to point to inside the /manage/ URL space
menu.add("manage/" + url, icon, iconXml, text, post, requiresConfirmation, badge);
menu.add("manage/" + url, icon, iconXml, text, post, requiresConfirmation, badge, message);
}
}
7 changes: 1 addition & 6 deletions core/src/main/java/hudson/model/Run.java
Original file line number Diff line number Diff line change
Expand Up @@ -1242,12 +1242,7 @@ private static int addArtifacts(@NonNull VirtualFile dir,
/**
* Maximum number of artifacts to list before using switching to the tree view.
*/
public static final int LIST_CUTOFF = Integer.parseInt(SystemProperties.getString("hudson.model.Run.ArtifactList.listCutoff", "16"));

/**
* Maximum number of artifacts to show in tree view before just showing a link.
*/
public static final int TREE_CUTOFF = Integer.parseInt(SystemProperties.getString("hudson.model.Run.ArtifactList.treeCutoff", "40"));
public static final int LIST_CUTOFF = Integer.parseInt(SystemProperties.getString("hudson.model.Run.ArtifactList.listCutoff", "20"));

// ..and then "too many"

Expand Down
6 changes: 5 additions & 1 deletion core/src/main/java/hudson/util/DescribableList.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,11 @@ public void setOwner(Owner owner) {
* Removes all instances of the same type, then add the new one.
*/
public void replace(T item) throws IOException {
removeAll((Class) item.getClass());
for (T t : data) {
if (t.getClass() == item.getClass()) {
data.remove(t);
}
}
data.add(item);
onModified();
}
Expand Down
9 changes: 2 additions & 7 deletions core/src/main/java/jenkins/model/Jenkins.java
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
Expand Down Expand Up @@ -2049,13 +2050,7 @@ public boolean isUpgradedFromBefore(VersionNumber v) {
* Gets the read-only list of all {@link Computer}s.
*/
public Computer[] getComputers() {
Computer[] r = computers.values().toArray(new Computer[0]);
Arrays.sort(r, (lhs, rhs) -> {
if (lhs.getNode() == Jenkins.this) return -1;
if (rhs.getNode() == Jenkins.this) return 1;
return lhs.getName().compareTo(rhs.getName());
});
return r;
return computers.values().stream().sorted(Comparator.comparing(Computer::getName)).toArray(Computer[]::new);
}

@CLIResolver
Expand Down
6 changes: 4 additions & 2 deletions core/src/main/java/jenkins/security/ConfidentialStore.java
Original file line number Diff line number Diff line change
Expand Up @@ -122,14 +122,16 @@ void clear() {

@Override
protected void store(ConfidentialKey key, byte[] payload) throws IOException {
LOGGER.fine(() -> "storing " + key.getId() + " " + Util.getDigestOf(Util.toHexString(payload)));
//called only from tests, get hex string of sha 256 for logging payload
LOGGER.fine("storing " + key.getId() + " " + Util.getHexOfSHA256DigestOf(payload));
data.put(key.getId(), payload);
}

@Override
protected byte[] load(ConfidentialKey key) throws IOException {
byte[] payload = data.get(key.getId());
LOGGER.fine(() -> "loading " + key.getId() + " " + (payload != null ? Util.getDigestOf(Util.toHexString(payload)) : "null"));
//called only from tests, get hex string of sha 256 for logging payload
LOGGER.fine("loading " + key.getId() + " " + (payload != null ? Util.getHexOfSHA256DigestOf(payload) : "null"));
return payload;
}

Expand Down
3 changes: 3 additions & 0 deletions core/src/main/resources/hudson/Messages_fr.properties
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

AbstractItem.NewNameInUse=Le nom "{0}" est déjà utilisé.
AbstractItem.NewNameUnchanged=Le nouveau nom est identique au nom actuel.

FilePath.did_not_manage_to_validate_may_be_too_sl=Impossible de valider {0} (peut-être est-ce trop lent)
FilePath.validateAntFileMask.whitespaceSeprator=\
Les espaces ne peuvent plus être utilisés comme séparateurs. Merci d''utiliser maintenant '','' comme séparateur à la place.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,10 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Advanced\ settings=Paramètres avancés
HTTP\ Proxy\ Configuration=Configuration du proxy HTTP
Upload\ Plugin=Soumettre un plugin
Deploy\ Plugin=Déployer le plugin
Deploy=Déployer
File=Fichier
Update\ Site=Site de mise à jour
Upload=Soumettre
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Updates=Mises à jour
Available=Disponibles
Installed=Installés
Available\ plugins=Plugins disponibles
Search\ available\ plugins=Rechercher les plugins disponibles
Install\ after\ restart=Installer après le redémarrage
Install=Installer
Name=Nom
Released=Publié
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,15 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

Check\ to\ install\ the\ plugin=Cocher pour installer le plugin
Click\ this\ heading\ to\ sort\ by\ category=Cliquez sur l''en-tête pour classer par catégorie
Download\ now\ and\ install\ after\ restart=Télécharger maintenant et installer après redémarrage
Filter=Filtre
Inactive=Inactif
Install=Installer
Install\ without\ restart=Installer sans redémarrer
Installed=Installé
Updates=Mises à jour
Search\ plugin\ updates=Rechercher les mises à jour du plugin
Update=Mettre à jour
Name=Nom
Released=Publié(e)
Installed=Installé
Applying\ this\ update\ will\ address\ security\ vulnerabilities\ in\ the\ currently\ installed\ version.=L'application de cette mise à jour corrigera les failles de sécurité de la version actuellement installée.
No\ updates=Aucunes mises à jour
Inactive=Inactif
Version=Version
No\ updates=Pas de mises à jour
compatWarning=Avertissement: Cette nouvelle version n''est pas compatible avec la version installée. Il peut être nécessaire de reconfigurer les tâches utilisant ce plugin.
coreWarning=Ce plugin est conçu pour Jenkins {0} ou une version plus récente. Il pourrait ne pas fonctionner avec votre version de Jenkins.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Rename=Renommer
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,16 @@ THE SOFTWARE.
<script src="${resURL}/jsbundles/pages/register.js" type="text/javascript" defer="true" />
</head>
<body class="app-sign-in-register">
<st:include it="${simpleDecorator}" page="simple-header.jelly" optional="true" />
<section class="app-sign-in-register__branding">
<div class="app-sign-in-register__branding__starburst"></div>
<img src="${imagesURL}/svgs/logo.svg" alt="${%logo}"/>
</section>
<main id="main-panel" class="app-sign-in-register__content">
<div class="app-sign-in-register__content-inner">
<h1>${%Register}</h1>

<st:include it="${simpleDecorator}" page="simple-header.jelly" optional="true" />

<template id="i18n" data-strength-strong="${%Strong}"
data-strength-moderate="${%Moderate}"
data-strength-weak="${%Weak}"
Expand Down
12 changes: 12 additions & 0 deletions core/src/main/resources/jenkins/install/SetupWizard/_wizard-ui.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// all variables declared here have to be in global scope
window.defaultUpdateSiteId = (function () {
var defaultSiteId = document
.querySelector("#default-site-id")
.getAttribute("data-default-update-site-id");
return defaultSiteId ? defaultSiteId.replace("'", "") : "default";
})();

window.setupWizardExtensions = [];
window.onSetupWizardInitialized = function (extension) {
setupWizardExtensions.push(extension);
};
Original file line number Diff line number Diff line change
@@ -1,13 +1,7 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:st="jelly:stapler">
<script type="text/javascript">
<j:getStatic var="defaultUpdateSiteId" className="hudson.model.UpdateCenter" field="ID_DEFAULT"/>
var defaultUpdateSiteId = '${defaultUpdateSiteId ? defaultUpdateSiteId.replace("'", "") : "default"}';
var setupWizardExtensions = [];
var onSetupWizardInitialized = function(extension) {
setupWizardExtensions.push(extension);
};
</script>
<div id="default-site-id" data-default-update-site-id="${hudson.model.UpdateCenter.ID_DEFAULT}"/>
<st:adjunct includes="jenkins.install.SetupWizard._wizard-ui"/>
<j:forEach var="setupExtension" items="${app.setupWizard.installStates}">
<st:include it="${setupExtension}" page="client-scripts" optional="true" />
</j:forEach>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,4 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core">
<section class="app-sign-in-register__branding">
<div class="app-sign-in-register__branding__starburst"></div>
<img src="${imagesURL}/svgs/logo.svg" alt="${%logo}"/>
</section>
</j:jelly>
<j:jelly xmlns:j="jelly:core" />
7 changes: 6 additions & 1 deletion core/src/main/resources/jenkins/model/Jenkins/login.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,16 @@ THE SOFTWARE.
<st:include it="${it.setupWizard}" page="authenticate-security-token"/>
</j:when>
<j:otherwise>
<st:include it="${simpleDecorator}" page="simple-header.jelly" optional="true" />
<section class="app-sign-in-register__branding">
<div class="app-sign-in-register__branding__starburst"></div>
<img src="${imagesURL}/svgs/logo.svg" alt="${%logo}"/>
</section>
<main id="main-panel" class="app-sign-in-register__content">
<div class="app-sign-in-register__content-inner">
<h1>Sign in to Jenkins</h1>

<st:include it="${simpleDecorator}" page="simple-header.jelly" optional="true" />

<form name="login" action="${it.securityRealm.authenticationGatewayUrl}"
method="post">
<j:if test="${error}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

blurb=\
The web container doesn''t seem to be configured to do authentication. \
Check the container documentation and/or also consult <code>jenkins[email protected]</code>
Check the container documentation and/or also consult <code>jenkinsci[email protected]</code>
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

# \
# The web container doesn't seem to be configured to do authentication. \
# Check the container documentation and/or also consult <code>jenkins[email protected]</code>
# Check the container documentation and/or also consult <code>jenkinsci[email protected]</code>
blurb=\
Уеб контейнерът не е настроен за идентификация. Прегледайте документацията му\
и архивите на форума <code>jenkins[email protected]</code>
и архивите на форума <code>jenkinsci[email protected]</code>
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# THE SOFTWARE.

blurb=Web containeren ser ikke ud til at være konfigureret til brugergodkendelse. \
Check containerens dokumentation og/eller rådfør dig med <code>jenkins[email protected]</code>
Check containerens dokumentation og/eller rådfør dig med <code>jenkinsci[email protected]</code>
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,5 @@
# THE SOFTWARE.

blurb=El contenedor de servlets parece no estar configurado para autenticación. \
Echa un vistazo a la documentación del contenedor y/o consulta <code>jenkins[email protected]</code>
Echa un vistazo a la documentación del contenedor y/o consulta <code>jenkinsci[email protected]</code>

Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@

blurb=Sembra che il container Web non sia configurato per eseguire \
l''autenticazione. Controllare la documentazione del container e/o anche \
<code>jenkins[email protected]</code>
<code>jenkinsci[email protected]</code>
Original file line number Diff line number Diff line change
Expand Up @@ -22,5 +22,4 @@

blurb=\
ウェブコンテナーが認証するように設定されていないようです。\
コンテナーのドキュメントを参考にするか、<code>[email protected]</code>か \
<code>[email protected]</code>に問い合わせてください。
コンテナーのドキュメントを参考にするか、<code>[email protected]</code>に問い合わせてください。
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
blurb=\
Web konteineris nesukonfigūruotas vykdyti autentikaciją. \
Patikrinkite konteinerio dokumentaciją ir/arba pasitarkite su <code>jenkins[email protected]</code>
Patikrinkite konteinerio dokumentaciją ir/arba pasitarkite su <code>jenkinsci[email protected]</code>
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@

# \
# The web container doesn't seem to be configured to do authentication. \
# Check the container documentation and/or also consult <code>jenkins[email protected]</code>
blurb=O container de servlets parece não estar configurado para fazer autenticação. <code>jenkins[email protected]</code>
# Check the container documentation and/or also consult <code>jenkinsci[email protected]</code>
blurb=O container de servlets parece não estar configurado para fazer autenticação. <code>jenkinsci[email protected]</code>

Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# This file is under the MIT License by authors

blurb=Веб-контејнер није оспособљен за аутентикацију. Проверите документацију и <code>jenkins[email protected]</code>.
blurb=Веб-контејнер није оспособљен за аутентикацију. Проверите документацију и <code>jenkinsci[email protected]</code>.
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,4 @@

blurb=\
Web Container 似乎沒有設成要驗證。\
請核對 Container 的說明文件,或到 <code>jenkins[email protected]</code> 看看。
請核對 Container 的說明文件,或到 <code>jenkinsci[email protected]</code> 看看。
Loading

0 comments on commit d2fd271

Please sign in to comment.