Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
4398c980
J
jenkins
项目概览
FIY695
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
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,发现更多精彩内容 >>
提交
4398c980
编写于
4月 14, 2015
作者:
D
David Hoover
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Replace 'Hudson' with 'Jenkins' in more docstrings.
上级
38c2f98f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
34 addition
and
35 deletion
+34
-35
core/src/main/java/jenkins/model/Jenkins.java
core/src/main/java/jenkins/model/Jenkins.java
+33
-34
core/src/main/java/jenkins/security/NonSerializableSecurityContext.java
...java/jenkins/security/NonSerializableSecurityContext.java
+1
-1
未找到文件。
core/src/main/java/jenkins/model/Jenkins.java
浏览文件 @
4398c980
...
...
@@ -316,7 +316,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
public
transient
final
Lookup
lookup
=
new
Lookup
();
/**
* We update this field to the current version of
Hudson
whenever we save {@code config.xml}.
* We update this field to the current version of
Jenkins
whenever we save {@code config.xml}.
* This can be used to detect when an upgrade happens from one version to next.
*
* <p>
...
...
@@ -351,7 +351,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
/**
* Controls how the
* <a href="http://en.wikipedia.org/wiki/Authorization">authorization</a>
* is handled in
Hudson
.
* is handled in
Jenkins
.
* <p>
* This ultimately controls who has access to what.
*
...
...
@@ -362,7 +362,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
/**
* Controls a part of the
* <a href="http://en.wikipedia.org/wiki/Authentication">authentication</a>
* handling in
Hudson
.
* handling in
Jenkins
.
* <p>
* Intuitively, this corresponds to the user database.
*
...
...
@@ -466,7 +466,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
};
/**
* {@link Computer}s in this
Hudson
system. Read-only.
* {@link Computer}s in this
Jenkins
system. Read-only.
*/
protected
transient
final
Map
<
Node
,
Computer
>
computers
=
new
CopyOnWriteMap
.
Hash
<
Node
,
Computer
>();
...
...
@@ -644,7 +644,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
public
transient
final
List
<
AdministrativeMonitor
>
administrativeMonitors
=
getExtensionList
(
AdministrativeMonitor
.
class
);
/**
* Widgets on
Hudson
.
* Widgets on
Jenkins
.
*/
private
transient
final
List
<
Widget
>
widgets
=
getExtensionList
(
Widget
.
class
);
...
...
@@ -881,7 +881,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
* Executes a reactor.
*
* @param is
* If non-null, this can be consulted for ignoring some tasks. Only used during the initialization of
Hudson
.
* If non-null, this can be consulted for ignoring some tasks. Only used during the initialization of
Jenkins
.
*/
private
void
executeReactor
(
final
InitStrategy
is
,
TaskBuilder
...
builders
)
throws
IOException
,
InterruptedException
,
ReactorException
{
Reactor
reactor
=
new
Reactor
(
builders
)
{
...
...
@@ -1186,7 +1186,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Gets the {@link Descriptor} instance in the current
Hudson
by its type.
* Gets the {@link Descriptor} instance in the current
Jenkins
by its type.
*/
public
<
T
extends
Descriptor
>
T
getDescriptorByType
(
Class
<
T
>
type
)
{
for
(
Descriptor
d
:
getExtensionList
(
Descriptor
.
class
)
)
...
...
@@ -1343,7 +1343,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
*
* <p>
* To register an {@link Action}, implement {@link RootAction} extension point, or write code like
* {@code
Hudson
.getInstance().getActions().add(...)}.
* {@code
Jenkins
.getInstance().getActions().add(...)}.
*
* @return
* Live list where the changes can be made. Can be empty but never null.
...
...
@@ -1481,7 +1481,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Returns the primary {@link View} that renders the top-page of
Hudson
.
* Returns the primary {@link View} that renders the top-page of
Jenkins
.
*/
@Exported
public
View
getPrimaryView
()
{
...
...
@@ -1517,7 +1517,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
*
* <p>
* This method continues to return true until the system configuration is saved, at which point
* {@link #version} will be overwritten and
Hudson
forgets the upgrade history.
* {@link #version} will be overwritten and
Jenkins
forgets the upgrade history.
*
* <p>
* To handle SNAPSHOTS correctly, pass in "1.N.*" to test if it's upgrading from the version
...
...
@@ -1661,7 +1661,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
/**
* Gets the slave node of the give name, hooked under this
Hudson
.
* Gets the slave node of the give name, hooked under this
Jenkins
.
*/
public
@CheckForNull
Node
getNode
(
String
name
)
{
return
nodes
.
getNode
(
name
);
...
...
@@ -1687,14 +1687,14 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Adds one more {@link Node} to
Hudson
.
* Adds one more {@link Node} to
Jenkins
.
*/
public
void
addNode
(
Node
n
)
throws
IOException
{
nodes
.
addNode
(
n
);
}
/**
* Removes a {@link Node} from
Hudson
.
* Removes a {@link Node} from
Jenkins
.
*/
public
void
removeNode
(
@Nonnull
Node
n
)
throws
IOException
{
nodes
.
removeNode
(
n
);
...
...
@@ -1904,7 +1904,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Gets the absolute URL of
Hudson top page, such as {@code http://localhost/hudson
/}.
* Gets the absolute URL of
Jenkins top page, such as {@code http://localhost/jenkins
/}.
*
* <p>
* Unlike {@link #getRootUrl()}, which uses the manually configured value,
...
...
@@ -2070,8 +2070,8 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* If true, all the POST requests to
Hudson
would have to have crumb in it to protect
*
Hudson
from CSRF vulnerabilities.
* If true, all the POST requests to
Jenkins
would have to have crumb in it to protect
*
Jenkins
from CSRF vulnerabilities.
*/
@Exported
public
boolean
isUseCrumbs
()
{
...
...
@@ -2079,8 +2079,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Returns the constant that captures the three basic security modes
* in Hudson.
* Returns the constant that captures the three basic security modes in Jenkins.
*/
public
SecurityMode
getSecurity
()
{
// fix the variable so that this code works under concurrent modification to securityRealm.
...
...
@@ -2277,7 +2276,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Returns true if
Hudson
is quieting down.
* Returns true if
Jenkins
is quieting down.
* <p>
* No further jobs will be executed unless it
* can be finished while other current pending builds
...
...
@@ -2507,7 +2506,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
/**
* Called by {@link Job#renameTo(String)} to update relevant data structure.
* assumed to be synchronized on
Hudson
by the caller.
* assumed to be synchronized on
Jenkins
by the caller.
*/
public
void
onRenamed
(
TopLevelItem
job
,
String
oldName
,
String
newName
)
throws
IOException
{
items
.
remove
(
oldName
);
...
...
@@ -2616,7 +2615,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
final
Set
<
String
>
loadedNames
=
Collections
.
synchronizedSet
(
new
HashSet
<
String
>());
TaskGraphBuilder
g
=
new
TaskGraphBuilder
();
Handle
load
Hudson
=
g
.
requires
(
EXTENSIONS_AUGMENTED
).
attains
(
JOB_LOADED
).
add
(
"Loading global config"
,
new
Executable
()
{
Handle
load
Jenkins
=
g
.
requires
(
EXTENSIONS_AUGMENTED
).
attains
(
JOB_LOADED
).
add
(
"Loading global config"
,
new
Executable
()
{
public
void
run
(
Reactor
session
)
throws
Exception
{
XmlFile
cfg
=
getConfigFile
();
if
(
cfg
.
exists
())
{
...
...
@@ -2642,7 +2641,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
});
for
(
final
File
subdir
:
subdirs
)
{
g
.
requires
(
load
Hudson
).
attains
(
JOB_LOADED
).
notFatal
().
add
(
"Loading job "
+
subdir
.
getName
(),
new
Executable
()
{
g
.
requires
(
load
Jenkins
).
attains
(
JOB_LOADED
).
notFatal
().
add
(
"Loading job "
+
subdir
.
getName
(),
new
Executable
()
{
public
void
run
(
Reactor
session
)
throws
Exception
{
if
(!
Items
.
getConfigFile
(
subdir
).
exists
())
{
//Does not have job config file, so it is not a jenkins job hence skip it
...
...
@@ -2682,7 +2681,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
// initialize views by inserting the default view if necessary
// this is both for clean
Hudson
and for backward compatibility.
// this is both for clean
Jenkins
and for backward compatibility.
if
(
views
.
size
()==
0
||
primaryView
==
null
)
{
View
v
=
new
AllView
(
Messages
.
Hudson_ViewName
());
setViewOwner
(
v
);
...
...
@@ -3298,7 +3297,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Perform a restart of
Hudson
, if we can.
* Perform a restart of
Jenkins
, if we can.
*
* This first replaces "app" to {@link HudsonIsRestarting}
*/
...
...
@@ -3317,7 +3316,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Queues up a restart of
Hudson
for when there are no builds running, if we can.
* Queues up a restart of
Jenkins
for when there are no builds running, if we can.
*
* This first replaces "app" to {@link HudsonIsRestarting}
*
...
...
@@ -3339,7 +3338,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
*/
public
void
restart
()
throws
RestartNotSupportedException
{
final
Lifecycle
lifecycle
=
Lifecycle
.
get
();
lifecycle
.
verifyRestartable
();
// verify that
Hudson
is restartable
lifecycle
.
verifyRestartable
();
// verify that
Jenkins
is restartable
servletContext
.
setAttribute
(
"app"
,
new
HudsonIsRestarting
());
new
Thread
(
"restart thread"
)
{
...
...
@@ -3356,9 +3355,9 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
listener
.
onRestart
();
lifecycle
.
restart
();
}
catch
(
InterruptedException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to restart
Hudson
"
,
e
);
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to restart
Jenkins
"
,
e
);
}
catch
(
IOException
e
)
{
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to restart
Hudson
"
,
e
);
LOGGER
.
log
(
Level
.
WARNING
,
"Failed to restart
Jenkins
"
,
e
);
}
}
}.
start
();
...
...
@@ -3370,7 +3369,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
*/
public
void
safeRestart
()
throws
RestartNotSupportedException
{
final
Lifecycle
lifecycle
=
Lifecycle
.
get
();
lifecycle
.
verifyRestartable
();
// verify that
Hudson
is restartable
lifecycle
.
verifyRestartable
();
// verify that
Jenkins
is restartable
// Quiet down so that we won't launch new builds.
isQuietingDown
=
true
;
...
...
@@ -4043,7 +4042,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Live view of recent {@link LogRecord}s produced by
Hudson
.
* Live view of recent {@link LogRecord}s produced by
Jenkins
.
*/
public
static
List
<
LogRecord
>
logRecords
=
Collections
.
emptyList
();
// initialized to dummy value to avoid NPE
...
...
@@ -4099,20 +4098,20 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
}
/**
* Version number of this
Hudson
.
* Version number of this
Jenkins
.
*/
public
static
String
VERSION
=
"?"
;
/**
* Parses {@link #VERSION} into {@link VersionNumber}, or null if it's not parseable as a version number
* (such as when
Hudson
is run with "mvn hudson-dev:run")
* (such as when
Jenkins
is run with "mvn hudson-dev:run")
*/
public
static
VersionNumber
getVersion
()
{
try
{
return
new
VersionNumber
(
VERSION
);
}
catch
(
NumberFormatException
e
)
{
try
{
// for non-released version of
Hudson
, this looks like "1.345 (private-foobar), so try to approximate.
// for non-released version of
Jenkins
, this looks like "1.345 (private-foobar), so try to approximate.
int
idx
=
VERSION
.
indexOf
(
' '
);
if
(
idx
>
0
)
return
new
VersionNumber
(
VERSION
.
substring
(
0
,
idx
));
...
...
@@ -4153,7 +4152,7 @@ public class Jenkins extends AbstractCIBase implements DirectlyModifiableTopLeve
/**
* Prefix to resources alongside view scripts.
* Strings like "/resources/VERSION", which avoids
Hudson
to pick up
* Strings like "/resources/VERSION", which avoids
Jenkins
to pick up
* stale cache when the user upgrades to a different version.
* <p>
* Value computed in {@link WebAppMain}.
...
...
core/src/main/java/jenkins/security/NonSerializableSecurityContext.java
浏览文件 @
4398c980
...
...
@@ -28,7 +28,7 @@ import javax.servlet.http.HttpSession;
* {@link Authentication} often contains {@link UserDetails} implemented by a plugin,
* but when it's persisted as a part of {@link HttpSession}, such instance will never
* de-serialize correctly because the container isn't aware of additional classloading
* in
Hudson
.
* in
Jenkins
.
*
* <p>
* Jenkins doesn't work with a clustering anyway, and so it's better to just not persist
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录