本文整理了Java中hudson.model.Run.hasntStartedYet
方法的一些代码示例,展示了Run.hasntStartedYet
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Run.hasntStartedYet
方法的具体详情如下:
包路径:hudson.model.Run
类名称:Run
方法名:hasntStartedYet
[英]Returns true if the build is still queued and hasn't started yet.
[中]如果生成仍在排队且尚未启动,则返回true。
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the string that says how long the build took to run.
*/
public @Nonnull String getDurationString() {
if (hasntStartedYet()) {
return Messages.Run_NotStartedYet();
} else if (isBuilding()) {
return Messages.Run_InProgressDuration(
Util.getTimeSpanString(System.currentTimeMillis()-startTime));
}
return Util.getTimeSpanString(duration);
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Used as the color of the status ball for the project.
*/
@Exported(visibility = 2, name = "color")
public BallColor getIconColor() {
RunT lastBuild = getLastBuild();
while (lastBuild != null && lastBuild.hasntStartedYet())
lastBuild = lastBuild.getPreviousBuild();
if (lastBuild != null)
return lastBuild.getIconColor();
else
return BallColor.NOTBUILT;
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
public boolean superHasntStartedYet() {
return super.hasntStartedYet();
}
代码示例来源:origin: io.fabric8.jenkins.plugins/openshift-sync
private String runToBuildPhase(Run run) {
if (run != null && !run.hasntStartedYet()) {
if (run.isBuilding()) {
return BuildPhases.RUNNING;
} else {
Result result = run.getResult();
if (result != null) {
if (result.equals(Result.SUCCESS)) {
return BuildPhases.COMPLETE;
} else if (result.equals(Result.ABORTED)) {
return BuildPhases.CANCELLED;
} else if (result.equals(Result.FAILURE)) {
return BuildPhases.FAILED;
} else if (result.equals(Result.UNSTABLE)) {
return BuildPhases.FAILED;
} else {
return BuildPhases.PENDING;
}
}
}
}
return BuildPhases.NEW;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the string that says how long the build took to run.
*/
public @Nonnull String getDurationString() {
if (hasntStartedYet()) {
return Messages.Run_NotStartedYet();
} else if (isBuilding()) {
return Messages.Run_InProgressDuration(
Util.getTimeSpanString(System.currentTimeMillis()-startTime));
}
return Util.getTimeSpanString(duration);
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
public boolean hasntStartedYet() {
initPython();
if (pexec.isImplemented(25)) {
return pexec.execPythonBool("hasnt_started_yet");
} else {
return super.hasntStartedYet();
}
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Used as the color of the status ball for the project.
*/
@Exported(visibility = 2, name = "color")
public BallColor getIconColor() {
RunT lastBuild = getLastBuild();
while (lastBuild != null && lastBuild.hasntStartedYet())
lastBuild = lastBuild.getPreviousBuild();
if (lastBuild != null)
return lastBuild.getIconColor();
else
return BallColor.GREY;
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Used as the color of the status ball for the project.
*/
@Exported(visibility = 2, name = "color")
public BallColor getIconColor() {
RunT lastBuild = getLastBuild();
while (lastBuild != null && lastBuild.hasntStartedYet())
lastBuild = lastBuild.getPreviousBuild();
if (lastBuild != null)
return lastBuild.getIconColor();
else
return BallColor.NOTBUILT;
}
代码示例来源:origin: hudson/hudson-2.x
/**
* Used as the color of the status ball for the project.
*/
@Exported(visibility = 2, name = "color")
public BallColor getIconColor() {
RunT lastBuild = getLastBuild();
while (lastBuild != null && lastBuild.hasntStartedYet())
lastBuild = lastBuild.getPreviousBuild();
if (lastBuild != null)
return lastBuild.getIconColor();
else
return BallColor.GREY;
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Used as the color of the status ball for the project.
*/
@Exported(visibility = 2, name = "color")
public BallColor getIconColor() {
RunT lastBuild = getLastBuild();
while (lastBuild != null && lastBuild.hasntStartedYet()) {
lastBuild = lastBuild.getPreviousBuild();
}
if (lastBuild != null) {
return lastBuild.getIconColor();
} else {
return BallColor.GREY;
}
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Used as the color of the status ball for the project.
*/
@Exported(visibility = 2, name = "color")
public BallColor getIconColor() {
RunT lastBuild = getLastBuild();
while (lastBuild != null && lastBuild.hasntStartedYet()) {
lastBuild = lastBuild.getPreviousBuild();
}
if (lastBuild != null) {
return lastBuild.getIconColor();
} else {
return BallColor.GREY;
}
}
代码示例来源:origin: org.jenkins-ci.plugins/sectioned-view
public static Result getResult(Job job) {
Run lastBuild = job.getLastBuild();
while (lastBuild != null
&& (lastBuild.hasntStartedYet() || lastBuild.isBuilding() || lastBuild
.isLogUpdated())) {
lastBuild = lastBuild.getPreviousBuild();
}
if (lastBuild != null) {
return lastBuild.getResult();
} else {
return Result.NOT_BUILT;
}
}
代码示例来源:origin: org.hudsonci.plugins/claim
public RunList getBuilds() {
List<Run> lastBuilds = new ArrayList<Run>();
for (TopLevelItem item : getOwner().getItems()) {
if (item instanceof Job) {
Job job = (Job) item;
Run lb = job.getLastBuild();
while (lb != null && (lb.hasntStartedYet() || lb.isBuilding()))
lb = lb.getPreviousBuild();
if (lb != null && lb.getAction(ClaimBuildAction.class) != null) {
lastBuilds.add(lb);
}
}
}
return RunList.fromRuns(lastBuilds).failureOnly();
}
代码示例来源:origin: jenkinsci/gerrit-trigger-plugin
if (!build.hasntStartedYet() && !build.isBuilding()) {
try {
build.save();
代码示例来源:origin: jenkinsci/gerrit-trigger-plugin
if (!r.hasntStartedYet() && !r.isBuilding()) {
try {
r.save();
代码示例来源:origin: jenkinsci/ghprb-plugin
RunList<?> runs = project.getBuilds();
for (Run<?, ?> run : runs) {
if (!run.isBuilding() && !run.hasntStartedYet()) {
break;
内容来源于网络,如有侵权,请联系作者删除!