Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xxadev
jenkins
提交
56a44530
J
jenkins
项目概览
xxadev
/
jenkins
与 Fork 源项目一致
从无法访问的项目Fork
通知
3
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,发现更多精彩内容 >>
提交
56a44530
编写于
5月 05, 2015
作者:
L
liorha
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://github.com/jenkinsci/jenkins
上级
cf59d93b
7ccc4acc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
48 addition
and
6 deletion
+48
-6
changelog.html
changelog.html
+6
-1
core/src/main/java/hudson/model/Run.java
core/src/main/java/hudson/model/Run.java
+3
-0
core/src/main/java/hudson/tasks/Maven.java
core/src/main/java/hudson/tasks/Maven.java
+12
-4
core/src/test/java/hudson/model/RunTest.java
core/src/test/java/hudson/model/RunTest.java
+26
-0
war/pom.xml
war/pom.xml
+1
-1
未找到文件。
changelog.html
浏览文件 @
56a44530
...
...
@@ -55,7 +55,12 @@ Upcoming changes</a>
<!-- Record your changes in the trunk here. -->
<div
id=
"trunk"
style=
"display:none"
>
<!--=TRUNK-BEGIN=-->
<ul
class=
image
>
<li
class=
>
<li
class=
bug
>
Update bundled LDAP plugin in order to restore missing help files
(
<a
href=
"https://github.com/jenkinsci/jenkins/pull/1682"
>
PR 1682
</a>
)
<li
class=
bug
>
hudson.model.Run.getLog() throws IndexOutOfBoundsException when called with maxLines=0
(
<a
href=
"https://issues.jenkins-ci.org/browse/JENKINS-27441"
>
issue 27441
</code>
)
</ul>
</div>
<!--=TRUNK-END=-->
<h3><a
name=
v1.612
>
What's new in 1.612
</a>
(2015/05/03)
</h3>
...
...
core/src/main/java/hudson/model/Run.java
浏览文件 @
56a44530
...
...
@@ -1933,6 +1933,9 @@ public abstract class Run <JobT extends Job<JobT,RunT>,RunT extends Run<JobT,Run
public
@Nonnull
List
<
String
>
getLog
(
int
maxLines
)
throws
IOException
{
int
lineCount
=
0
;
List
<
String
>
logLines
=
new
LinkedList
<
String
>();
if
(
maxLines
==
0
)
{
return
logLines
;
}
BufferedReader
reader
=
new
BufferedReader
(
new
InputStreamReader
(
new
FileInputStream
(
getLogFile
()),
getCharset
()));
try
{
for
(
String
line
=
reader
.
readLine
();
line
!=
null
;
line
=
reader
.
readLine
())
{
...
...
core/src/main/java/hudson/tasks/Maven.java
浏览文件 @
56a44530
...
...
@@ -585,12 +585,20 @@ public class Maven extends Builder {
}
private
File
getExeFile
(
String
execName
)
{
if
(
File
.
separatorChar
==
'\\'
)
execName
+=
".bat"
;
String
m2Home
=
Util
.
replaceMacro
(
getHome
(),
EnvVars
.
masterEnvVars
);
return
new
File
(
m2Home
,
"bin/"
+
execName
);
if
(
Functions
.
isWindows
())
{
File
exeFile
=
new
File
(
m2Home
,
"bin/"
+
execName
+
".bat"
);
// since Maven 3.3 .bat files are replaced with .cmd
if
(!
exeFile
.
exists
())
{
return
new
File
(
m2Home
,
"bin/"
+
execName
+
".cmd"
);
}
return
exeFile
;
}
else
{
return
new
File
(
m2Home
,
"bin/"
+
execName
);
}
}
/**
...
...
core/src/test/java/hudson/model/RunTest.java
浏览文件 @
56a44530
...
...
@@ -25,6 +25,9 @@
package
hudson.model
;
import
java.io.IOException
;
import
hudson.model.Run.Artifact
;
import
java.io.File
;
import
java.io.PrintWriter
;
import
java.util.List
;
import
java.util.TimeZone
;
import
java.util.concurrent.Callable
;
...
...
@@ -32,11 +35,17 @@ import java.util.concurrent.ExecutorService;
import
java.util.concurrent.Executors
;
import
static
org
.
junit
.
Assert
.*;
import
org.junit.Rule
;
import
org.junit.Test
;
import
org.junit.rules.TemporaryFolder
;
import
org.jvnet.hudson.test.Issue
;
import
org.mockito.Mockito
;
public
class
RunTest
{
@Rule
public
TemporaryFolder
tmp
=
new
TemporaryFolder
();
@Issue
(
"JENKINS-15816"
)
@SuppressWarnings
({
"unchecked"
,
"rawtypes"
})
@Test
public
void
timezoneOfID
()
throws
Exception
{
...
...
@@ -128,4 +137,21 @@ public class RunTest {
msg
=
r
.
getDurationString
();
assertFalse
(
msg
,
msg
.
endsWith
(
" and counting"
));
}
@Issue
(
"JENKINS-27441"
)
@Test
public
void
getLogReturnsAnEmptyListWhenCalledWith0
()
throws
Exception
{
Job
j
=
Mockito
.
mock
(
Job
.
class
);
File
tempBuildDir
=
tmp
.
newFolder
();
Mockito
.
when
(
j
.
getBuildDir
()).
thenReturn
(
tempBuildDir
);
Run
r
=
new
Run
(
j
,
0
)
{};
File
f
=
r
.
getLogFile
();
f
.
getParentFile
().
mkdirs
();
PrintWriter
w
=
new
PrintWriter
(
f
,
"utf-8"
);
w
.
println
(
"dummy"
);
w
.
close
();
List
<
String
>
logLines
=
r
.
getLog
(
0
);
assertTrue
(
logLines
.
isEmpty
());
}
}
war/pom.xml
浏览文件 @
56a44530
...
...
@@ -322,7 +322,7 @@ THE SOFTWARE.
<artifactItem>
<groupId>
org.jenkins-ci.plugins
</groupId>
<artifactId>
ldap
</artifactId>
<version>
1.
6
</version>
<version>
1.
11
</version>
<type>
hpi
</type>
</artifactItem>
<artifactItem>
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录