@SuppressWarnings("deprecation") public List<Action> getPersistentActions(){ return super.getActions(); }
/** * 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; }
@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; }
for (FingerprintAction action : build.getActions(FingerprintAction.class)) { for (AbstractProject key : action.getDependencies().keySet()) { if (key == owner) {
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; }
} else if (lastBuild != null) { for (HealthReportingAction healthReportingAction : lastBuild .getActions(HealthReportingAction.class)) { final HealthReport report = healthReportingAction .getBuildHealth();
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; }
for (EnvironmentContributingAction a : getActions(EnvironmentContributingAction.class)) { a.buildEnvironment(this, env);
final List<BuildData> buildDatas = build.getActions(BuildData.class); if (CollectionUtils.isEmpty(buildDatas)) { LOGGER.log(Level.INFO, "Build does not contain build data.");
/** * 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(); }
@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); }
/** * 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(); }
/** * 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(); } } }
/** * 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; }
@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); } }
@Override @Exported public List<Action> getActions() { initPython(); if (pexec.isImplemented(86)) { return (List) pexec.execPython("get_actions"); } else { return super.getActions(); } }
@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; }
@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; }
@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; }
@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; }