Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
FIY695
jenkins
提交
04681f6b
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,发现更多精彩内容 >>
提交
04681f6b
编写于
4月 14, 2014
作者:
J
Jesse Glick
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Extracting some miscellaneous usages from core/src.
(cherry picked from commit
04aace98
)
上级
a236b343
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
8 addition
and
87 deletion
+8
-87
core/src/main/java/hudson/FileSystemProvisioner.java
core/src/main/java/hudson/FileSystemProvisioner.java
+1
-3
core/src/main/java/hudson/model/AbstractBuild.java
core/src/main/java/hudson/model/AbstractBuild.java
+1
-2
core/src/main/java/hudson/model/TopLevelItem.java
core/src/main/java/hudson/model/TopLevelItem.java
+1
-2
core/src/main/java/jenkins/scm/SCMCheckoutStrategy.java
core/src/main/java/jenkins/scm/SCMCheckoutStrategy.java
+3
-5
core/src/test/java/hudson/cli/ListJobsCommandTest.java
core/src/test/java/hudson/cli/ListJobsCommandTest.java
+2
-14
core/src/test/java/hudson/util/XStream2Test.java
core/src/test/java/hudson/util/XStream2Test.java
+0
-22
core/src/test/resources/hudson/util/runMatrix.xml
core/src/test/resources/hudson/util/runMatrix.xml
+0
-39
未找到文件。
core/src/main/java/hudson/FileSystemProvisioner.java
浏览文件 @
04681f6b
...
...
@@ -24,14 +24,12 @@
package
hudson
;
import
hudson.FilePath.TarCompression
;
import
hudson.matrix.MatrixBuild
;
import
hudson.model.AbstractBuild
;
import
hudson.model.AbstractProject
;
import
hudson.model.Computer
;
import
hudson.model.Describable
;
import
hudson.model.Job
;
import
hudson.model.TaskListener
;
import
hudson.util.DirScanner.Glob
;
import
hudson.util.io.ArchiverFactory
;
import
jenkins.model.Jenkins
;
import
hudson.model.listeners.RunListener
;
...
...
@@ -158,7 +156,7 @@ public abstract class FileSystemProvisioner implements ExtensionPoint, Describab
* <p>
* The state of the build when this method is invoked depends on
* the project type. Most would call this at the end of the build,
* but for example {@
link
MatrixBuild} would call this after
* but for example {@
code
MatrixBuild} would call this after
* SCM check out so that the state of the fresh workspace
* can be then propagated to elsewhere.
*
...
...
core/src/main/java/hudson/model/AbstractBuild.java
浏览文件 @
04681f6b
...
...
@@ -33,7 +33,6 @@ import hudson.Launcher;
import
hudson.console.AnnotatedLargeText
;
import
hudson.console.ExpandableDetailsNote
;
import
hudson.console.ModelHyperlinkNote
;
import
hudson.matrix.MatrixConfiguration
;
import
hudson.model.Fingerprint.BuildPtr
;
import
hudson.model.Fingerprint.RangeSet
;
import
hudson.model.labels.LabelAtom
;
...
...
@@ -1014,7 +1013,7 @@ public abstract class AbstractBuild<P extends AbstractProject<P,R>,R extends Abs
* Provides additional variables and their values to {@link Builder}s.
*
* <p>
* This mechanism is used by {@
link
MatrixConfiguration} to pass
* This mechanism is used by {@
code
MatrixConfiguration} to pass
* the configuration values to the current build. It is up to
* {@link Builder}s to decide whether they want to recognize the values
* or how to use them.
...
...
core/src/main/java/hudson/model/TopLevelItem.java
浏览文件 @
04681f6b
...
...
@@ -25,12 +25,11 @@ package hudson.model;
import
hudson.Extension
;
import
hudson.ExtensionPoint
;
import
hudson.matrix.MatrixConfiguration
;
/**
* {@link Item} that can be directly displayed under {@link jenkins.model.Jenkins} or other containers.
* (A "container" would be any {@link ItemGroup}{@code <TopLevelItem>}, such as a folder of projects.)
* Ones that don't need to be under specific parent (say, unlike {@
link
MatrixConfiguration}),
* Ones that don't need to be under specific parent (say, unlike {@
code
MatrixConfiguration}),
* and thus can be freely moved, copied, etc.
*
* <p>
...
...
core/src/main/java/jenkins/scm/SCMCheckoutStrategy.java
浏览文件 @
04681f6b
...
...
@@ -2,8 +2,6 @@ package jenkins.scm;
import
hudson.ExtensionPoint
;
import
hudson.Launcher
;
import
hudson.matrix.MatrixBuild
;
import
hudson.matrix.MatrixRun
;
import
hudson.model.AbstractBuild
;
import
hudson.model.AbstractBuild.AbstractBuildExecution
;
import
hudson.model.AbstractDescribableImpl
;
...
...
@@ -25,9 +23,9 @@ import java.io.IOException;
* is to control the check out behaviour in matrix projects. The intended use cases include situations like:
*
* <ul>
* <li>Check out will only happen once in {@
link
MatrixBuild}, and its state will be then sent
* to {@
link
MatrixRun}s by other means such as rsync.
* <li>{@
link MatrixBuild} does no check out of its own, and check out is only done on {@link
MatrixRun}s
* <li>Check out will only happen once in {@
code
MatrixBuild}, and its state will be then sent
* to {@
code
MatrixRun}s by other means such as rsync.
* <li>{@
code MatrixBuild} does no check out of its own, and check out is only done on {@code
MatrixRun}s
* </ul>
*
* <h2>Hook Semantics</h2>
...
...
core/src/test/java/hudson/cli/ListJobsCommandTest.java
浏览文件 @
04681f6b
...
...
@@ -3,34 +3,23 @@ package hudson.cli;
import
static
org
.
hamcrest
.
CoreMatchers
.
equalTo
;
import
static
org
.
hamcrest
.
CoreMatchers
.
is
;
import
static
org
.
hamcrest
.
CoreMatchers
.
containsString
;
import
static
org
.
hamcrest
.
CoreMatchers
.
not
;
import
static
org
.
hamcrest
.
MatcherAssert
.
assertThat
;
import
static
org
.
powermock
.
api
.
mockito
.
PowerMockito
.
mock
;
import
static
org
.
powermock
.
api
.
mockito
.
PowerMockito
.
mockStatic
;
import
static
org
.
powermock
.
api
.
mockito
.
PowerMockito
.
when
;
import
hudson.matrix.MatrixConfiguration
;
import
hudson.matrix.MatrixProject
;
import
hudson.model.AbstractProject
;
import
hudson.model.Item
;
import
hudson.model.ItemGroup
;
import
hudson.model.TopLevelItem
;
import
hudson.model.TopLevelItemDescriptor
;
import
hudson.model.ViewGroup
;
import
hudson.model.ViewTest.CompositeView
;
import
hudson.model.View
;
import
java.io.ByteArrayOutputStream
;
import
java.io.File
;
import
java.io.IOException
;
import
java.io.InputStream
;
import
java.io.PrintStream
;
import
java.util.Arrays
;
import
java.util.Collection
;
import
java.util.HashSet
;
import
java.util.List
;
import
javax.annotation.CheckForNull
;
import
javax.servlet.ServletException
;
import
jenkins.model.Jenkins
;
import
jenkins.model.ModifiableTopLevelItemGroup
;
...
...
@@ -40,9 +29,6 @@ import org.hamcrest.TypeSafeMatcher;
import
org.junit.Before
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.jvnet.hudson.test.Bug
;
import
org.kohsuke.stapler.StaplerRequest
;
import
org.kohsuke.stapler.StaplerResponse
;
import
org.mockito.Mockito
;
import
org.powermock.core.classloader.annotations.PrepareForTest
;
import
org.powermock.core.classloader.annotations.SuppressStaticInitializationFor
;
...
...
@@ -80,6 +66,7 @@ public class ListJobsCommandTest {
assertThat
(
stderr
.
toString
(),
containsString
(
"No view or item group with the given name found"
));
}
/*
@Test
@Bug(18393)
public void failForMatrixProject() throws Exception {
...
...
@@ -95,6 +82,7 @@ public class ListJobsCommandTest {
assertThat(stdout, is(empty()));
assertThat(stderr.toString(), containsString("No view or item group with the given name found"));
}
*/
@Test
public
void
getAllJobsFromFolders
()
throws
Exception
{
...
...
core/src/test/java/hudson/util/XStream2Test.java
浏览文件 @
04681f6b
...
...
@@ -27,18 +27,14 @@ import com.google.common.collect.ImmutableList;
import
com.google.common.collect.ImmutableMap
;
import
com.thoughtworks.xstream.XStreamException
;
import
hudson.XmlFile
;
import
hudson.matrix.MatrixRun
;
import
hudson.model.Result
;
import
hudson.model.Run
;
import
java.io.File
;
import
java.io.InputStream
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.ConcurrentHashMap
;
import
java.util.logging.Level
;
import
java.util.logging.Logger
;
import
jenkins.model.CauseOfInterruption
;
import
jenkins.model.InterruptedBuildAction
;
import
junit.framework.TestCase
;
import
org.apache.commons.io.FileUtils
;
import
org.jvnet.hudson.test.Bug
;
...
...
@@ -261,24 +257,6 @@ public class XStream2Test extends TestCase {
public
int
x
,
y
;
}
/**
* Unmarshall a matrix build.xml result.
*/
@Bug
(
10903
)
public
void
testUnMarshalRunMatrix
()
{
InputStream
is
=
XStream2Test
.
class
.
getResourceAsStream
(
"runMatrix.xml"
);
MatrixRun
result
=
(
MatrixRun
)
Run
.
XSTREAM
.
fromXML
(
is
);
assertNotNull
(
result
);
assertNotNull
(
result
.
getPersistentActions
());
assertEquals
(
2
,
result
.
getPersistentActions
().
size
());
InterruptedBuildAction
action
=
(
InterruptedBuildAction
)
result
.
getPersistentActions
().
get
(
1
);
assertNotNull
(
action
.
getCauses
());
assertEquals
(
1
,
action
.
getCauses
().
size
());
CauseOfInterruption
.
UserInterruption
cause
=
(
CauseOfInterruption
.
UserInterruption
)
action
.
getCauses
().
get
(
0
);
assertNotNull
(
cause
);
}
public
static
class
Foo2
{
ConcurrentHashMap
<
String
,
String
>
m
=
new
ConcurrentHashMap
<
String
,
String
>();
}
...
...
core/src/test/resources/hudson/util/runMatrix.xml
已删除
100644 → 0
浏览文件 @
a236b343
<?xml version='1.0' encoding='UTF-8'?>
<matrix-run>
<actions>
<hudson.model.CauseAction>
<causes>
<hudson.model.Cause_-UpstreamCause>
<upstreamProject>
MatrixProject
</upstreamProject>
<upstreamUrl>
job/MatrixProject/
</upstreamUrl>
<upstreamBuild>
8
</upstreamBuild>
<upstreamCauses>
<hudson.model.Cause_-UserCause>
<authenticationName>
auser
</authenticationName>
</hudson.model.Cause_-UserCause>
</upstreamCauses>
</hudson.model.Cause_-UpstreamCause>
</causes>
</hudson.model.CauseAction>
<jenkins.model.InterruptedBuildAction>
<causes
class=
"com.google.common.collect.SingletonImmutableList"
resolves-to=
"com.google.common.collect.ImmutableList$SerializedForm"
>
<elements>
<jenkins.model.CauseOfInterruption_-UserInterruption>
<user>
auser
</user>
</jenkins.model.CauseOfInterruption_-UserInterruption>
</elements>
</causes>
</jenkins.model.InterruptedBuildAction>
</actions>
<number>
8
</number>
<result>
ABORTED
</result>
<duration>
3253844
</duration>
<charset>
windows-1252
</charset>
<keepLog>
false
</keepLog>
<builtOn>
amachine
</builtOn>
<workspace>
C:\jenkins\slave\workspace\MatrixProject\blah\blah\blah
</workspace>
<hudsonVersion>
1.427
</hudsonVersion>
<culprits>
<string>
auser
</string>
</culprits>
</matrix-run>
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录