Skip to content

Commit

Permalink
Merge branch 'master' into JENKINS-30175
Browse files Browse the repository at this point in the history
  • Loading branch information
mawinter69 authored Jul 14, 2023
2 parents 57b0df7 + 0d9705b commit f1057ed
Show file tree
Hide file tree
Showing 84 changed files with 997 additions and 457 deletions.
2 changes: 1 addition & 1 deletion .github/release-drafter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ tag-template: jenkins-$NEXT_MINOR_VERSION

template: |
_This is an automatically generated changelog draft for Jenkins weekly releases.
See https://www.jenkins.io/changelog/ for the official changelogs._
See https://www.jenkins.io/changelog/#v$NEXT_MINOR_VERSION for the official changelog for this release, or https://www.jenkins.io/changelog-old/#v$NEXT_MINOR_VERSION for releases older than around 7 months._
$CHANGES
Expand Down
18 changes: 18 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,24 @@
"matchStrings": ["ARG MAVEN_VERSION=(?<currentValue>.*?)\n"],
"depNameTemplate": "org.apache.maven:maven-core",
"datasourceTemplate": "maven"
},
{
"fileMatch": ["core/src/site/site.xml"],
"matchStrings": ["lit@(?<currentValue>.*?)/"],
"depNameTemplate": "lit",
"datasourceTemplate": "npm"
},
{
"fileMatch": ["core/src/site/site.xml"],
"matchStrings": ["webcomponentsjs@(?<currentValue>.*?)/"],
"depNameTemplate": "@webcomponents/webcomponentsjs",
"datasourceTemplate": "npm"
},
{
"fileMatch": ["core/src/site/site.xml"],
"matchStrings": ["<version>(?<currentValue>.*?)<\/version>"],
"depNameTemplate": "org.apache.maven.skins:maven-fluido-skin",
"datasourceTemplate": "maven"
}
],
"labels": ["dependencies", "skip-changelog"],
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=5658.v5b_fe603c573d
export ATH_VERSION=5659.v28d85a_47a_73a_

if [[ $# -eq 0 ]]; then
export JDK=17
Expand Down
4 changes: 2 additions & 2 deletions bom/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ THE SOFTWARE.
<properties>
<asm.version>9.5</asm.version>
<slf4jVersion>2.0.7</slf4jVersion>
<stapler.version>1785.vf9cb_74a_b_ec5b_</stapler.version>
<stapler.version>1802.v9e2750160d01</stapler.version>
<groovy.version>2.4.21</groovy.version>
</properties>

Expand Down Expand Up @@ -260,7 +260,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.jvnet.hudson</groupId>
<artifactId>commons-jelly-tags-define</artifactId>
<version>1.1-jenkins-20230124</version>
<version>1.1-jenkins-20230713</version>
</dependency>
<dependency>
<groupId>org.jvnet.localizer</groupId>
Expand Down
21 changes: 21 additions & 0 deletions core/src/main/java/jenkins/model/ModelObjectWithContextMenu.java
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,20 @@ public ContextMenu add(String url, String icon, String iconXml, String text, boo
return this;
}

/** @since TODO */
public ContextMenu add(String url, String icon, String iconXml, String text, boolean post, boolean requiresConfirmation, Badge badge, String message) {
if (text != null && icon != null && url != null) {
MenuItem item = new MenuItem(url, icon, text);
item.iconXml = iconXml;
item.post = post;
item.requiresConfirmation = requiresConfirmation;
item.badge = badge;
item.message = message;
items.add(item);
}
return this;
}

/**
* Add a header row (no icon, no URL, rendered in header style).
*
Expand Down Expand Up @@ -340,6 +354,8 @@ class MenuItem {

private Badge badge;

private String message;

/**
* The type of menu item
* @since 2.340
Expand Down Expand Up @@ -369,6 +385,11 @@ public Badge getBadge() {
return badge;
}

@Exported
public String getMessage() {
return message;
}

public MenuItem(String url, String icon, String displayName) {
withUrl(url).withIcon(icon).withDisplayName(displayName);
}
Expand Down
2 changes: 2 additions & 0 deletions core/src/main/resources/META-INF/upgrade/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Contains [Jackpot](https://netbeans.apache.org/jackpot/index.html)-based refactoring rules offered when plugins are open in NetBeans IDE.
Could be [converted to a more general tool](https://github.com/openrewrite/rewrite-jenkins/issues/6).
36 changes: 31 additions & 5 deletions core/src/main/resources/hudson/PluginManager/_table.js
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,6 @@ Behaviour.specify("#filter-box", "_table", 0, function (e) {
return;
}

var pluginI18n = select(".plugins.i18n");
function i18n(messageId) {
return pluginI18n.getAttribute("data-" + messageId);
}

// Create a map of the plugin rows, making it easy to index them.
var plugins = {};
for (var i = 0; i < pluginTRs.length; i++) {
Expand Down Expand Up @@ -482,6 +477,33 @@ window.addEventListener("load", function () {
});
}

const uninstallButtons = document.querySelectorAll(
"[data-action='uninstall']"
);
uninstallButtons.forEach((uninstallButton) => {
uninstallButton.addEventListener("click", () => {
const title = uninstallButton.dataset.message;
const href = uninstallButton.dataset.href;

const options = {
message: i18n("uninstall-description"),
type: "destructive",
};

dialog.confirm(title, options).then(
() => {
var form = document.createElement("form");
form.setAttribute("method", "POST");
form.setAttribute("action", href);
crumb.appendToForm(form);
document.body.appendChild(form);
form.submit();
},
() => {}
);
});
});

// Enable/disable the 'Update' button depending on if any updates are checked
const anyCheckboxesSelected = () => {
return (
Expand Down Expand Up @@ -510,3 +532,7 @@ window.addEventListener("load", function () {
);
}
});

function i18n(messageId) {
return document.querySelector("#i18n").getAttribute("data-" + messageId);
}
35 changes: 19 additions & 16 deletions core/src/main/resources/hudson/PluginManager/installed.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,17 @@ THE SOFTWARE.
<div class="alert alert-warning"><strong>${%Warning}</strong>: ${%requires.restart}</div>
</j:if>

<div class="plugins i18n"
data-cannot-enable="${%This plugin cannot be enabled}"
data-cannot-disable="${%This plugin cannot be disabled}"
data-cannot-uninstall="${%This plugin cannot be uninstalled}"
data-disabled-dependencies="${%It has one or more unsatisfied dependencies}"
data-enabled-dependents="${%It has one or more enabled dependents}"
data-installed-dependents="${%It has one or more installed dependents}"
data-detached-disable="${%detached-disable}"
data-detached-uninstall="${%detached-uninstall}"
data-detached-possible-dependents="${%detached-possible-dependents}"
/>
<template id="i18n"
data-cannot-enable="${%This plugin cannot be enabled}"
data-cannot-disable="${%This plugin cannot be disabled}"
data-cannot-uninstall="${%This plugin cannot be uninstalled}"
data-disabled-dependencies="${%It has one or more unsatisfied dependencies}"
data-enabled-dependents="${%It has one or more enabled dependents}"
data-installed-dependents="${%It has one or more installed dependents}"
data-detached-disable="${%detached-disable}"
data-detached-uninstall="${%detached-uninstall}"
data-detached-possible-dependents="${%detached-possible-dependents}"
data-uninstall-description="${%uninstall-description}" />

<table id="plugins" class="jenkins-table sortable">
<j:choose>
Expand Down Expand Up @@ -225,11 +225,14 @@ THE SOFTWARE.
</j:forEach>
</div>
</j:if>
<form class="jenkins-buttons-row" method="post" action="plugin/${p.shortName}/uninstall">
<button class="jenkins-table__button jenkins-!-destructive-color uninstall" tooltip="${%Uninstall} ${p.updateInfo.displayName?:p.displayName}">
<l:icon src="symbol-close-circle"/>
</button>
</form>
<button data-action="uninstall"
type="button"
class="jenkins-table__button jenkins-!-destructive-color"
tooltip="${%Uninstall} ${p.updateInfo.displayName ?: p.displayName}"
data-href="plugin/${p.shortName}/doUninstall"
data-message="${%uninstall-title(p.updateInfo.displayName ?: p.displayName)}">
<l:icon src="symbol-close-circle"/>
</button>
</j:otherwise>
</j:choose>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,5 @@ adoptThisPlugin=\
<strong>This plugin is up for adoption!</strong> We are looking for new maintainers. \
Visit our <a href="https://www.jenkins.io/doc/developer/plugin-governance/adopt-a-plugin/" rel="noopener noreferrer" target="_blank">Adopt a Plugin</a> initiative for more information.
reportIssue=Report an issue with this plugin
uninstall-title=Are you sure you want to uninstall {0}?
uninstall-description=This will remove the plugin binary from your $JENKINS_HOME, but it will leave the configuration files of the plugin untouched
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ It\ has\ one\ or\ more\ disabled\ dependencies=Mindestens eine Abhängigkeit ist
This\ plugin\ cannot\ be\ uninstalled=Dieses Plugin kann nicht deinstalliert werden.
No\ description\ available.=Keine Beschreibung verfügbar.
This\ plugin\ cannot\ be\ enabled=Dieses Plugin kann nicht aktiviert werden.
uninstall-title=Sind sie sicher dass sie {0} deinstallieren wollen?
uninstall-description=Dadurch wird die Plugin-Binärdatei aus $JENKINS_HOME entfernt, aber die Konfigurationsdateien des Plugins bleiben erhalten
40 changes: 40 additions & 0 deletions core/src/main/resources/hudson/logging/LogRecorder/sidepanel.jelly
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
<!--
The MIT License
Copyright (c) 2004-2009, Sun Microsystems, Inc., Kohsuke Kawaguchi
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
-->

<!--
Side panel for the log recorder
-->
<?jelly escape-by-default='true'?>
<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">
<l:header />
<l:side-panel>
<l:tasks>
<l:task href="." icon="symbol-journal" title="${%Log records}"/>
<l:isAdmin>
<l:task href="configure" icon="symbol-settings" title="${%Configure}"/>
<l:delete title="${%Delete}" message="${%delete.logrecorder(it.displayName)}" />
</l:isAdmin>
</l:tasks>
</l:side-panel>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ THE SOFTWARE.
<l:side-panel>
<l:tasks>
<l:task contextMenu="false" href="${rootURL}/${it.url}" icon="${it.iconClassName}" title="${%Status}"/>
<l:task confirmationMessage="${%delete.confirm(it.name)}" href="${rootURL}/${it.url}doDelete" icon="icon-edit-delete icon-md" permission="${it.DELETE}" title="${%Delete Agent}" post="true" requiresConfirmation="true"/>
<l:delete permission="${it.DELETE}" title="${%Delete Agent}" message="${%delete.confirm(it.name)}"/>
<l:task href="${rootURL}/${it.url}configure" icon="symbol-settings" permission="${it.EXTENDED_READ}"
title="${it.hasPermission(it.CONFIGURE) ? '%Configure' : '%View Configuration'}"/>
<l:task href="${rootURL}/${it.url}builds" icon="symbol-build-history" title="${%Build History}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,13 +57,14 @@ THE SOFTWARE.
<div class="jenkins-section__item">
<j:set var="alt" value="${icon.replaceAll('\\d*\\.[^.]+$', '')}"/>
<j:set var="iconSrc" value="${h.tryGetIconPath(m.iconFileName, context)}"/>
<j:set var="sure" value="${%sure}"/>
<j:set var="iconXml">
<l:icon src="${m.iconFileName}" />
</j:set>
${taskTags!=null and attrs.contextMenu!='false' ? it.addContextMenuItem(taskTags, m.urlName, iconSrc, iconXml, m.displayName, m.requiresPOST, m.requiresConfirmation, m.badge) : null}
${taskTags!=null and attrs.contextMenu!='false' ? it.addContextMenuItem(taskTags, m.urlName, iconSrc, iconXml, m.displayName, m.requiresPOST, m.requiresConfirmation, m.badge, sure) : null}
<j:choose>
<j:when test="${m.requiresConfirmation}">
<l:confirmationLink href="${m.urlName}" post="${m.requiresPOST}" message="${%are.you.sure(m.displayName)}">
<l:confirmationLink href="${m.urlName}" post="${m.requiresPOST}" message="${%sure}" title="${m.displayName}">
<div class="jenkins-section__item__icon" aria-hidden="true">
<l:icon src="${m.iconFileName}" class="icon" />
</div>
Expand Down
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.

are.you.sure={0}: are you sure?
sure=Are you sure?
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ JenkinsCliText=\
Manage\ Jenkins=\
Управление на Jenkins
# {0}: are you sure?
are.you.sure=\
{0}: сигурни ли сте?
Script\ Console=\
Конзола за скриптове
Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut\ down\ safely.=\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ System\ Information=Systém - Informace
System\ Log=Systém - Log
SystemLogText=Loggovací soubor systému zachycuje výstup z <code>java.util.logging</code> výstupu vztahujícímu se k Jenkins-u.
Useful\ when\ you\ modified\ config\ files\ directly\ on\ disk.=Potřebné, pokud modifikujete konfigurační soubory přímo na disku.
are.you.sure={0}: opravdu to chcete?

Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ Jenkins\ CLI=Jenkins CLI (kommandolinie)
Manage\ Jenkins=Administrér Jenkins
Manage\ Nodes=Bestyr noder
Prepare\ for\ Shutdown=Forbered nedlukning
are.you.sure={0}: er du sikker?

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

Manage\ Jenkins=Jenkins verwalten

are.you.sure={0}: sind Sie sicher?
sure=Sind Sie sicher?
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ Manage\ Jenkins=Administrar Jenkins
Reload\ Configuration\ from\ Disk=Recargar configuración desde el disco duro.
Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut\ down\ safely.=Detener la ejecución de nuevas construcciones para que el sistema pueda apagarse de manera segura.
SystemLogText=El log del sistema captura la salida de la clase <code>java.util.logging</code> en todo lo relacionado con Jenkins.
are.you.sure=estás seguro?

Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Script\ Console=Skriptide Konsool
Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut\ down\ safely.=Lõpetab uute järkude ehitamise selleks et süsteemi võiks ilma probleemideta sulgeda.
System\ Information=Süsteemi informatsioon
System\ Log=Süsteemi logid
are.you.sure={0}: oled kindel?

Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,4 @@ Load\ Statistics=Statistiques d’utilisation
LoadStatisticsText=Vérifiez l’utilisation des ressources et décidez si vous avez besoin d’ordinateurs supplémentaires pour vos constructions.
Manage\ Jenkins=Administrer Jenkins
Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut\ down\ safely.=Cesser d''exécuter de nouveaux builds, afin que le système puisse se fermer.
are.you.sure={0} : êtes-vous sûr ?

Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut
System\ Log=לוגים של המערכת
SystemLogText=לוגים של המערכת לוכדים פלט מ-<code>java.util.logging</code> שקשור לג׳נקינס.
Useful\ when\ you\ modified\ config\ files\ directly\ on\ disk.=שימושי כאשר עדכנת קבצי מערכת ישירות על הדיסק
are.you.sure={0}: האם אתה בטוח?

Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.

are.you.sure={0}: procedere?
alt=Testo alternativo
Manage\ Jenkins=Gestisci Jenkins
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# THE SOFTWARE.

Manage\ Jenkins=Jenkinsの管理
are.you.sure={0}: よろしいですか?

Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,4 @@ Script\ Console=스크립트 콘솔
Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut\ down\ safely.=새로운 빌드
SystemLogText=<code>java.util.loggin</code>에서 출력된 젠킨스와 롼견된 시스템 로그
Useful\ when\ you\ modified\ config\ files\ directly\ on\ disk.=디스크의 파일을 직접 변경했을 때 유용합니다.
are.you.sure=확실 합니까?

Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Manage\ Jenkins=Tvarkyti Jenkins
are.you.sure={0}: ar jūs tikri?

Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,4 @@ Stops\ executing\ new\ builds,\ so\ that\ the\ system\ can\ be\ eventually\ shut
System\ Log=Systeemlogboek
SystemLogText=De uitvoer van <code>java.util.logging</code> voor Jenkins wordt geregistreerd.
Useful\ when\ you\ modified\ config\ files\ directly\ on\ disk.=Dit is nuttig wanneer u configuratiebestanden buiten Jenkins om heeft bewerkt.
are.you.sure={0}: weet u het zeker?

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

Manage\ Jenkins=Zarządzaj Jenkinsem
are.you.sure={0}: czy jesteś pewien?
Search\ settings=Szukaj ustawień
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# THE SOFTWARE.

Manage\ Jenkins=Gerenciar o Jenkins
are.you.sure={0}: tem certeza?
sure=Tem certeza?
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@
# THE SOFTWARE.

Manage\ Jenkins=Настройка Jenkins
are.you.sure={0}: вы уверены?

Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
Load\ Statistics=Štatistiky zaťaženia
Manage\ Jenkins=Spravovať Jenkins
Manage\ Nodes=Spravovať uzly
are.you.sure={0}: si si istý?

Loading

0 comments on commit f1057ed

Please sign in to comment.