本文整理了Java中hudson.model.Run.getActions
方法的一些代码示例,展示了Run.getActions
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Run.getActions
方法的具体详情如下:
包路径:hudson.model.Run
类名称:Run
方法名:getActions
暂无
代码示例来源:origin: jenkinsci/jenkins
@SuppressWarnings("deprecation")
public List<Action> getPersistentActions(){
return super.getActions();
}
代码示例来源:origin: jenkinsci/jenkins
/**
* Gets the subset of {@link #getActions()} that consists of {@link BuildBadgeAction}s.
*/
public @Nonnull List<BuildBadgeAction> getBadgeActions() {
List<BuildBadgeAction> r = getActions(BuildBadgeAction.class);
if(isKeepLog()) {
r = new ArrayList<>(r);
r.add(new KeepLogBuildBadge());
}
return r;
}
代码示例来源:origin: jenkinsci/jenkins
@Nonnull
@Override
public Collection<? extends Action> createFor(@Nonnull Job j) {
List<Action> actions = new LinkedList<>();
Run r = j.getLastSuccessfulBuild();
if (r != null) {
for (LastBuildAction a : r.getActions(LastBuildAction.class)) {
actions.addAll(a.getProjectActions());
}
}
// TODO should there be an option to check lastCompletedBuild even if it failed?
// Not useful for, say, TestResultAction, since if you have a build that fails before recording test
// results, the job would then have no TestResultProjectAction.
return actions;
}
代码示例来源:origin: jenkinsci/jenkins
for (FingerprintAction action : build.getActions(FingerprintAction.class)) {
for (AbstractProject key : action.getDependencies().keySet()) {
if (key == owner) {
代码示例来源:origin: jenkinsci/gitlab-plugin
public static Run<?, ?> getBuildBySHA1IncludingMergeBuilds(Job<?, ?> project, String sha1) {
for (Run<?, ?> build : project.getBuilds()) {
for(BuildData data : build.getActions(BuildData.class)) {
if (data != null
&& data.lastBuild != null
&& data.lastBuild.getMarked() != null
&& data.lastBuild.getMarked().getSha1String().equals(sha1)) {
return build;
}
}
}
return null;
}
代码示例来源:origin: jenkinsci/jenkins
} else if (lastBuild != null) {
for (HealthReportingAction healthReportingAction : lastBuild
.getActions(HealthReportingAction.class)) {
final HealthReport report = healthReportingAction
.getBuildHealth();
代码示例来源:origin: jenkinsci/gitlab-plugin
public static Run<?, ?> getBuildBySHA1WithoutMergeBuilds(Job<?, ?> project, String sha1) {
for (Run<?, ?> build : project.getBuilds()) {
MergeRecord merge = build.getAction(MergeRecord.class);
for(BuildData data : build.getActions(BuildData.class)) {
if (hasLastBuild(data) && isNoMergeBuild(data, merge) && data.lastBuild.isFor(sha1)) {
return build;
}
}
}
return null;
}
代码示例来源:origin: jenkinsci/jenkins
for (EnvironmentContributingAction a : getActions(EnvironmentContributingAction.class)) {
a.buildEnvironment(this, env);
代码示例来源:origin: jenkinsci/gitlab-plugin
final List<BuildData> buildDatas = build.getActions(BuildData.class);
if (CollectionUtils.isEmpty(buildDatas)) {
LOGGER.log(Level.INFO, "Build does not contain build data.");
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
/**
* Called after the build is loaded and the object is added to the build list.
*/
protected void onLoad() {
for (Action a : getActions())
if (a instanceof RunAction)
((RunAction) a).onLoad();
}
代码示例来源:origin: org.jenkins-ci.plugins/s3
@SuppressWarnings("unused")
public S3ArtifactsAction getLatestDeployedArtifacts() {
Run latestSuccessfulBuild = getLastSuccessfulBuild();
if (latestSuccessfulBuild == null) {
return null;
}
List<S3ArtifactsAction> actions = latestSuccessfulBuild.getActions(S3ArtifactsAction.class);
if (actions == null || actions.size() == 0) {
return null;
}
return actions.get(actions.size() - 1);
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
/**
* Called after the build is loaded and the object is added to the build list.
*/
protected void onLoad() {
for (Action a : getActions())
if (a instanceof RunAction)
((RunAction) a).onLoad();
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
/**
* Called after the build is loaded and the object is added to the build
* list.
*/
protected void onLoad() {
for (Action a : getActions()) {
if (a instanceof RunAction) {
((RunAction) a).onLoad();
}
}
}
代码示例来源:origin: org.jenkins-ci.main/jenkins-core
/**
* Gets the subset of {@link #getActions()} that consists of {@link BuildBadgeAction}s.
*/
public @Nonnull List<BuildBadgeAction> getBadgeActions() {
List<BuildBadgeAction> r = getActions(BuildBadgeAction.class);
if(isKeepLog()) {
r = new ArrayList<>(r);
r.add(new KeepLogBuildBadge());
}
return r;
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
public <T extends Action> List<T> getActions(Class<T> type) {
initPython();
if (pexec.isImplemented(87)) {
return (List) pexec.execPython("get_actions", type);
} else {
return super.getActions(type);
}
}
代码示例来源:origin: org.jenkins-ci.plugins/python-wrapper
@Override
@Exported
public List<Action> getActions() {
initPython();
if (pexec.isImplemented(86)) {
return (List) pexec.execPython("get_actions");
} else {
return super.getActions();
}
}
代码示例来源:origin: org.eclipse.hudson/hudson-core
@Override
protected SearchIndexBuilder makeSearchIndex() {
SearchIndexBuilder builder = super.makeSearchIndex()
.add("console")
.add("changes");
for (Action a : getActions()) {
if (a.getIconFileName() != null) {
builder.add(a.getUrlName());
}
}
return builder;
}
代码示例来源:origin: org.jvnet.hudson.main/hudson-core
@Override
protected SearchIndexBuilder makeSearchIndex() {
SearchIndexBuilder builder = super.makeSearchIndex()
.add("console")
.add("changes");
for (Action a : getActions()) {
if(a.getIconFileName()!=null)
builder.add(a.getUrlName());
}
return builder;
}
代码示例来源:origin: org.eclipse.hudson.main/hudson-core
@Override
protected SearchIndexBuilder makeSearchIndex() {
SearchIndexBuilder builder = super.makeSearchIndex()
.add("console")
.add("changes");
for (Action a : getActions()) {
if(a.getIconFileName()!=null)
builder.add(a.getUrlName());
}
return builder;
}
代码示例来源:origin: hudson/hudson-2.x
@Override
protected SearchIndexBuilder makeSearchIndex() {
SearchIndexBuilder builder = super.makeSearchIndex()
.add("console")
.add("changes");
for (Action a : getActions()) {
if(a.getIconFileName()!=null)
builder.add(a.getUrlName());
}
return builder;
}
内容来源于网络,如有侵权,请联系作者删除!