Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
a026f89e
J
jenkins
项目概览
LinuxSuRen
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
J
jenkins
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
a026f89e
编写于
1月 29, 2019
作者:
O
Oleg Nenashev
提交者:
GitHub
1月 29, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #3456 from jennbriden/master
Replacing text references of "slave" with "agent"
上级
d8c82d99
73fba29c
变更
30
隐藏空白更改
内联
并排
Showing
30 changed file
with
65 addition
and
65 deletion
+65
-65
core/src/main/java/hudson/Util.java
core/src/main/java/hudson/Util.java
+1
-1
core/src/main/java/hudson/slaves/ChannelPinger.java
core/src/main/java/hudson/slaves/ChannelPinger.java
+1
-1
core/src/main/java/hudson/slaves/SlaveComputer.java
core/src/main/java/hudson/slaves/SlaveComputer.java
+2
-2
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/model/Jenkins.java
+3
-3
core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity.html
...sources/hudson/model/AbstractItem/help-slaveAffinity.html
+1
-1
core/src/main/resources/hudson/slaves/JNLPLauncher/main_pt_BR.properties
...esources/hudson/slaves/JNLPLauncher/main_pt_BR.properties
+1
-1
core/src/main/resources/jenkins/model/Jenkins/systemInfo_bg.properties
.../resources/jenkins/model/Jenkins/systemInfo_bg.properties
+1
-1
core/src/main/resources/jenkins/security/s2m/filepath-filter.conf
.../main/resources/jenkins/security/s2m/filepath-filter.conf
+4
-4
core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.properties
...kins/slaves/JnlpSlaveAgentProtocol/description.properties
+1
-1
core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_bg.properties
...s/slaves/JnlpSlaveAgentProtocol/description_bg.properties
+1
-1
core/src/test/java/hudson/LauncherTest.java
core/src/test/java/hudson/LauncherTest.java
+1
-1
core/src/test/java/hudson/model/JobTest.java
core/src/test/java/hudson/model/JobTest.java
+2
-2
test/src/test/java/hudson/bugs/JnlpAccessWithSecuredHudsonTest.java
...est/java/hudson/bugs/JnlpAccessWithSecuredHudsonTest.java
+1
-1
test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
+1
-1
test/src/test/java/hudson/model/ProjectTest.java
test/src/test/java/hudson/model/ProjectTest.java
+3
-3
test/src/test/java/hudson/model/QueueTest.java
test/src/test/java/hudson/model/QueueTest.java
+1
-1
test/src/test/java/hudson/model/ViewTest.java
test/src/test/java/hudson/model/ViewTest.java
+2
-2
test/src/test/java/hudson/model/labels/LabelExpressionTest.java
...rc/test/java/hudson/model/labels/LabelExpressionTest.java
+2
-2
test/src/test/java/hudson/slaves/EnvironmentVariableNodePropertyTest.java
...va/hudson/slaves/EnvironmentVariableNodePropertyTest.java
+5
-5
test/src/test/java/hudson/tasks/EnvVarsInConfigTasksTest.java
.../src/test/java/hudson/tasks/EnvVarsInConfigTasksTest.java
+8
-8
test/src/test/java/hudson/util/ProcessTreeKillerTest.java
test/src/test/java/hudson/util/ProcessTreeKillerTest.java
+1
-1
test/src/test/java/jenkins/model/UnlabeledLoadStatisticsTest.java
.../test/java/jenkins/model/UnlabeledLoadStatisticsTest.java
+1
-1
test/src/test/java/jenkins/security/Security218Test.java
test/src/test/java/jenkins/security/Security218Test.java
+4
-4
test/src/test/java/jenkins/security/s2m/AdminFilePathFilterTest.java
...st/java/jenkins/security/s2m/AdminFilePathFilterTest.java
+1
-1
test/src/test/resources/hudson/model/node.xml
test/src/test/resources/hudson/model/node.xml
+1
-1
war/src/main/webapp/help/system-config/master-slave/availability_ja.html
...bapp/help/system-config/master-slave/availability_ja.html
+6
-6
war/src/main/webapp/help/system-config/master-slave/clock.html
...rc/main/webapp/help/system-config/master-slave/clock.html
+1
-1
war/src/main/webapp/help/system-config/master-slave/jnlp-tunnel.html
...n/webapp/help/system-config/master-slave/jnlp-tunnel.html
+4
-4
war/src/main/webapp/help/system-config/master-slave/jnlpSecurity.html
.../webapp/help/system-config/master-slave/jnlpSecurity.html
+3
-3
war/src/main/webapp/help/system-config/master-slave/numExecutors.html
.../webapp/help/system-config/master-slave/numExecutors.html
+1
-1
未找到文件。
core/src/main/java/hudson/Util.java
浏览文件 @
a026f89e
...
...
@@ -1597,7 +1597,7 @@ public class Util {
* Warning: This should only ever be used if you find that your builds are
* failing because Jenkins is unable to delete files, that this failure is
* because Jenkins itself has those files locked "open", and even then it
* should only be used on
slave
s with relatively few executors (because the
* should only be used on
agent
s with relatively few executors (because the
* garbage collection can impact the performance of all job executors on
* that slave).<br/>
* i.e. Setting this flag is a act of last resort - it is <em>not</em>
...
...
core/src/main/java/hudson/slaves/ChannelPinger.java
浏览文件 @
a026f89e
...
...
@@ -44,7 +44,7 @@ import java.util.logging.Level;
import
java.util.logging.Logger
;
/**
* Establish a periodic ping to keep connections between {@link Slave
slave
s}
* Establish a periodic ping to keep connections between {@link Slave
agent
s}
* and the main Jenkins node alive. This prevents network proxies from
* terminating connections that are idle for too long.
*
...
...
core/src/main/java/hudson/slaves/SlaveComputer.java
浏览文件 @
a026f89e
...
...
@@ -941,7 +941,7 @@ public class SlaveComputer extends Computer {
public
Void
call
()
{
SLAVE_LOG_HANDLER
=
new
RingBufferLogHandler
(
ringBufferSize
);
// avoid double installation of the handler. JNLP
slave
s can reconnect to the master multiple times
// avoid double installation of the handler. JNLP
agent
s can reconnect to the master multiple times
// and each connection gets a different RemoteClassLoader, so we need to evict them by class name,
// not by their identity.
for
(
Handler
h
:
LOGGER
.
getHandlers
())
{
...
...
@@ -958,7 +958,7 @@ public class SlaveComputer extends Computer {
}
try
{
getChannelOrFail
().
setProperty
(
"slave"
,
Boolean
.
TRUE
);
// indicate that this side of the channel is the
slave
side.
getChannelOrFail
().
setProperty
(
"slave"
,
Boolean
.
TRUE
);
// indicate that this side of the channel is the
agent
side.
}
catch
(
ChannelClosedException
e
)
{
throw
new
IllegalStateException
(
e
);
}
...
...
core/src/main/java/jenkins/model/Jenkins.java
浏览文件 @
a026f89e
...
...
@@ -3562,17 +3562,17 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
private
void
_cleanUpShutdownTcpSlaveAgent
(
List
<
Throwable
>
errors
)
{
if
(
tcpSlaveAgentListener
!=
null
)
{
LOGGER
.
log
(
FINE
,
"Shutting down TCP/IP
slave
agent listener"
);
LOGGER
.
log
(
FINE
,
"Shutting down TCP/IP agent listener"
);
try
{
tcpSlaveAgentListener
.
shutdown
();
}
catch
(
OutOfMemoryError
e
)
{
// we should just propagate this, no point trying to log
throw
e
;
}
catch
(
LinkageError
e
)
{
LOGGER
.
log
(
SEVERE
,
"Failed to shut down TCP/IP
slave
agent listener"
,
e
);
LOGGER
.
log
(
SEVERE
,
"Failed to shut down TCP/IP agent listener"
,
e
);
// safe to ignore and continue for this one
}
catch
(
Throwable
e
)
{
LOGGER
.
log
(
SEVERE
,
"Failed to shut down TCP/IP
slave
agent listener"
,
e
);
LOGGER
.
log
(
SEVERE
,
"Failed to shut down TCP/IP agent listener"
,
e
);
// save for later
errors
.
add
(
e
);
}
...
...
core/src/main/resources/hudson/model/AbstractItem/help-slaveAffinity.html
浏览文件 @
a026f89e
<div>
By default, builds of this project may be executed on any
build
agents that
By default, builds of this project may be executed on any agents that
are available and configured to accept new builds.
<p>
When this option is checked, you have the possibility to ensure that builds of
...
...
core/src/main/resources/hudson/slaves/JNLPLauncher/main_pt_BR.properties
浏览文件 @
a026f89e
...
...
@@ -21,7 +21,7 @@
# THE SOFTWARE.
launch\
agent
=
Lan
\u
00e7ar agente
# T
CP port for JNLP slave
agents is disabled.
# T
he TCP port for the JNLP
agents is disabled.
slaveAgentPort.disabled
=
Porta TCP para JNLP est
\u
00e1 desativada
Connected\
via\
JNLP\
agent.
=
Conectado via JNLP agente.
# Go to security configuration screen and change it
...
...
core/src/main/resources/jenkins/model/Jenkins/systemInfo_bg.properties
浏览文件 @
a026f89e
...
...
@@ -26,7 +26,7 @@ Name=\
\u0418\u
043c
\u0435
No\
plugins\
installed.
=
\
\u
041d
\u0435
\u0441\u0430
\u0438\u
043d
\u0441\u0442\u0430\u
043b
\u0438\u0440\u0430\u
043d
\u0438
\u
043f
\u0440\u0438\u0441\u0442\u0430\u0432\u
043a
\u0438
# Visit <a href="{0}">this page</a> for master and
slave
thread dumps.
# Visit <a href="{0}">this page</a> for master and
agent
thread dumps.
threadDump_blurb
=
\
\u
041d
\u0430
<a href="{0}">
\u0442\u0430\u0437\u0438
\u0441\u0442\u0440\u0430\u
043d
\u0438\u0446\u0430
</a> f
\u0441\u0430
\u0434\u0430\u0434\u0435\u
043d
\u0438
\u0440\u0430\u0437\u0442\u
043e
\u0432\u0430\u0440\u0432\u0430\u
043d
\u0438\u
044f
\u0442\u0430
\u
043d
\u0430
\u
043e
\u0441\u
043d
\u
043e
\u0432\u
043d
\u0438\u0442\u0435
\u0438\
\u
043f
\u
043e
\u0434\u0447\u0438\u
043d
\u0435\u
043d
\u0438
\u
043d
\u0438\u0448\u
043a
\u0438
.
...
...
core/src/main/resources/jenkins/security/s2m/filepath-filter.conf
浏览文件 @
a026f89e
# GENERATED FILE. DO NOT MODIFY.
#
# This file is for Jenkins core developers to list what we think are the best filtering rules
# for apparently harmless accesses to files on the Jenkins master from
slave
s.
# for apparently harmless accesses to files on the Jenkins master from
agent
s.
#
# To override these rules, place *.conf files by other names into this folder. Files are sorted
# before parsed, so using a lower number allows you to override what we have here. This file
...
...
@@ -10,12 +10,12 @@
# See https://jenkins.io/redirect/security-144 for more details.
# This directory contains credentials, master encryption keys, and other sensitive information
# that
slave
s have absolutely no business with.
# that
agent
s have absolutely no business with.
# Unless there are rules in other files allowing access to other portions of $JENKINS_HOME,
# this rule as it stands here has no effect, because anything left unspecified is rejected.
deny
all
<
JENKINS_HOME
>/
secrets
($|/.*)
# User content is publicly readable, so quite safe for
slave
s to read, too.
# User content is publicly readable, so quite safe for
agent
s to read, too.
# (The xunit plugin is known to read from here.)
# https://jenkins.io/redirect/user-content-directory
allow
read
,
stat
<
JENKINS_HOME
>/
userContent
($|/.*)
...
...
@@ -28,7 +28,7 @@ deny all <BUILDDIR>/program.dat
deny
all
<
BUILDDIR
>/
workflow
($|/.*)
# Various plugins read/write files under build directories, so allow them all.
# - git 1.x writes changelog.xml from the
slave
(2.x writes from the master so need not be listed)
# - git 1.x writes changelog.xml from the
agent
(2.x writes from the master so need not be listed)
# - analysis-core and plugins based on it write reports to workspace-files/
# - cobertura writes coverage.xml
# - violations writes violations.xml and other content under violations/
...
...
core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description.properties
浏览文件 @
a026f89e
summary
=
Accepts connections from remote clients so that they can be used as additional
build
agents.
\
summary
=
Accepts connections from remote clients so that they can be used as additional agents.
\
This protocol is unencrypted.
core/src/main/resources/jenkins/slaves/JnlpSlaveAgentProtocol/description_bg.properties
浏览文件 @
a026f89e
...
...
@@ -23,7 +23,7 @@
Accepts\
connections\
from\
remote\
clients\
so\
that\
they\
can\
be\
used\
as\
additional\
build\
agents
=
\
\u
041f
\u0440\u0438\u0435\u
043c
\u0430\u
043d
\u0435
\u
043d
\u0430
\u0432\u0440\u
044a
\u0437\u
043a
\u0438
\u
043e
\u0442
\u
043e
\u0442\u0434\u0430\u
043b
\u0435\u0447\u0435\u
043d
\u0438
\u
043a
\u
043b
\u0438\u0435\u
043d
\u0442\u0438
,
\u0442\u0430\u
043a
\u0430
\u0447\u0435
\u0442\u0435
\u0434\u0430
\u0441\u0435
\u0438\u0437\u
043f
\u
043e
\u
043b
\u0437\u0432\u0430\u0442
\u
043a
\u0430\u0442\u
043e
\
\u0434\u
043e
\u
043f
\u
044a
\u
043b
\u
043d
\u0438\u0442\u0435\u
043b
\u
043d
\u0438
\u
043c
\u0430\u0448\u0438\u
043d
\u0438
\u0437\u0430
\u0438\u0437\u0433\u0440\u0430\u0436\u0434\u0430\u
043d
\u0435
.
# Accepts connections from remote clients so that they can be used as additional
build
agents. \
# Accepts connections from remote clients so that they can be used as additional agents. \
# This protocol is unencrypted.
summary
=
\
\u
041f
\u0440\u0438\u0435\u
043c
\u0430\u
043d
\u0435
\u
043d
\u0430
\u0432\u0440\u
044a
\u0437\u
043a
\u0438
\u
043e
\u0442
\u
043e
\u0442\u0434\u0430\u
043b
\u0435\u0447\u0435\u
043d
\u0438
\u
043a
\u
043b
\u0438\u0435\u
043d
\u0442\u0438
,
\u0442\u0430\u
043a
\u0430
\u0447\u0435
\u0442\u0435
\u0434\u0430
\u0441\u0435
\u0438\u0437\u
043f
\u
043e
\u
043b
\u0437\u0432\u0430\u0442
\u
043a
\u0430\u0442\u
043e
\
...
...
core/src/test/java/hudson/LauncherTest.java
浏览文件 @
a026f89e
...
...
@@ -73,7 +73,7 @@ public class LauncherTest {
// returns immediately and pgrep sleep => nothing. But without fix
// hudson.model.Hudson.instance.nodes[0].rootPath.createLauncher(new hudson.util.StreamTaskListener(System.err)).
// launch().cmds("sleep", "1d").stdout(System.out).stderr(System.err).start().kill()
// hangs and on
slave
machine pgrep sleep => one process; after manual kill, script returns.
// hangs and on
agent
machine pgrep sleep => one process; after manual kill, script returns.
}
private
static
class
NoopCallable
extends
MasterToSlaveCallable
<
Object
,
RuntimeException
>
{
...
...
core/src/test/java/hudson/model/JobTest.java
浏览文件 @
a026f89e
...
...
@@ -49,7 +49,7 @@ public class JobTest {
@Issue
(
"JENKINS-14807"
)
@Test
public
void
use_slave_platform_path_separator_when_contribute_path
()
throws
Throwable
{
// mock environment to simulate EnvVars of
slave
node with different platform than master
// mock environment to simulate EnvVars of
agent
node with different platform than master
Platform
slavePlatform
=
Platform
.
current
()
==
Platform
.
UNIX
?
Platform
.
WINDOWS
:
Platform
.
UNIX
;
PowerMockito
.
mockStatic
(
Platform
.
class
);
Mockito
.
when
(
Platform
.
current
()).
thenReturn
(
slavePlatform
);
...
...
@@ -80,7 +80,7 @@ public class JobTest {
String
path
=
"/test"
;
env
.
override
(
"PATH+TEST"
,
path
);
assertThat
(
"The contributed PATH was not joined using the path separator defined in
slave
node"
,
//
assertThat
(
"The contributed PATH was not joined using the path separator defined in
agent
node"
,
//
env
.
get
(
"PATH"
),
//
CoreMatchers
.
containsString
(
path
+
(
slavePlatform
==
Platform
.
WINDOWS
?
';'
:
':'
)));
}
...
...
test/src/test/java/hudson/bugs/JnlpAccessWithSecuredHudsonTest.java
浏览文件 @
a026f89e
...
...
@@ -77,7 +77,7 @@ public class JnlpAccessWithSecuredHudsonTest {
public
TemporaryFolder
tmp
=
new
TemporaryFolder
();
/**
* Creates a new
slave
that needs to be launched via JNLP.
* Creates a new
agent
that needs to be launched via JNLP.
*/
protected
Slave
createNewJnlpSlave
(
String
name
)
throws
Exception
{
return
new
DumbSlave
(
name
,
""
,
System
.
getProperty
(
"java.io.tmpdir"
)+
'/'
+
name
,
"2"
,
Mode
.
NORMAL
,
""
,
new
JNLPLauncher
(
true
),
RetentionStrategy
.
INSTANCE
,
Collections
.
EMPTY_LIST
);
...
...
test/src/test/java/hudson/cli/UpdateNodeCommandTest.java
浏览文件 @
a026f89e
...
...
@@ -78,7 +78,7 @@ public class UpdateNodeCommandTest {
assertThat
(
result
,
succeededSilently
());
assertThat
(
"A
slave
with old name should not exist"
,
j
.
jenkins
.
getNode
(
"MySlave"
),
nullValue
());
assertThat
(
"A
n agent
with old name should not exist"
,
j
.
jenkins
.
getNode
(
"MySlave"
),
nullValue
());
final
Node
updatedSlave
=
j
.
jenkins
.
getNode
(
"SlaveFromXML"
);
assertThat
(
updatedSlave
.
getNodeName
(),
equalTo
(
"SlaveFromXML"
));
...
...
test/src/test/java/hudson/model/ProjectTest.java
浏览文件 @
a026f89e
...
...
@@ -728,7 +728,7 @@ public class ProjectTest {
}
/**
* Job is restricted, but label can not be provided by any cloud, only normal
slave
s. Then job will not submit, because no slave is available.
* Job is restricted, but label can not be provided by any cloud, only normal
agent
s. Then job will not submit, because no slave is available.
* @throws Exception
*/
@Test
...
...
@@ -748,12 +748,12 @@ public class ProjectTest {
j
.
buildAndAssertSuccess
(
proj
);
//Now create another slave. And restrict the job to that slave. The slave is offline, leaving the job with no assignable nodes.
//We tell our mock SCM to return that it has got changes. But since there are no
slave
s, we get the desired result.
//We tell our mock SCM to return that it has got changes. But since there are no
agent
s, we get the desired result.
Slave
s2
=
j
.
createSlave
();
proj
.
setAssignedLabel
(
s2
.
getSelfLabel
());
requiresWorkspaceScm
.
hasChange
=
true
;
//Poll (We now should have NO online
slave
s, this should now return NO_CHANGES.
//Poll (We now should have NO online
agent
s, this should now return NO_CHANGES.
PollingResult
pr
=
proj
.
poll
(
j
.
createTaskListener
());
assertFalse
(
pr
.
hasChanges
());
...
...
test/src/test/java/hudson/model/QueueTest.java
浏览文件 @
a026f89e
...
...
@@ -652,7 +652,7 @@ public class QueueTest {
* and then introduce a security restriction to prohibit that.
*/
@Test
public
void
permissionSensitiveSlaveAllocations
()
throws
Exception
{
r
.
jenkins
.
setNumExecutors
(
0
);
// restrict builds to those
slave
s
r
.
jenkins
.
setNumExecutors
(
0
);
// restrict builds to those
agent
s
DumbSlave
s1
=
r
.
createSlave
();
DumbSlave
s2
=
r
.
createSlave
();
...
...
test/src/test/java/hudson/model/ViewTest.java
浏览文件 @
a026f89e
...
...
@@ -363,11 +363,11 @@ public class ViewTest {
view2
.
add
(
foreignJob
);
foreignJob
.
setAssignedLabel
(
j
.
jenkins
.
getLabel
(
"label0||label1"
));
// contains all
slave
s having labels associated with freestyleJob or matrixJob
// contains all
agent
s having labels associated with freestyleJob or matrixJob
assertContainsNodes
(
view1
,
slave0
,
slave1
,
slave2
,
slave3
);
assertNotContainsNodes
(
view1
,
slave4
);
// contains all
slave
s having labels associated with foreignJob
// contains all
agent
s having labels associated with foreignJob
assertContainsNodes
(
view2
,
slave0
,
slave1
,
slave3
);
assertNotContainsNodes
(
view2
,
slave2
,
slave4
);
...
...
test/src/test/java/hudson/model/labels/LabelExpressionTest.java
浏览文件 @
a026f89e
...
...
@@ -75,7 +75,7 @@ public class LabelExpressionTest {
FreeStyleProject
p1
=
j
.
createFreeStyleProject
();
p1
.
getBuildersList
().
add
(
new
TestBuilder
()
{
public
boolean
perform
(
AbstractBuild
<?,
?>
build
,
Launcher
launcher
,
BuildListener
listener
)
throws
InterruptedException
,
IOException
{
seq
.
phase
(
0
);
// first, make sure the w32
slave
is occupied
seq
.
phase
(
0
);
// first, make sure the w32
agent
is occupied
seq
.
phase
(
2
);
seq
.
done
();
return
true
;
...
...
@@ -91,7 +91,7 @@ public class LabelExpressionTest {
Future
<
FreeStyleBuild
>
f1
=
p1
.
scheduleBuild2
(
0
);
seq
.
phase
(
1
);
// we schedule p2 build after w32
slave
is occupied
seq
.
phase
(
1
);
// we schedule p2 build after w32
agent
is occupied
Future
<
FreeStyleBuild
>
f2
=
p2
.
scheduleBuild2
(
0
);
Thread
.
sleep
(
1000
);
// time window to ensure queue has tried to assign f2 build
...
...
test/src/test/java/hudson/slaves/EnvironmentVariableNodePropertyTest.java
浏览文件 @
a026f89e
...
...
@@ -22,7 +22,7 @@ import com.gargoylesoftware.htmlunit.html.HtmlPage;
/**
* This class tests that environment variables from node properties are applied,
* and that the priority is maintained: parameters >
slave
node properties >
* and that the priority is maintained: parameters >
agent
node properties >
* master node properties
*/
public
class
EnvironmentVariableNodePropertyTest
extends
HudsonTestCase
{
...
...
@@ -31,7 +31,7 @@ public class EnvironmentVariableNodePropertyTest extends HudsonTestCase {
private
FreeStyleProject
project
;
/**
*
Slave
properties are available
*
Agent
properties are available
*/
public
void
testSlavePropertyOnSlave
()
throws
Exception
{
setVariables
(
slave
,
new
Entry
(
"KEY"
,
"slaveValue"
));
...
...
@@ -53,7 +53,7 @@ public class EnvironmentVariableNodePropertyTest extends HudsonTestCase {
}
/**
* Both
slave and master properties are available, but slave
properties have priority
* Both
agent and master properties are available, but agent
properties have priority
*/
public
void
testSlaveAndMasterPropertyOnSlave
()
throws
Exception
{
jenkins
.
getGlobalNodeProperties
().
replaceBy
(
...
...
@@ -67,8 +67,8 @@ public class EnvironmentVariableNodePropertyTest extends HudsonTestCase {
}
/**
*
Slave
and master properties and parameters are available.
* Priority: parameters >
slave
> master
*
Agent
and master properties and parameters are available.
* Priority: parameters >
agent
> master
* @throws Exception
*/
public
void
testSlaveAndMasterPropertyAndParameterOnSlave
()
...
...
test/src/test/java/hudson/tasks/EnvVarsInConfigTasksTest.java
浏览文件 @
a026f89e
...
...
@@ -78,7 +78,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
project
.
setScm
(
new
ExtractResourceSCM
(
getClass
().
getResource
(
"/simple-projects.zip"
)));
// test the regular
slave
- variable not expanded
// test the regular
agent
- variable not expanded
project
.
setAssignedLabel
(
slaveRegular
.
getSelfLabel
());
FreeStyleBuild
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
@@ -89,7 +89,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
System
.
out
.
println
(
buildLogRegular
);
assertTrue
(
buildLogRegular
.
contains
(
DUMMY_LOCATION_VARNAME
));
// test the
slave
with prepared environment
// test the
agent
with prepared environment
project
.
setAssignedLabel
(
slaveEnv
.
getSelfLabel
());
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
@@ -119,7 +119,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
new
Ant
(
"-Dtest.property=cor${"
+
DUMMY_LOCATION_VARNAME
+
"}rect"
,
"varAnt"
,
""
,
buildFile
,
""
));
// test the regular
slave
- variable not expanded
// test the regular
agent
- variable not expanded
project
.
setAssignedLabel
(
slaveRegular
.
getSelfLabel
());
FreeStyleBuild
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
@@ -129,7 +129,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
String
buildLogRegular
=
getBuildLog
(
build
);
assertTrue
(
buildLogRegular
.
contains
(
Ant_ExecutableNotFound
(
"varAnt"
)));
// test the
slave
with prepared environment
// test the
agent
with prepared environment
project
.
setAssignedLabel
(
slaveEnv
.
getSelfLabel
());
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
@@ -158,7 +158,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
+
DUMMY_LOCATION_VARNAME
+
"}"
,
""
,
""
,
false
));
// test the regular
slave
- variable not expanded
// test the regular
agent
- variable not expanded
project
.
setAssignedLabel
(
slaveRegular
.
getSelfLabel
());
FreeStyleBuild
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
@@ -169,7 +169,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
System
.
out
.
println
(
buildLogRegular
);
assertTrue
(
buildLogRegular
.
contains
(
DUMMY_LOCATION_VARNAME
));
// test the
slave
with prepared environment
// test the
agent
with prepared environment
project
.
setAssignedLabel
(
slaveEnv
.
getSelfLabel
());
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
@@ -191,7 +191,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
project
.
setMaven
(
"varMaven"
);
project
.
setGoals
(
"clean${"
+
DUMMY_LOCATION_VARNAME
+
"}"
);
// test the regular
slave
- variable not expanded
// test the regular
agent
- variable not expanded
project
.
setAssignedLabel
(
slaveRegular
.
getSelfLabel
());
MavenModuleSetBuild
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
@@ -201,7 +201,7 @@ public class EnvVarsInConfigTasksTest extends HudsonTestCase {
String
buildLogRegular
=
getBuildLog
(
build
);
System
.
out
.
println
(
buildLogRegular
);
// test the
slave
with prepared environment
// test the
agent
with prepared environment
project
.
setAssignedLabel
(
slaveEnv
.
getSelfLabel
());
build
=
project
.
scheduleBuild2
(
0
).
get
();
System
.
out
.
println
(
build
.
getDisplayName
()
+
" completed"
);
...
...
test/src/test/java/hudson/util/ProcessTreeKillerTest.java
浏览文件 @
a026f89e
...
...
@@ -158,7 +158,7 @@ public class ProcessTreeKillerTest {
pb
.
command
(
"sleep"
,
"5m"
);
}
// Create a
slave
so we can tell it to kill the process
// Create a
n agent
so we can tell it to kill the process
Slave
s
=
j
.
createSlave
();
s
.
toComputer
().
connect
(
false
).
get
();
...
...
test/src/test/java/jenkins/model/UnlabeledLoadStatisticsTest.java
浏览文件 @
a026f89e
...
...
@@ -61,7 +61,7 @@ public class UnlabeledLoadStatisticsTest {
assertEquals
(
"Queue must be empty when the test starts"
,
0
,
queue
.
getBuildableItems
().
size
());
assertEquals
(
"Statistics must return 0 when the test starts"
,
0
,
unlabeledLoad
.
computeQueueLength
());
// Disable builds by default, create a
slave
to prevent assigning of "master" labels
// Disable builds by default, create a
n agent
to prevent assigning of "master" labels
j
.
jenkins
.
setNumExecutors
(
0
);
DumbSlave
slave
=
j
.
createOnlineSlave
(
new
LabelAtom
(
"testLabel"
));
slave
.
setMode
(
Node
.
Mode
.
EXCLUSIVE
);
...
...
test/src/test/java/jenkins/security/Security218Test.java
浏览文件 @
a026f89e
...
...
@@ -67,7 +67,7 @@ public class Security218Test implements Serializable {
}
/**
* The attack scenario here is that a master sends a normal command to a
slave and a slave
* The attack scenario here is that a master sends a normal command to a
n agent and
* inserts a malicious response.
*/
@SuppressWarnings
(
"ConstantConditions"
)
...
...
@@ -88,7 +88,7 @@ public class Security218Test implements Serializable {
// TODO: reconcile this duplicate with JnlpAccessWithSecuredHudsonTest
/**
* Creates a new
slave
that needs to be launched via JNLP.
* Creates a new
agent
that needs to be launched via JNLP.
*
* @see #launchJnlpSlave(Slave)
*/
...
...
@@ -100,7 +100,7 @@ public class Security218Test implements Serializable {
// TODO: reconcile this duplicate with JnlpAccessWithSecuredHudsonTest
/**
* Launch a JNLP
slave
created by {@link #createJnlpSlave(String)}
* Launch a JNLP
agent
created by {@link #createJnlpSlave(String)}
*/
public
Channel
launchJnlpSlave
(
Slave
slave
)
throws
Exception
{
j
.
createWebClient
().
goTo
(
"computer/"
+
slave
.
getNodeName
()+
"/slave-agent.jnlp?encrypt=true"
,
"application/octet-stream"
);
...
...
@@ -124,7 +124,7 @@ public class Security218Test implements Serializable {
Thread
.
sleep
(
100
);
}
throw
new
AssertionError
(
"
JNLP slave
agent failed to connect"
);
throw
new
AssertionError
(
"
The JNLP
agent failed to connect"
);
}
@After
...
...
test/src/test/java/jenkins/security/s2m/AdminFilePathFilterTest.java
浏览文件 @
a026f89e
...
...
@@ -175,7 +175,7 @@ public class AdminFilePathFilterTest {
}
private
void
checkSlave_can_readFile
(
Slave
s
,
FilePath
target
)
throws
Exception
{
//
slave
can read file from userContent
//
The agent
can read file from userContent
String
content
=
s
.
getChannel
().
call
(
new
ReadFileS2MCallable
(
target
));
// and the master can directly reach it
assertEquals
(
target
.
readToString
(),
content
);
...
...
test/src/test/resources/hudson/model/node.xml
浏览文件 @
a026f89e
<?xml version="1.0" encoding="UTF-8"?>
<slave>
<name>
SlaveFromXML
</name>
<description>
XML
slave
description
</description>
<description>
XML
agent
description
</description>
<remoteFS>
/user/hudson/workspace
</remoteFS>
<numExecutors>
42
</numExecutors>
<mode>
NORMAL
</mode>
...
...
war/src/main/webapp/help/system-config/master-slave/availability_ja.html
浏览文件 @
a026f89e
...
...
@@ -12,15 +12,15 @@
</dd>
<!--dt><b>
Take this
slave on-line and off-
line at specific times
Take this
agent online and off
line at specific times
</b></dt>
<dd>
In this mode, Jenkins will keep the
slave
on-line according to the configured schedule.
If Jenkins can start the
slave
without user assistance, it will periodically
attempt to start the
slave
if it is unavailable during an on-line window.
In this mode, Jenkins will keep the
agent
on-line according to the configured schedule.
If Jenkins can start the
agent
without user assistance, it will periodically
attempt to start the
agent
if it is unavailable during an on-line window.
During an off
-line window, the slave
will only be taken off-line if there are no active
jobs running on the
slave
.
During an off
line window, the agent
will only be taken off-line if there are no active
jobs running on the
agent
.
</dd-->
<dt><b>
...
...
war/src/main/webapp/help/system-config/master-slave/clock.html
浏览文件 @
a026f89e
<div>
Many aspects of a build are sensitive to the clock, and therefore if the clock of the machine
that Jenkins runs and that of the
slave
differ significantly, it can cause mysterious problems.
that Jenkins runs and that of the
agent
differ significantly, it can cause mysterious problems.
Consider synchronizing clocks between machines by NTP.
</div>
war/src/main/webapp/help/system-config/master-slave/jnlp-tunnel.html
浏览文件 @
a026f89e
<div>
When a
slave is launched through JNLP, the slav
e agent attempts to connect to a specific TCP port of Jenkins
When a
n agent is launched through JNLP, th
e agent attempts to connect to a specific TCP port of Jenkins
to establish a communication channel.
But some security sensitive network can prevent you from making this connection.
This can also happen when Jenkins runs behind a load balancer,
...
...
@@ -9,11 +9,11 @@
<p>
This tunneling option allows you to route this connection to another host/port, and useful for those situations.
The field can either take "
<tt>
HOST:PORT
</tt>
", "
<tt>
:PORT
</tt>
", or "
<tt>
HOST:
</tt>
". In the first format,
JNLP
slave
agent will connect to the given TCP port on the given host, and assume that you've configured your
network so that this port forwards the connection to Jenkins' JNLP
slave
TCP port.
JNLP agent will connect to the given TCP port on the given host, and assume that you've configured your
network so that this port forwards the connection to Jenkins' JNLP
agent
TCP port.
<p>
In the latter two formats, the default host name and port number (that is, the host name that Jenkins runs,
and the TCP port that Jenkins opened) are used to augment the missing values. In particular the
<tt>
HOST:
</tt>
format
is useful if the HTTP reverse proxy is used and Jenkins actually runs on another system.
</div>
\ No newline at end of file
</div>
war/src/main/webapp/help/system-config/master-slave/jnlpSecurity.html
浏览文件 @
a026f89e
...
...
@@ -25,10 +25,10 @@
</b></dt>
<dd>
In this mode, Jenkins provides the JNLP launch link on the computer view.
The link will always be available whenever the
slave
is offline.
The link will always be available whenever the
agent
is offline.
<br
/>
<b>
WARNING!
</b>
In this mode security is disabled. Thus slaves can be started by
<em>
anyone
that can access this server
</em>
.
Slave
s have the ability to execute arbitrary code on the
that can access this server
</em>
.
Agent
s have the ability to execute arbitrary code on the
master.
<b>
Do not select this option unless you are fully aware of the risks
</b>
</dd>
...
...
@@ -38,7 +38,7 @@
<dd>
In this mode, Jenkins provides the JNLP launch link on both the computer view and the Build Executor Status
sidepanel.
The link will always be available whenever the
slave
is offline.
The link will always be available whenever the
agent
is offline.
</dd-->
</dl>
...
...
war/src/main/webapp/help/system-config/master-slave/numExecutors.html
浏览文件 @
a026f89e
...
...
@@ -9,6 +9,6 @@
for I/O.
<p>
Setting this value to 0 is useful to remove a disabled
slave
from Jenkins temporarily without
Setting this value to 0 is useful to remove a disabled
agent
from Jenkins temporarily without
losing other configuration information.
</div>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录