提交 c13c7f94 编写于 作者: A abayer

[FIXED HUDSON-4423] Properly setting blockBuildWhenUpstreamBuilding now

git-svn-id: https://hudson.dev.java.net/svn/hudson/trunk/hudson/main@21550 71c3de6d-444a-0410-be80-ed276b4c234a
上级 f7e9b4fb
......@@ -424,6 +424,11 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
return blockBuildWhenUpstreamBuilding;
}
public void setBlockBuildWhenUpstreamBuilding(boolean b) throws IOException {
blockBuildWhenUpstreamBuilding = b;
save();
}
public boolean isDisabled() {
return disabled;
}
......@@ -846,7 +851,7 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
*/
public boolean isBuildBlocked() {
boolean blocked = isBuilding() && !isConcurrentBuild();
if (!blocked && blockBuildWhenUpstreamBuilding) {
if (!blocked && blockBuildWhenUpstreamBuilding()) {
AbstractProject bup = getBuildingUpstream();
if(bup!=null) {
return true;
......@@ -1339,7 +1344,8 @@ public abstract class AbstractProject<P extends AbstractProject<P,R>,R extends A
} else {
scmCheckoutRetryCount = null;
}
setBlockBuildWhenUpstreamBuilding(req.getParameter("blockBuildWhenUpstreamBuilding")!=null);
if(req.getParameter("hasSlaveAffinity")!=null) {
canRoam = false;
assignedNode = req.getParameter("slave");
......
......@@ -24,6 +24,8 @@ THE SOFTWARE.
<!-- Block build when upstream dependency is building -->
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form">
<f:optionalBlock name="blockBuildWhenUpstreamBuilding" title="${%Block build when upstream project is building}" help="/help/project-config/block-upstream-building.html"
<f:optionalBlock name="blockBuildWhenUpstreamBuilding"
title="${%Block build when upstream project is building}"
help="/help/project-config/block-upstream-building.html"
checked="${it.blockBuildWhenUpstreamBuilding()}" />
</j:jelly>
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册