Skip to content

Commit

Permalink
Merge pull request #9305 from krisstern/feat/stable-2.452/backporting…
Browse files Browse the repository at this point in the history
…-2.452.2-1

Backporting for LTS 2.452.2
  • Loading branch information
krisstern authored May 29, 2024
2 parents c65c785 + d87e891 commit 1a0abde
Show file tree
Hide file tree
Showing 61 changed files with 307 additions and 114 deletions.
1 change: 1 addition & 0 deletions core/src/main/java/hudson/model/AbstractItem.java
Original file line number Diff line number Diff line change
Expand Up @@ -937,6 +937,7 @@ public void updateByXml(Source source) throws IOException {
// if everything went well, commit this new version
out.commit();
SaveableListener.fireOnChange(this, getConfigFile());
ItemListener.fireOnUpdated(this);

} finally {
out.abort(); // don't leave anything behind
Expand Down
8 changes: 6 additions & 2 deletions core/src/main/java/jenkins/agents/CloudSet.java
Original file line number Diff line number Diff line change
Expand Up @@ -242,9 +242,13 @@ private void handleNewCloudPage(Descriptor<Cloud> descriptor, String name, Stapl
*/
@POST
public synchronized void doDoCreate(StaplerRequest req, StaplerResponse rsp,
@QueryParameter String type) throws IOException, ServletException, Descriptor.FormException {
@QueryParameter String cloudDescriptorName) throws IOException, ServletException, Descriptor.FormException {
Jenkins.get().checkPermission(Jenkins.ADMINISTER);
Cloud cloud = Cloud.all().find(type).newInstance(req, req.getSubmittedForm());
Descriptor<Cloud> cloudDescriptor = Cloud.all().findByName(cloudDescriptorName);
if (cloudDescriptor == null) {
throw new Failure(String.format("No cloud type ‘%s’ is known", cloudDescriptorName));
}
Cloud cloud = cloudDescriptor.newInstance(req, req.getSubmittedForm());
if (!Jenkins.get().clouds.add(cloud)) {
LOGGER.log(Level.WARNING, () -> "Creating duplicate cloud name " + cloud.name + ". Plugin " + Jenkins.get().getPluginManager().whichPlugin(cloud.getClass()) + " should be updated to support user provided name.");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-danger">
<div class="jenkins-alert jenkins-alert-danger">
<dl>
<dt>${%PluginCycles}</dt>
<j:forEach var="p" items="${it.pluginsWithCycle}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<dl>
<dt>${%DeprecatedPlugins}</dt>
<j:forEach var="e" items="${it.getDeprecatedPlugins()}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-danger">
<div class="jenkins-alert jenkins-alert-danger">
<dl>
<dt>${%RequiredPluginUpdates}</dt>
<j:forEach var="p" items="${it.pluginsToBeUpdated}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ THE SOFTWARE.
<l:main-panel>
<l:app-bar title="${%Advanced settings}"/>

<div class="alert alert-info">
<div class="jenkins-alert jenkins-alert-info">
<strong>${%proxyMovedBlurb(rootURL+"/manage/configure")}</strong>
</div>

Expand Down
10 changes: 5 additions & 5 deletions core/src/main/resources/hudson/PluginManager/installed.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ THE SOFTWARE.
data-is-restart-required="${app.updateCenter.isRestartRequiredForCompletion()}" />

<j:if test="${app.updateCenter.isRestartRequiredForCompletion()}">
<div class="alert alert-warning"><strong>${%Warning}</strong>: ${%requires.restart}</div>
<div class="jenkins-alert jenkins-alert-warning"><strong>${%Warning}</strong>: ${%requires.restart}</div>
</j:if>

<template id="i18n"
Expand Down Expand Up @@ -130,7 +130,7 @@ THE SOFTWARE.
</div>
</j:if>
<j:if test="${!p.getActiveWarnings().isEmpty()}">
<div class="alert alert-danger">${%securityWarning}
<div class="jenkins-alert jenkins-alert-danger">${%securityWarning}
<ul>
<j:forEach var="warning" items="${p.getActiveWarnings()}">
<li>
Expand All @@ -143,13 +143,13 @@ THE SOFTWARE.
</div>
</j:if>
<j:if test="${p.isDeprecated()}">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<!-- figure out a way how to present deprecations by multiple update sites instead of just the first one -->
${%deprecationWarning(p.getDeprecations().get(0).url)}
</div>
</j:if>
<j:if test="${it.hasAdoptThisPluginLabel(p)}">
<div class="alert alert-warning jenkins-!-margin-top-1 jenkins-!-margin-bottom-0">
<div class="jenkins-alert jenkins-alert-warning jenkins-!-margin-top-1 jenkins-!-margin-bottom-0">
${%adoptThisPlugin}
</div>
</j:if>
Expand Down Expand Up @@ -250,7 +250,7 @@ THE SOFTWARE.
${p.name}
</div>
</j:if>
<div class="alert alert-danger jenkins-!-margin-top-1 jenkins-!-margin-bottom-0">
<div class="jenkins-alert jenkins-alert-danger jenkins-!-margin-top-1 jenkins-!-margin-bottom-0">
<pre>${p.cause.message}</pre>
</div>
</td>
Expand Down
16 changes: 8 additions & 8 deletions core/src/main/resources/hudson/PluginManager/updates.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ THE SOFTWARE.
</div>
</j:if>
<j:if test="${!p.isCompatibleWithInstalledVersion()}">
<div class="alert alert-danger">${%compatWarning}
<div class="jenkins-alert jenkins-alert-danger">${%compatWarning}
<j:if test="${p.hasIncompatibleParentPlugins()}">
<br/>${%parentCompatWarning}
<ul>
Expand All @@ -153,15 +153,15 @@ THE SOFTWARE.
</div>
</j:if>
<j:if test="${p.isForNewerHudson()}">
<div class="alert alert-danger">${%coreWarning(p.requiredCore)}</div>
<div class="jenkins-alert jenkins-alert-danger">${%coreWarning(p.requiredCore)}</div>
</j:if>
<j:if test="${p.fixesSecurityVulnerabilities()}">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
${%Applying this update will address security vulnerabilities in the currently installed version.}
</div>
</j:if>
<j:if test="${!p.isNeededDependenciesCompatibleWithInstalledVersion(cache)}">
<div class="alert alert-danger">${%depCompatWarning}
<div class="jenkins-alert jenkins-alert-danger">${%depCompatWarning}
<br/>${%parentDepCompatWarning}
<ul>
<j:forEach var="d"
Expand All @@ -177,12 +177,12 @@ THE SOFTWARE.
</div>
</j:if>
<j:if test="${p.isNeededDependenciesForNewerJenkins(cache)}">
<div class="alert alert-danger">
<div class="jenkins-alert jenkins-alert-danger">
${%depCoreWarning(p.getNeededDependenciesRequiredCore().toString())}
</div>
</j:if>
<j:if test="${p.hasWarnings()}">
<div class="alert alert-danger">${%securityWarning}
<div class="jenkins-alert jenkins-alert-danger">${%securityWarning}
<ul>
<j:forEach var="warning" items="${p.getWarnings()}">
<li>
Expand All @@ -195,12 +195,12 @@ THE SOFTWARE.
</div>
</j:if>
<j:if test="${p.isDeprecated()}">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
${%deprecationWarning(p.getDeprecation().url)}
</div>
</j:if>
<j:if test="${it.hasAdoptThisPluginLabel(p)}">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
${%adoptThisPlugin}
</div>
</j:if>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<div class="alert alert-danger" role="alert">
<div class="jenkins-alert jenkins-alert-danger" role="alert">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="correct" value="${%Correct}"/>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Tell me more}"/>
<f:submit name="no" value="${%Dismiss}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-danger">
<div class="jenkins-alert jenkins-alert-danger">
<dl>
<dt>${%blurb}</dt>
<j:forEach var="d" items="${it.problems}">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Manage}"/>
<f:submit name="no" value="${%Dismiss}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:f="/lib/form" xmlns:l="/lib/layout">
<div id="redirect-error" class="alert alert-danger reverse-proxy__hidden"
<div id="redirect-error" class="jenkins-alert jenkins-alert-danger reverse-proxy__hidden"
data-url="${rootURL}/${it.url}/test" data-context="${rootURL}">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%More Info}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div id="tooManyJobsButNoView" class="alert alert-warning">
<div id="tooManyJobsButNoView" class="jenkins-alert jenkins-alert-warning">
<l:isAdmin>
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Create a view now}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ THE SOFTWARE.
</l:app-bar>

<f:form method="post" name="config" action="configSubmit">
<div class="alert alert-info jenkins-form-item">
<div class="jenkins-alert jenkins-alert-info jenkins-form-item">
${%fine_warning}
</div>
<j:set var="instance" value="${it}" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ THE SOFTWARE.
</l:overflowButton>
</l:app-bar>

<div class="alert alert-info">
<div class="jenkins-alert jenkins-alert-info">
Log messages at a level more verbose than INFO (i.e., CONFIG, FINE, FINER, FINEST) are never recorded in the Jenkins log. Use <a href=".">log recorders</a> to record these log messages.
</div>
<t:logRecords logRecords="${h.logRecords}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-info">
<div class="jenkins-alert jenkins-alert-info">
<j:set var="ucData" value="${it.data}" />
<j:set var="upJob" value="${app.updateCenter.hudsonJob}" />
<j:choose>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/disable">
<f:submit value="${%Dismiss}"/>
</form>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:t="/lib/hudson">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
${%blurb(rootURL)}
</div>
</j:jelly>
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import org.apache.commons.jelly.tags.fmt.FmtTagLibrary
SlowTriggerAdminMonitor tam = my

dl {
div(class: "alert alert-warning") {
div(class: "jenkins-alert jenkins-alert-warning") {
form(method: "post", name: "clear", action: rootURL + "/" + tam.url + "/clear") {
input(name: "clear", type: "submit", value: _("Dismiss"), class: "submit-button primary")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-danger">
<div class="jenkins-alert jenkins-alert-danger">
<j:out value="${it.message}"/>
<a href="${rootURL}/${it.url}/">${%See the log for more details}</a>.
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<p>
${%message(it.home)}
</p>
Expand Down
2 changes: 1 addition & 1 deletion core/src/main/resources/jenkins/agents/CloudSet/_new.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ THE SOFTWARE.
<st:include it="${requestScope.instance}" class="${requestScope.descriptor.clazz}" page="config.jelly" optional="true" />

<f:bottomButtonBar>
<input type="hidden" name="type" value="${request.getParameter('mode')}"/>
<input type="hidden" name="cloudDescriptorName" value="${request.getParameter('mode')}"/>

<f:submit value="${%Save}"/>
</f:bottomButtonBar>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-danger">
<div class="jenkins-alert jenkins-alert-danger">
${%blurb(rootURL+'/'+it.url)}
</div>
</j:jelly>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
${%blurb(app.initLevel)}
${%Example: usage of} <code>@Initializer(after = InitMilestone.COMPLETED)</code> ${%in a plugin}
(<a href="https://www.jenkins.io/redirect/troubleshooting/initialization-not-completed" rel="noopener noreferrer" target="_blank">${%See documentation}</a>).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Manage}"/>
<f:submit name="no" value="${%Dismiss}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="agent" value="${%Set up agent}"/>
<f:submit name="cloud" value="${%Set up cloud}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ THE SOFTWARE.
-->
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form" xmlns:l="/lib/layout">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<l:isAdmin>
<form method="post" action="${rootURL}/${it.url}/disable">
<f:submit value="${%Dismiss}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ THE SOFTWARE.

<?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">
<div class="alert alert-warning">
<div class="jenkins-alert jenkins-alert-warning">
<form method="post" action="${rootURL}/${it.url}/act" name="${it.id}">
<f:submit name="yes" value="${%Setup Security}"/>
<f:submit name="no" value="${%Dismiss}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<p>${%jenkins.install.findSecurityTokenMessage(it.initialAdminPasswordFile)}</p>
<p>${%authenticate-security-token.copy.password}</p>
<j:if test="${error}">
<div class="alert alert-danger">
<div class="jenkins-alert jenkins-alert-danger">
<strong>${%authenticate-security-token.error}</strong> ${%authenticate-security-token.password.incorrect}
</div>
</j:if>
Expand Down
Loading

0 comments on commit 1a0abde

Please sign in to comment.