Skip to content

Commit

Permalink
Merge branch 'master' into yui_button_inspired_style
Browse files Browse the repository at this point in the history
  • Loading branch information
scherler authored Jan 17, 2025
2 parents d019b4e + 4c552b6 commit 5ebe1c8
Show file tree
Hide file tree
Showing 257 changed files with 985 additions and 86,107 deletions.
1 change: 0 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ node/

# libraries / external deps / generated files
src/main/js/plugin-setup-wizard/bootstrap-detached.js
war/src/main/webapp/scripts/yui
war/src/main/webapp/jsbundles/
src/main/scss/_bootstrap.scss

Expand Down
18 changes: 1 addition & 17 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
module.exports = {
extends: "stylelint-config-standard",
customSyntax: "postcss-scss",
extends: "stylelint-config-standard-scss",
ignoreFiles: ["src/main/scss/_bootstrap.scss"],
rules: {
"no-descending-specificity": null,
Expand All @@ -14,23 +13,8 @@ module.exports = {
},
],
"property-no-vendor-prefix": null,
"at-rule-no-unknown": [
true,
{
ignoreAtRules: [
"function",
"if",
"each",
"include",
"mixin",
"for",
"use",
],
},
],
"alpha-value-notation": "number",
"number-max-precision": 5,
"function-no-unknown": null,
"no-duplicate-selectors": null,
"hue-degree-notation": "number",
},
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=6107.v8c73fa_b_8f784
export ATH_VERSION=6133.v358d9a_47674f

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 @@ -63,7 +63,7 @@ THE SOFTWARE.
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-framework-bom</artifactId>
<version>6.2.1</version>
<version>6.2.2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
Expand Down
15 changes: 6 additions & 9 deletions core/src/main/java/hudson/Functions.java
Original file line number Diff line number Diff line change
Expand Up @@ -664,17 +664,14 @@ public static String validateIconSize(String iconSize) throws SecurityException
}

/**
* Gets the suffix to use for YUI JavaScript.
*/
public static String getYuiSuffix() {
return DEBUG_YUI ? "debug" : "min";
}

/**
* Set to true if you need to use the debug version of YUI.
* No longer used, to be removed after enough plugins have adopted a version of the test harness with
* <a href="https://github.com/jenkinsci/jenkins-test-harness/pull/874">jenkins-test-harness/pull/874</a> in it.
*
* @deprecated removed without replacement
*/
@SuppressFBWarnings(value = "MS_SHOULD_BE_FINAL", justification = "for script console")
public static boolean DEBUG_YUI = SystemProperties.getBoolean("debug.YUI");
@Deprecated(forRemoval = true, since = "TODO")
public static boolean DEBUG_YUI;

/**
* Creates a sub map by using the given range (both ends inclusive).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ public GroupDetails loadGroupByGroupname(String groupname) throws org.acegisecur
class Authenticator extends AbstractUserDetailsAuthenticationProvider {
@Override
protected void additionalAuthenticationChecks(UserDetails userDetails, UsernamePasswordAuthenticationToken authentication) throws AuthenticationException {
// authentication is assumed to be done already in the retrieveUser method
// Authentication is done in the retrieveUser method. Note that this method being a no-op is only safe
// because we use Spring Security's default NullUserCache. If caching was enabled, it would be possible to
// log in as any cached user with any password unless we updated this method to check the provided
// authentication as recommended in the superclass method's documentation, so be careful reusing this code.
}

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

import hudson.Extension;
import hudson.ExtensionList;
import hudson.security.Permission;
import hudson.util.DescribableList;
import java.io.IOException;
import java.util.List;
Expand Down Expand Up @@ -64,6 +65,11 @@ public DescribableList<GlobalBuildDiscarderStrategy, GlobalBuildDiscarderStrateg
return configuredBuildDiscarders;
}

@Override
public Permission getRequiredGlobalConfigPagePermission() {
return Jenkins.MANAGE;
}

@Override
public boolean configure(StaplerRequest2 req, JSONObject json) throws FormException {
try {
Expand Down

This file was deleted.

5 changes: 2 additions & 3 deletions core/src/main/resources/hudson/cli/CLIAction/command.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@ 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">
<l:layout permission="${app.READ}">
<st:include page="sidepanel.jelly" it="${app}"/>
<l:layout title="${command.name}" permission="${app.READ}" type="one-column">
<l:breadcrumb title="${command.name}" />
<l:main-panel>
<h1>
Command ${command.name}
</h1>
<j:set var="commandArgs" value="${command.name}${command.singleLineSummary}"/>
<st:include page="example.jelly"/>
<pre>
<pre class="jenkins-!-margin-top-3">
<j:out value="${h.escape(command.longDescription)}"/>
<j:set var="usage" value="${command.usage}"/>
<j:if test="${!empty usage}"><br/>${command.usage}</j:if>
Expand Down
6 changes: 5 additions & 1 deletion core/src/main/resources/hudson/cli/CLIAction/example.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ 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">
<pre id="example">java -jar <a href="${rootURL}/jnlpJars/jenkins-cli.jar">jenkins-cli.jar</a> -s ${h.inferHudsonURL(request)} <j:if test="${!it.webSocketSupported}">-http </j:if>${commandArgs}</pre>
<j:set var="content">java -jar jenkins-cli.jar -s ${h.inferHudsonURL(request)} <j:if test="${!it.webSocketSupported}">-http </j:if>${commandArgs}</j:set>
<div class="jenkins-quote jenkins-quote--monospace" id="example">
${content}
<l:copyButton text="${content}" iconOnly="true" />
</div>
</j:jelly>

77 changes: 51 additions & 26 deletions core/src/main/resources/hudson/cli/CLIAction/index.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -24,36 +24,61 @@ 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">
<l:layout permission="${app.READ}">
<st:include page="sidepanel.jelly" it="${app}"/>
<j:new var="managementLink" className="jenkins.management.CliLink" />

<l:layout title="${managementLink.displayName}" permission="${app.READ}" type="one-column">
<!-- no need for additional breadcrumb here as we're on an index page already including breadcrumb -->

<l:main-panel>
<l:app-bar title="${%Jenkins CLI}" />
<p class="jenkins-description">
${%blurb(rootURL)}
</p>
<j:set var="commandArgs" value="help"/>
<st:include page="example.jelly"/>

<h2>${%Available Commands}</h2>
<table class="jenkins-table sortable">
<thead>
<tr>
<th initialSortDir="down">${%Name}</th>
<th>${%Description}</th>
</tr>
</thead>
<tbody>
<j:forEach items="${h.getCLICommands()}" var="command">
<l:app-bar title="${managementLink.displayName}">
<t:help href="https://www.jenkins.io/redirect/cli" />
</l:app-bar>

<div class="jenkins-page-description">
${%description}
</div>

<f:section title="${%Getting started}">
<ol class="jenkins-instructions">
<li>
<div class="jenkins-instructions__label">
${%instruction1}
</div>
<a class="jenkins-button jenkins-button--primary" href="${rootURL}/jnlpJars/jenkins-cli.jar">
<l:icon src="symbol-download" />
jenkins-cli.jar
</a>
</li>
<li>
<p class="jenkins-instructions__label">
${%instruction2}
</p>
<j:set var="commandArgs" value="help"/>
<st:include page="example.jelly"/>
</li>
</ol>
</f:section>

<f:section title="${%Available Commands}">
<table class="jenkins-table sortable">
<thead>
<tr>
<td>
<a href="command/${command.name}" class="jenkins-table__link">${command.name}</a>
</td>
<td>${command.shortDescription}</td>
<th initialSortDir="down">${%Name}</th>
<th>${%Description}</th>
</tr>
</j:forEach>
</tbody>
</table>
</thead>
<tbody>
<j:forEach items="${h.getCLICommands()}" var="command">
<tr>
<td>
<a href="command/${command.name}" class="jenkins-table__link">${command.name}</a>
</td>
<td>${command.shortDescription}</td>
</tr>
</j:forEach>
</tbody>
</table>
</f:section>
</l:main-panel>
</l:layout>
</j:jelly>
8 changes: 4 additions & 4 deletions core/src/main/resources/hudson/cli/CLIAction/index.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Jenkins\ CLI=Jenkins CLI
blurb=You can access various features in Jenkins through a command-line tool. See \
<a href="https://www.jenkins.io/redirect/cli">the documentation</a> for more details of this feature. \
To get started, download <a href="{0}/jnlpJars/jenkins-cli.jar">jenkins-cli.jar</a>, and run it as follows:
description=You can access various features in Jenkins through a command-line tool. This can be convenient for scripting\
\ of routine tasks, bulk updates, troubleshooting, and more.
instruction1=Download the Jenkins CLI:
instruction2=Run it as follows
36 changes: 0 additions & 36 deletions core/src/main/resources/hudson/cli/CLIAction/index_bg.properties

This file was deleted.

24 changes: 0 additions & 24 deletions core/src/main/resources/hudson/cli/CLIAction/index_cs.properties

This file was deleted.

25 changes: 0 additions & 25 deletions core/src/main/resources/hudson/cli/CLIAction/index_da.properties

This file was deleted.

This file was deleted.

Loading

0 comments on commit 5ebe1c8

Please sign in to comment.