mirror of
https://github.com/jenkinsci/jenkins.git
synced 2026-10-26 19:15:09 +00:00
Update Jenkins CLI subpages to use experimental Manage Jenkins UI (#26316)
Update Jenkins CLI to use experimental Manage Jenkins UI
This commit is contained in:
1 parent
bc9bf81ab5
commit
9b155ce348
5 files changed
+52
-41
No files matched your search
@@ -221,21 +221,7 @@ public class BuildCommand extends CLICommand {
|
||||
|
||||
@Override
|
||||
protected void printUsageSummary(PrintStream stderr) {
|
||||
stderr.println(
|
||||
"""
|
||||
Starts a build, and optionally waits for a completion.
|
||||
Aside from general scripting use, this command can be
|
||||
used to invoke another job from within a build of one job.
|
||||
With the -s option, this command changes the exit code based on
|
||||
the outcome of the build (exit code 0 indicates a success)
|
||||
and interrupting the command will interrupt the job.
|
||||
With the -f option, this command changes the exit code based on
|
||||
the outcome of the build (exit code 0 indicates a success)
|
||||
however, unlike -s, interrupting the command will not interrupt
|
||||
the job (exit code 125 indicates the command was interrupted).
|
||||
With the -c option, a build will only run if there has been
|
||||
an SCM change."""
|
||||
);
|
||||
stderr.println(Messages.BuildCommand_PrintUsageSummary());
|
||||
}
|
||||
|
||||
public static class CLICause extends UserIdCause {
|
||||
|
||||
@@ -24,19 +24,21 @@ 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 title="${command.name}" permission="${app.READ}" type="one-column">
|
||||
<l:breadcrumb title="${command.name}" />
|
||||
<l:main-panel>
|
||||
<h1>
|
||||
Command ${command.name}
|
||||
</h1>
|
||||
<l:settings-subpage title="Command ${command.name}" permission="${app.READ}" includeBreadcrumb="true" noDefer="true">
|
||||
<div class="jenkins-page-description">
|
||||
<j:out value="${h.escape(command.longDescription)}"/>
|
||||
</div>
|
||||
|
||||
<f:section title="${%Command}">
|
||||
<j:set var="commandArgs" value="${command.name}${command.singleLineSummary}"/>
|
||||
<st:include page="example.jelly"/>
|
||||
<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>
|
||||
</pre>
|
||||
</l:main-panel>
|
||||
</l:layout>
|
||||
<st:include page="example.jelly" />
|
||||
|
||||
<j:set var="usage" value="${command.usage}"/>
|
||||
<j:if test="${!empty usage}">
|
||||
<pre class="jenkins-!-margin-top-3">
|
||||
${command.usage}
|
||||
</pre>
|
||||
</j:if>
|
||||
</f:section>
|
||||
</l:settings-subpage>
|
||||
</j:jelly>
|
||||
@@ -1,4 +1,4 @@
|
||||
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
|
||||
instruction2=Run it as follows:
|
||||
@@ -68,6 +68,13 @@ SessionIdCommand.ShortDescription=Outputs the session ID, which changes every ti
|
||||
UpdateViewCommand.ShortDescription=\
|
||||
Updates the view definition XML from stdin. The opposite of the get-view command.
|
||||
|
||||
BuildCommand.PrintUsageSummary=Starts a build, and optionally waits for a completion. \
|
||||
Aside from general scripting use, this command can be used to invoke another job from within a build of one job. \
|
||||
With the -s option, this command changes the exit code based on the outcome of the build (exit code 0 indicates a \
|
||||
success) and interrupting the command will interrupt the job. With the -f option, this command changes the exit \
|
||||
code based on the outcome of the build (exit code 0 indicates a success) however, unlike -s, interrupting the \
|
||||
command will not interrupt the job (exit code 125 indicates the command was interrupted). With the -c option, a \
|
||||
build will only run if there has been an SCM change.
|
||||
BuildCommand.CLICause.ShortDescription=Started from command line by {0}
|
||||
BuildCommand.CLICause.CannotBuildDisabled=\
|
||||
Cannot build {0} because it is disabled.
|
||||
|
||||
@@ -44,6 +44,16 @@ THE SOFTWARE.
|
||||
<st:attribute name="header">
|
||||
Optional header for the page, falls back to a default header if not set.
|
||||
</st:attribute>
|
||||
<st:attribute name="title">
|
||||
<![CDATA[
|
||||
Optional title for the page, falls back to <code>managementLink.displayName</code> if not set.
|
||||
]]>
|
||||
</st:attribute>
|
||||
<st:attribute name="description">
|
||||
<![CDATA[
|
||||
Optional description for the page, falls back to <code>managementLink.description</code> if not set.
|
||||
]]>
|
||||
</st:attribute>
|
||||
<st:attribute name="includeBreadcrumb">
|
||||
<![CDATA[
|
||||
Optional breadcrumb, will add a breadcrumb for the current <code>it</code>
|
||||
@@ -65,8 +75,10 @@ THE SOFTWARE.
|
||||
<l:userExperimentalFlag var="newManageJenkins" flagClassName="jenkins.model.experimentalflags.NewManageJenkinsUserExperimentalFlag" />
|
||||
|
||||
<j:set var="managementLink" value="${attrs.managementLink ?: it}" />
|
||||
<j:set var="pageTitle" value="${attrs.title ?: managementLink.displayName}" />
|
||||
<j:set var="description" value="${attrs.description ?: managementLink.description}" />
|
||||
|
||||
<l:layout title="${managementLink.displayName} - ${manageJenkinsAction.displayName}"
|
||||
<l:layout title="${pageTitle} - ${manageJenkinsAction.displayName}"
|
||||
permission="${attrs.permission}"
|
||||
permissions="${attrs.permissions}"
|
||||
type="${(newManageJenkins or attrs.includeSidepanel) ? 'two-column' : 'one-column'}">
|
||||
@@ -75,10 +87,10 @@ THE SOFTWARE.
|
||||
<!-- Hacky - this will be improved in subsequent PRs -->
|
||||
<j:choose>
|
||||
<j:when test="${managementLink.class.name eq 'jenkins.management.ConfigureLink'}">
|
||||
<f:breadcrumb-config-outline title="${managementLink.displayName}" />
|
||||
<f:breadcrumb-config-outline title="${pageTitle}" />
|
||||
</j:when>
|
||||
<j:otherwise>
|
||||
<l:breadcrumb title="${managementLink.displayName}" />
|
||||
<l:breadcrumb title="${pageTitle}" />
|
||||
</j:otherwise>
|
||||
</j:choose>
|
||||
</j:if>
|
||||
@@ -114,10 +126,12 @@ THE SOFTWARE.
|
||||
<div class="app-settings-container">
|
||||
<div class="app-settings-container__inner">
|
||||
<j:if test="${!attrs.containsKey('header')}">
|
||||
<l:app-bar title="${managementLink.displayName}" />
|
||||
<div class="jenkins-page-description">
|
||||
${managementLink.description}
|
||||
</div>
|
||||
<l:app-bar title="${pageTitle}" />
|
||||
<j:if test="${!empty(description)}">
|
||||
<div class="jenkins-page-description">
|
||||
${description}
|
||||
</div>
|
||||
</j:if>
|
||||
</j:if>
|
||||
|
||||
<j:out value="${attrs.header}" />
|
||||
@@ -155,10 +169,12 @@ THE SOFTWARE.
|
||||
|
||||
<l:main-panel>
|
||||
<j:if test="${!attrs.containsKey('header')}">
|
||||
<l:app-bar title="${managementLink.displayName}" />
|
||||
<div class="jenkins-page-description">
|
||||
${managementLink.description}
|
||||
</div>
|
||||
<l:app-bar title="${pageTitle}" />
|
||||
<j:if test="${!empty(description)}">
|
||||
<div class="jenkins-page-description">
|
||||
${description}
|
||||
</div>
|
||||
</j:if>
|
||||
</j:if>
|
||||
|
||||
<j:out value="${attrs.header}" />
|
||||
|
||||
Reference in new issue
Block a user