public static LabelAtom findNearest(String name) { List<String> candidates = new ArrayList<String>(); for (LabelAtom a : Jenkins.getInstance().getLabelAtoms()) { candidates.add(a.getName()); } return get(EditDistance.findNearest(name, candidates)); }
/** * Gets the special label that represents this node itself. */ @Nonnull @WithBridgeMethods(Label.class) public LabelAtom getSelfLabel() { return LabelAtom.get(getNodeName()); }
@Exported public LoadStatistics getLoadStatistics() { return LabelAtom.get(nodeName != null ? nodeName : Jenkins.getInstance().getSelfLabel().toString()).loadStatistics; }
public static LabelAtom findNearest(String name) { List<String> candidates = new ArrayList<String>(); for (LabelAtom a : Jenkins.getInstance().getLabelAtoms()) { candidates.add(a.getName()); } return get(EditDistance.findNearest(name, candidates)); }
/** * Gets the special label that represents this node itself. */ public LabelAtom getSelfLabel() { return LabelAtom.get(getNodeName()); }
/** * Gets the special label that represents this node itself. */ public LabelAtom getSelfLabel() { return LabelAtom.get(getNodeName()); }
/** * Gets the special label that represents this node itself. */ @WithBridgeMethods(Label.class) public LabelAtom getSelfLabel() { return LabelAtom.get(getNodeName()); }
/** * Gets the special label that represents this node itself. */ @WithBridgeMethods(Label.class) public LabelAtom getSelfLabel() { return LabelAtom.get(getNodeName()); }
/** * Gets the special label that represents this node itself. */ @WithBridgeMethods(Label.class) public LabelAtom getSelfLabel() { return LabelAtom.get(getNodeName()); }
@Exported public LoadStatistics getLoadStatistics() { return LabelAtom.get(nodeName != null ? nodeName : Jenkins.getInstance().getSelfLabel().toString()).loadStatistics; }
@Override public void evaluate() throws Throwable { WorkflowJob p = (WorkflowJob) story.j.jenkins.getItem("demo"); assertNotNull(p); WorkflowRun b = p.getLastBuild(); SemaphoreStep.success("wait/1", null); story.j.assertBuildStatusSuccess(story.j.waitForCompletion(b)); story.j.assertLogContains("before=demo", b); story.j.assertLogContains("ONAGENT=true", b); story.j.assertLogContains("reallyAfterFoo", b); story.j.assertLogNotContains("neverShouldReach", b); FlowExecution execution = b.getExecution(); assertNotNull(execution); FlowGraphWalker walker = new FlowGraphWalker(execution); List<WorkspaceAction> actions = new ArrayList<>(); for (FlowNode n : walker) { WorkspaceAction a = n.getAction(WorkspaceAction.class); if (a != null) { actions.add(a); } } assertEquals(1, actions.size()); assertEquals(new HashSet<>(Arrays.asList(LabelAtom.get("remote"), LabelAtom.get("quick"))), actions.get(0).getLabels()); assertThat(logger.getRecords(), Matchers.hasSize(Matchers.equalTo(0))); } });