/** * Gets the read-only view of all the builds. * * @return never null. The first entry is the latest build. */ @Exported(name="allBuilds",visibility=-2) @WithBridgeMethods(List.class) public RunList<RunT> getBuilds() { return RunList.<RunT>fromRuns(_getRuns().values()); }
public void doRssLatest(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { final List<Run> lastBuilds = new ArrayList<>(); for (AbstractProject<?, ?> p : Jenkins.get().allItems(AbstractProject.class)) { for (AbstractBuild<?, ?> b = p.getLastBuild(); b != null; b = b.getPreviousBuild()) { if (relatedTo(b)) { lastBuilds.add(b); break; } } } // historically these have been reported sorted by project name, we switched to the lazy iteration // so we only have to sort the sublist of runs rather than the full list of irrelevant projects lastBuilds.sort((o1, o2) -> Items.BY_FULL_NAME.compare(o1.getParent(), o2.getParent())); rss(req, rsp, " latest build", RunList.fromRuns(lastBuilds), Run.FEED_ADAPTER_LATEST); }
/** * Gets the read-only view of all the builds. * * @return never null. The first entry is the latest build. */ @Exported public RunList<RunT> getBuilds() { ByteArrayOutputStream os = new ByteArrayOutputStream(); PrintStream ps = new PrintStream(os); new Exception("Stack trace").printStackTrace(ps); LOGGER.debug("Job.getBuilds() API should be avoided for performance reason. {}", os.toString()); return RunList.fromRuns(_getRuns().values()); }
/** * Gets the read-only view of all the builds. * * @return never null. The first entry is the latest build. */ @Exported public RunList<RunT> getBuilds() { return RunList.fromRuns(_getRuns().values()); }
public void doRssAll(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " all builds", RunList.fromRuns(getBuilds()), Run.FEED_ADAPTER); }
public void doRssAll(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " all builds", RunList.fromRuns(getBuilds()), Run.FEED_ADAPTER); }
public void doRssAll(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " all builds", RunList.fromRuns(getBuilds()), Run.FEED_ADAPTER); }
public void doRssAll(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " all builds", RunList.fromRuns(getBuilds()), Run.FEED_ADAPTER); }
/** * Gets the read-only view of all the builds. * * @return never null. The first entry is the latest build. */ @Exported(name="allBuilds",visibility=-2) @WithBridgeMethods(List.class) public RunList<RunT> getBuilds() { return RunList.<RunT>fromRuns(_getRuns().values()); }
public void doRssAll(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " all builds", RunList.fromRuns(getRecentReleases(20))); }
/** * Gets the read-only view of all the builds. * * @return never null. The first entry is the latest build. */ @Exported @WithBridgeMethods(List.class) public RunList<RunT> getBuilds() { return RunList.fromRuns(_getRuns().values()); }
/** * Gets the read-only view of all the builds. * * @return never null. The first entry is the latest build. */ @Exported @WithBridgeMethods(List.class) public RunList<RunT> getBuilds() { return RunList.fromRuns(_getRuns().values()); }
/** * Gets the list of {@link Build}s that include changes by this user, * by the timestamp order. * * TODO: do we need some index for this? */ public RunList getBuilds() { List<AbstractBuild> r = new ArrayList<AbstractBuild>(); for (AbstractProject<?,?> p : Hudson.getInstance().getAllItems(AbstractProject.class)) for (AbstractBuild<?,?> b : p.getBuilds()) if(b.hasParticipant(this)) r.add(b); return RunList.fromRuns(r); }
public void doRssFailed(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " regression builds", RunList.fromRuns(getBuilds()).regressionOnly(), Run.FEED_ADAPTER); }
public void doRssFailed(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " regression builds", RunList.fromRuns(getBuilds()).regressionOnly(), Run.FEED_ADAPTER); }
public void doRssFailed(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " regression builds", RunList.fromRuns(getBuilds()).regressionOnly(), Run.FEED_ADAPTER); }
public void doRssFailed(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " regression builds", RunList.fromRuns(getBuilds()).regressionOnly(), Run.FEED_ADAPTER); }
public void doRssFailed(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { rss(req, rsp, " failed builds", RunList.fromRuns(getRecentReleases(20)).failureOnly()); }
public void doRssLatest(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { final List<Run> lastBuilds = new ArrayList<Run>(); for (final TopLevelItem item : Hudson.getInstance().getItems()) { if (!(item instanceof Job)) continue; for (Run r = ((Job) item).getLastBuild(); r != null; r = r.getPreviousBuild()) { if (!(r instanceof AbstractBuild)) continue; final AbstractBuild b = (AbstractBuild) r; if (b.hasParticipant(this)) { lastBuilds.add(b); break; } } } rss(req, rsp, " latest build", RunList.fromRuns(lastBuilds), Run.FEED_ADAPTER_LATEST); }
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(); }