/** * Returns projects that are tied on this node. */ @Exported public List<AbstractProject> getTiedJobs() { List<AbstractProject> r = new ArrayList<AbstractProject>(); for (AbstractProject<?,?> p : Jenkins.getInstance().allItems(AbstractProject.class)) { if(p instanceof TopLevelItem && this.equals(p.getAssignedLabel())) r.add(p); } Collections.sort(r, Items.BY_FULL_NAME); return r; }
if (lbl != null && lbl.equals(h.getSelfLabel())) { if (h.canTake(p) == null) { return createFlyWeightTaskRunnable(p, h.toComputer());
public boolean shouldSchedule(List<Action> actions) { // see if there is already a matching action with same node for (NodeAction other:Util.filter(actions, NodeAction.class)) { if(this.nodeLabel.equals(other.nodeLabel)){ // there is already a task for this node. return false; } } return true; } /**
/** * Returns projects that are tied on this node. */ @Exported public List<AbstractProject> getTiedJobs() { List<AbstractProject> r = new ArrayList<AbstractProject>(); for (AbstractProject<?,?> p : Jenkins.getInstance().allItems(AbstractProject.class)) { if(p instanceof TopLevelItem && this.equals(p.getAssignedLabel())) r.add(p); } Collections.sort(r, Items.BY_FULL_NAME); return r; }
/** * Returns projects that are tied on this node. */ @Exported public List<AbstractProject> getTiedJobs() { List<AbstractProject> r = new ArrayList<AbstractProject>(); for( AbstractProject p : Util.filter(Hudson.getInstance().getItems(),AbstractProject.class) ) { if(this.equals(p.getAssignedLabel())) r.add(p); } return r; }
/** * Returns projects that are tied on this node. */ @Exported public List<AbstractProject> getTiedJobs() { List<AbstractProject> r = new ArrayList<AbstractProject>(); for( AbstractProject p : Util.filter(Hudson.getInstance().getItems(),AbstractProject.class) ) { if(this.equals(p.getAssignedLabel())) r.add(p); } return r; }
/** * Returns projects that are tied on this node. */ @Exported public List<AbstractProject> getTiedJobs() { List<AbstractProject> r = new ArrayList<AbstractProject>(); for( AbstractProject p : Util.filter(Hudson.getInstance().getItems(),AbstractProject.class) ) { if(this.equals(p.getAssignedLabel())) r.add(p); } return r; }
/** * Returns projects that are tied on this node. */ @Exported public List<AbstractProject> getTiedJobs() { List<AbstractProject> r = new ArrayList<AbstractProject>(); for (AbstractProject p : Util.filter(Hudson.getInstance().getItems(), AbstractProject.class)) { if (this.equals(p.getAssignedLabel())) { r.add(p); } } for (MatrixProject p : Util.filter(Hudson.getInstance().getItems(), MatrixProject.class)) { for (Axis axis : p.getAxes()) { if (axis.getValues().contains(getName())){ r.add(p); } } } return r; }