Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
LinuxSuRen
jenkins
提交
83a8d549
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,发现更多精彩内容 >>
提交
83a8d549
编写于
10月 02, 2015
作者:
T
tfennelly
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Noisy warning if restart is required
上级
433d4375
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
51 addition
and
2 deletion
+51
-2
core/src/main/java/hudson/PluginManager.java
core/src/main/java/hudson/PluginManager.java
+31
-1
core/src/main/resources/hudson/PluginManager/installed.jelly
core/src/main/resources/hudson/PluginManager/installed.jelly
+5
-0
core/src/main/resources/hudson/PluginManager/installed.properties
.../main/resources/hudson/PluginManager/installed.properties
+2
-1
war/src/main/webapp/css/style.css
war/src/main/webapp/css/style.css
+13
-0
未找到文件。
core/src/main/java/hudson/PluginManager.java
浏览文件 @
83a8d549
...
...
@@ -119,6 +119,8 @@ import org.xml.sax.helpers.DefaultHandler;
import
static
hudson
.
init
.
InitMilestone
.*;
import
hudson.model.DownloadService
;
import
hudson.util.FormValidation
;
import
static
java
.
util
.
logging
.
Level
.
SEVERE
;
import
static
java
.
util
.
logging
.
Level
.
WARNING
;
import
org.kohsuke.accmod.Restricted
;
import
org.kohsuke.accmod.restrictions.NoExternalUse
;
...
...
@@ -803,6 +805,7 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
*/
public
void
doInstall
(
StaplerRequest
req
,
StaplerResponse
rsp
)
throws
IOException
,
ServletException
{
boolean
dynamicLoad
=
req
.
getParameter
(
"dynamicLoad"
)!=
null
;
final
List
<
Future
<
UpdateCenter
.
UpdateCenterJob
>>
deployJobs
=
new
ArrayList
<>();
Enumeration
<
String
>
en
=
req
.
getParameterNames
();
while
(
en
.
hasMoreElements
())
{
...
...
@@ -835,9 +838,36 @@ public abstract class PluginManager extends AbstractModelObject implements OnMas
if
(
p
==
null
)
{
throw
new
Failure
(
"No such plugin: "
+
n
);
}
p
.
deploy
(
dynamicLoad
);
deployJobs
.
add
(
p
.
deploy
(
dynamicLoad
));
}
}
// Fire a one-off thread to wait for the plugins to be deployed and then
// refresh the dependant plugins list.
new
Thread
()
{
@Override
public
void
run
()
{
INSTALLING:
while
(
true
)
{
for
(
Future
<
UpdateCenter
.
UpdateCenterJob
>
deployJob
:
deployJobs
)
{
try
{
Thread
.
sleep
(
500
);
}
catch
(
InterruptedException
e
)
{
LOGGER
.
log
(
SEVERE
,
"Unexpected error while waiting for some plugins to install. Plugin Manager state may be invalid. Please restart Jenkins ASAP."
,
e
);
}
if
(!
deployJob
.
isCancelled
()
&&
!
deployJob
.
isDone
())
{
// One of the plugins is not installing/canceled, so
// go back to sleep and try again in a while.
continue
INSTALLING
;
}
}
// All the plugins are installed. It's now safe to refresh.
resolveDependantPlugins
();
break
;
}
}
}.
start
();
rsp
.
sendRedirect
(
"../updateCenter/"
);
}
...
...
core/src/main/resources/hudson/PluginManager/installed.jelly
浏览文件 @
83a8d549
...
...
@@ -35,6 +35,11 @@ THE SOFTWARE.
${%Filter}:
<input type="text" id="filter-box"/>
</div>
<j:if test="${app.updateCenter.isRestartRequiredForCompletion()}">
<div class="alert alert-warning"><strong>${%Warning}</strong>: ${%requires.restart}</div>
</j:if>
<local:tabBar page="installed" xmlns:local="/hudson/PluginManager" />
<div class="pane-frame">
...
...
core/src/main/resources/hudson/PluginManager/installed.properties
浏览文件 @
83a8d549
...
...
@@ -20,4 +20,5 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
wiki.url
=
http://wiki.jenkins-ci.org/display/JENKINS/Pinned+Plugins
downgradeTo
=
Downgrade to {0}
\ No newline at end of file
downgradeTo
=
Downgrade to {0}
requires.restart
=
This Jenkins instance requires a restart. Changing the state of plugins at this time is strongly discouraged. Restart Jenkins before proceeding.
\ No newline at end of file
war/src/main/webapp/css/style.css
浏览文件 @
83a8d549
...
...
@@ -1773,4 +1773,17 @@ table#legend-table td {
.i18n
{
display
:
none
;
}
.alert
{
padding
:
15px
;
margin-bottom
:
20px
;
border
:
1px
solid
transparent
;
border-radius
:
4px
;
}
.alert-warning
{
color
:
#8a6d3b
;
background-color
:
#fcf8e3
;
border-color
:
#faebcc
;
}
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录