private void rss(StaplerRequest req, StaplerResponse rsp, String suffix, RunList runs) throws IOException, ServletException { RSS.forwardToRss(getDisplayName() + suffix, getUrl(), runs.newBuilds(), Run.FEED_ADAPTER, req, rsp); }
/** * Returns true if this user has made a commit to this build. */ @SuppressWarnings("unchecked") default boolean hasParticipant(User user) { for (ChangeLogSet<? extends ChangeLogSet.Entry> c : getChangeSets()) { for (ChangeLogSet.Entry e : c) { try { if (e.getAuthor() == user) { return true; } } catch (RuntimeException re) { Logger LOGGER = Logger.getLogger(RunWithSCM.class.getName()); LOGGER.log(Level.INFO, "Failed to determine author of changelog " + e.getCommitId() + "for " + ((RunT) this).getParent().getDisplayName() + ", " + ((RunT) this).getDisplayName(), re); } } } return false; } }
/** * Serves the artifacts. * @throws AccessDeniedException Access denied */ public @Nonnull DirectoryBrowserSupport doArtifact() { if(Functions.isArtifactsPermissionEnabled()) { checkPermission(ARTIFACTS); } return new DirectoryBrowserSupport(this, getArtifactManager().root(), Messages.Run_ArtifactsBrowserTitle(project.getDisplayName(), getDisplayName()), "package.png", true); }
/** * Adds a child item when rendering context menu of its parent. * * @since 1.513 */ public ContextMenu add(Job job) { return add(new MenuItem() .withDisplayName(job.getDisplayName()) .withIcon(job.getIconColor()) .withUrl(job.getSearchUrl())); }
getDisplayName() + scmDisplayName + " changes", getUrl() + "changes", entries, new FeedAdapter<FeedItem>() {
private String getNote(Run<?, ?> build, TaskListener listener) { String message; if (this.replaceSuccessNote && build.getResult() == Result.SUCCESS) { message = replaceMacros(build, listener, this.getSuccessNoteText()); } else if (this.replaceAbortNote && build.getResult() == Result.ABORTED) { message = replaceMacros(build, listener, this.getAbortNoteText()); } else if (this.replaceUnstableNote && build.getResult() == Result.UNSTABLE) { message = replaceMacros(build, listener, this.getUnstableNoteText()); } else if (this.replaceFailureNote && build.getResult() == Result.FAILURE) { message = replaceMacros(build, listener, this.getFailureNoteText()); } else { String icon = getResultIcon(build.getResult()); String buildUrl = Jenkins.getInstance().getRootUrl() + build.getUrl(); message = MessageFormat.format("{0} Jenkins Build {1}\n\nResults available at: [Jenkins [{2} #{3}]]({4})", icon, build.getResult().toString(), build.getParent().getDisplayName(), build.getNumber(), buildUrl); } return message; } }
@Override public void onCompleted(AbstractBuild build, TaskListener listener){ try{ DiskUsageThread.calculateDiskUsageForBuild(build); } catch(Exception ex){ listener.getLogger().println("Disk usage plugin fails during calculation disk usage of this build."); Logger.getLogger(getClass().getName()).log(Level.WARNING, "Disk usage plugin fails during build calculation disk space of job " + build.getParent().getDisplayName(), ex); } } }
@Override public void onFinalized(Run r) { LOG.finer("JenkowRunListener.onFinalized: "+r.getParent().getDisplayName()+" "+r.getDisplayName()); new JenkowExecContext(r).onFinalized(r); } }
@Override public void onStarted(Run r, TaskListener listener) { LOG.finer("JenkowRunListener.onStarted: "+r.getParent().getDisplayName()+" "+r.getDisplayName()); new JenkowExecContext(r).onStarted(r,listener); }
private void rss(StaplerRequest req, StaplerResponse rsp, String suffix, RunList runs) throws IOException, ServletException { RSS.forwardToRss(getDisplayName() + suffix, getUrl(), runs.newBuilds(), Run.FEED_ADAPTER, req, rsp); }
private void rss(StaplerRequest req, StaplerResponse rsp, String suffix, RunList runs) throws IOException, ServletException { RSS.forwardToRss(getDisplayName() + suffix, getUrl(), runs.newBuilds(), Run.FEED_ADAPTER, req, rsp); }
private void rss(StaplerRequest req, StaplerResponse rsp, String suffix, RunList runs) throws IOException, ServletException { RSS.forwardToRss(getDisplayName() + suffix, getUrl(), runs.newBuilds(), Run.FEED_ADAPTER, req, rsp); }
private void rss(StaplerRequest req, StaplerResponse rsp, String suffix, RunList runs) throws IOException, ServletException { RSS.forwardToRss(getDisplayName() + suffix, getUrl(), runs.newBuilds(), Run.FEED_ADAPTER, req, rsp); }
public void setBuildStatus(BitbucketCause cause, BuildState state, String buildUrl) { String comment = null; String sourceCommit = cause.getSourceCommitHash(); String owner = cause.getRepositoryOwner(); String repository = cause.getRepositoryName(); String destinationBranch = cause.getTargetBranch(); logger.fine("setBuildStatus " + state + " for commit: " + sourceCommit + " with url " + buildUrl); if (state == BuildState.FAILED || state == BuildState.SUCCESSFUL) { comment = String.format(BUILD_DESCRIPTION, builder.getJob().getDisplayName(), sourceCommit, destinationBranch); } this.client.setBuildStatus(owner, repository, sourceCommit, state, buildUrl, comment, this.builder.getProjectId()); }
/** * Serves the artifacts. * @throws AccessDeniedException Access denied */ public @Nonnull DirectoryBrowserSupport doArtifact() { if(Functions.isArtifactsPermissionEnabled()) { checkPermission(ARTIFACTS); } return new DirectoryBrowserSupport(this, getArtifactManager().root(), Messages.Run_ArtifactsBrowserTitle(project.getDisplayName(), getDisplayName()), "package.png", true); }
/** * Serves the artifacts. */ public DirectoryBrowserSupport doArtifact() { if(Functions.isArtifactsPermissionEnabled()) { checkPermission(ARTIFACTS); } return new DirectoryBrowserSupport(this,new FilePath(getArtifactsDir()), project.getDisplayName()+' '+getDisplayName(), "package.png", true); }
/** * Adds a child item when rendering context menu of its parent. * * @since 1.513 */ public ContextMenu add(Job job) { return add(new MenuItem() .withDisplayName(job.getDisplayName()) .withIcon(job.getIconColor()) .withUrl(job.getSearchUrl())); }
/** * Serves the artifacts. */ public DirectoryBrowserSupport doArtifact() { if(Functions.isArtifactsPermissionEnabled()) { checkPermission(ARTIFACTS); } return new DirectoryBrowserSupport(this,new FilePath(getArtifactsDir()), project.getDisplayName()+' '+getDisplayName(), "package.gif", true); }
/** * Serves the artifacts. */ public DirectoryBrowserSupport doArtifact() { if(Functions.isArtifactsPermissionEnabled()) { checkPermission(ARTIFACTS); } return new DirectoryBrowserSupport(this,new FilePath(getArtifactsDir()), project.getDisplayName()+' '+getDisplayName(), "package.gif", true); }
/** * Serves the artifacts. */ public DirectoryBrowserSupport doArtifact() { if (Functions.isArtifactsPermissionEnabled()) { checkPermission(ARTIFACTS); } return new DirectoryBrowserSupport(this, new FilePath(getArtifactsDir()), project.getDisplayName() + ' ' + getDisplayName(), "package.png", true); }