@Override public String getShortDescription() { return name + "=" + job.getFullDisplayName(); } }
@Exported public String getFullDisplayName() { return project.getFullDisplayName()+' '+getDisplayName(); }
ParametersDefinitionProperty pdp = job.getProperty(ParametersDefinitionProperty.class); if (pdp==null) throw new IllegalStateException(job.getFullDisplayName()+" is not parameterized but the -p option was specified."); SCMTriggerItem item = SCMTriggerItem.SCMTriggerItems.asSCMTriggerItem(job); if (item == null) throw new AbortException(job.getFullDisplayName()+" has no SCM trigger, but checkSCM was specified"); String msg = Messages.BuildCommand_CLICause_CannotBuildUnknownReasons(job.getFullDisplayName()); if (job instanceof ParameterizedJobMixIn.ParameterizedJob && ((ParameterizedJobMixIn.ParameterizedJob) job).isDisabled()) { msg = Messages.BuildCommand_CLICause_CannotBuildDisabled(job.getFullDisplayName()); } else if (job.isHoldOffBuildUntilSave()){ msg = Messages.BuildCommand_CLICause_CannotBuildConfigNotSaved(job.getFullDisplayName());
@Override protected synchronized JSON data() { JSONArray r = new JSONArray(); for (User u : modified) { UserInfo i = users.get(u); JSONObject entry = new JSONObject(). accumulate("id", u.getId()). accumulate("fullName", u.getFullName()). accumulate("url", u.getUrl()). accumulate("avatar", i.avatar != null ? i.avatar : Stapler.getCurrentRequest().getContextPath() + Functions.getResourcePath() + "/images/" + iconSize + "/user.png"). accumulate("timeSortKey", i.getTimeSortKey()). accumulate("lastChangeTimeString", i.getLastChangeTimeString()); Job<?,?> p = i.getJob(); if (p != null) { entry.accumulate("projectUrl", p.getUrl()).accumulate("projectFullDisplayName", p.getFullDisplayName()); } r.add(entry); } modified.clear(); return r; }
@Override protected void calculate(Run<?,?> build, JSONObject element) { BallColor iconColor = build.getIconColor(); element.put("iconColorOrdinal", iconColor.ordinal()); element.put("iconColorDescription", iconColor.getDescription()); element.put("url", build.getUrl()); element.put("buildStatusUrl", build.getBuildStatusUrl()); element.put("parentUrl", build.getParent().getUrl()); element.put("parentFullDisplayName", Functions.breakableString(Functions.escape(build.getParent().getFullDisplayName()))); element.put("displayName", build.getDisplayName()); element.put("timestampString", build.getTimestampString()); element.put("timestampString2", build.getTimestampString2()); element.put("timestampString3", Util.XS_DATETIME_FORMATTER.format(new Date(build.getStartTimeInMillis()))); Run.Summary buildStatusSummary = build.getBuildStatusSummary(); element.put("buildStatusSummaryWorse", buildStatusSummary.isWorse); element.put("buildStatusSummaryMessage", buildStatusSummary.message); }
@Override public String getShortDescription() { return name + "=" + job.getFullDisplayName(); } }
@Override public String getShortDescription() { return Messages.DependentBuildIsBuilding(blockingProject.getFullDisplayName()); } }
@Restricted(value=org.kohsuke.accmod.restrictions.NoExternalUse.class) public String getProjectListAsString(List<Job> projectList){ StringBuilder projectListString = new StringBuilder(); for (Iterator<Job> iterator = projectList.iterator(); iterator.hasNext();) { Job project = iterator.next(); projectListString.append(HyperlinkNote.encodeTo('/'+ project.getUrl(), project.getFullDisplayName())); if(iterator.hasNext()){ projectListString.append(", "); } } return projectListString.toString(); }
public void onTriggered(@Nonnull Job job, @Nonnull PushNotification pushNotification) { logger.log(Level.FINER, "Job {0} triggered for payload: {1}", new Object[]{job.getFullDisplayName(), pushNotification}); TriggerStore.getInstance().triggered(pushNotification, job); }
@Exported public String getFullDisplayName() { return project.getFullDisplayName()+' '+getDisplayName(); }
@Exported public String getFullDisplayName() { return project.getFullDisplayName()+' '+getDisplayName(); }
public synchronized void triggered(@Nonnull final PushNotification pushNotification, Job<?, ?> job) { try { TriggerEntry entry = getOrCreateEntry(pushNotification); entry.addEntry(job); save(entry); } catch (Exception e) { logger.log(Level.SEVERE, "Failed to update triggered info for " + job.getFullDisplayName(), e); } }
@Exported public String getFullDisplayName() { return project.getFullDisplayName()+' '+getDisplayName(); }
@Exported public String getFullDisplayName() { return project.getFullDisplayName() + ' ' + getDisplayName(); }
@Exported public String getFullDisplayName() { return project.getFullDisplayName()+' '+getDisplayName(); }
public List<JiraVersionParameterDefinition.Result> getVersions() throws IOException { Job<?, ?> context = Stapler.getCurrentRequest().findAncestorObject(Job.class); JiraSite site = JiraSite.get(context); if (site == null) throw new IllegalStateException("JIRA site needs to be configured in the project " + context.getFullDisplayName()); JiraSession session = site.getSession(); if (session == null) throw new IllegalStateException("Remote access for JIRA isn't configured in Jenkins"); return session.getVersions(projectKey).stream(). sorted( VersionComparator.INSTANCE ). filter( version -> match( version ) ). map( version -> new Result( version )). collect( Collectors.toList() ); }
public List<JiraIssueParameterDefinition.Result> getIssues() throws IOException, TimeoutException { Job<?, ?> context = Stapler.getCurrentRequest().findAncestorObject(Job.class); JiraSite site = JiraSite.get(context); if (site == null) throw new IllegalStateException("JIRA site needs to be configured in the project " + context.getFullDisplayName()); JiraSession session = site.getSession(); if (session == null) throw new IllegalStateException("Remote access for JIRA isn't configured in Jenkins"); List<Issue> issues = session.getIssuesFromJqlSearch(jiraIssueFilter); List<Result> issueValues = new ArrayList<>(); for (Issue issue : fixNull(issues)) { issueValues.add(new Result(issue)); } return issueValues; }
@Override public void onStarted(Run build, TaskListener listener) { if (PluginImpl.shouldScan(build) && build.getParent().getProperty(ScannerJobProperty.class) == null) { try { build.getParent().addProperty(new ScannerJobProperty(false)); } catch (IOException e) { logger.log(Level.WARNING, "Failed to add a ScannerJobProperty to " + build.getParent().getFullDisplayName(), e); listener.getLogger().println("[BFA] WARNING! Failed to add the scanner property to this job."); } } }
public static ListBoxModel fillAllProjects(ItemGroup<?> context, Class<? extends Job> type) { ListBoxModel options = new ListBoxModel(); for (Job p : JenkinsUtil.getInstance().getAllItems(type)) { options.add(p.getFullDisplayName(), p.getRelativeNameFrom(context)); } return options; }
@Override protected void calculate(Run<?,?> build, JSONObject element) { BallColor iconColor = build.getIconColor(); element.put("iconColorOrdinal", iconColor.ordinal()); element.put("iconColorDescription", iconColor.getDescription()); element.put("url", build.getUrl()); element.put("buildStatusUrl", build.getBuildStatusUrl()); element.put("parentUrl", build.getParent().getUrl()); element.put("parentFullDisplayName", Functions.breakableString(Functions.escape(build.getParent().getFullDisplayName()))); element.put("displayName", build.getDisplayName()); element.put("timestampString", build.getTimestampString()); element.put("timestampString2", build.getTimestampString2()); element.put("timestampString3", Util.XS_DATETIME_FORMATTER.format(new Date(build.getStartTimeInMillis()))); Run.Summary buildStatusSummary = build.getBuildStatusSummary(); element.put("buildStatusSummaryWorse", buildStatusSummary.isWorse); element.put("buildStatusSummaryMessage", buildStatusSummary.message); }