Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JENKINS-42816] use agent terminology and fix help for label. #152

Merged
merged 2 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ JobPropertyImpl.ValidateRequired=Required
JobPropertyImpl.LabelString.InvalidBooleanExpression=\
Invalid boolean expression: {0}
JobPropertyImpl.LabelString.NoMatch=\
There's no slave/cloud that matches this assignment
There's no agent/cloud that matches this assignment
KeepBuildForEverAction.descriptor.displayName=Keep Build Forever
KeepBuildForEverAction.console.notPromotion=This build is not a promotion, how did we get here? Not keeping build.
KeepBuildForEverAction.console.promotionNotGoodEnough=Promotion build result [{0}] is not good enough. Not keeping build.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<div>
If you want to always run this promotion process on a specific node/slave, just specify its name.
If you want to always run this promotion process on a specific node/agent, just specify its name.
If not specified, the same label which the promoted build used can be used.
This works well when you have a small number of nodes.

<p>
As the size of the cluster grows, it becomes useful not to tie projects to specific slaves,
as it hurts resource utilization when slaves may come and go. For such situation, assign labels
to slaves to classify their capabilities and characteristics, and specify a boolean expression
As the size of the cluster grows, it becomes useful not to tie projects to specific agents,
as it hurts resource utilization when agents may come and go. For such situation, assign labels
to agents to classify their capabilities and characteristics, and specify a boolean expression
over those labels to decide where to run.

<h3>Valid Operators</h3>
Expand All @@ -32,22 +32,22 @@ <h3>Valid Operators</h3>
<dt>a -> b</dt>
<dd>
"implies" operator. Equivalent to <tt>!a|b</tt>.
For example, <tt>windows->x64</tt> could be thought of as "if run on a Windows slave,
that slave must be 64bit." It still allows Jenkins to run this build on linux.
For example, <tt>windows->x64</tt> could be thought of as "if run on a Windows agent,
that agent must be 64bit." It still allows Jenkins to run this build on linux.
</dd>

<dt>a &lt;-> b</dt>
<dd>
"if and only if" operator. Equivalent to <tt>a&amp;&amp;b || !a&amp;&amp;!b</tt>.
For example, <tt>windows->sfbay</tt> could be thought of as "if run on a Windows slave,
that slave must be in the SF bay area, but if not on Windows, it must not be in the bay area."
For example, <tt>windows->sfbay</tt> could be thought of as "if run on a Windows agent,
that agent must be in the SF bay area, but if not on Windows, it must not be in the bay area."
</dd>
</dl>
<p>
All operators are left-associative (i.e., a->b->c &lt;-> (a->b)->c )
An expression can contain whitespace for better readability, and it'll be ignored.

<p>
Label names or slave names can be quoted if they contain unsafe characters. For example,
Label names or agent names can be quoted if they contain unsafe characters. For example,
<tt>"jenkins-solaris (Solaris)" || "Windows 2008"</tt>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
<f:optionalBlock name="hasAssignedLabel" title="${%Restrict where this promotion process can be run}"
checked="${instance.assignedLabelString!=null}" inline="true">
<f:entry title="${%Label Expression}"
description="If not set, the label of the promoted build will be used.">
<f:textbox autoCompleteDelimChar=" " name="assignedLabelString" value="${instance.assignedLabelString}" autoCompleteField="assignedLabelString"/>
description="If not set, the label of the promoted build will be used." field="assignedLabelString">
aHenryJard marked this conversation as resolved.
Show resolved Hide resolved
<f:textbox autoCompleteDelimChar=" "/>
</f:entry>
</f:optionalBlock>

Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/complex-example-dsl.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ freeStyleJob('test-job-complex') {
promotion {
name("Development")
icon("star-red")
restrict('slave1')
restrict('agent1')
conditions {
manual('testuser'){
parameters{
Expand Down Expand Up @@ -32,7 +32,7 @@ freeStyleJob('test-job-complex') {
promotion {
name("Test")
icon("star-yellow")
restrict('slave2')
restrict('agent2')
conditions {
manual('testuser')
upstream("Development")
Expand Down