/** * Equivalent to calling {@link withContext} on each object. */ public BodyInvoker withContexts(Object... overrides) { return withContexts(Arrays.asList(overrides)); }
/** * Equivalent to calling {@link withContext} on each object. */ public BodyInvoker withContexts(Object... overrides) { return withContexts(Arrays.asList(overrides)); }
body = getContext().newBodyInvoker().withContexts(envEx, newFilter).withCallback(new WithMavenStepExecutionCallBack(tempBinDir, step.getOptions(), step.getPublisherStrategy())).start();
listener.getLogger().println("Running on " + computer.getDisplayName() + " in " + workspace); // TODO hyperlink context.newBodyInvoker() .withContexts(exec, computer, env, workspace) .withCallback(new Callback(cookie, lease)) .start();
listener.getLogger().println("Running on " + computer.getDisplayName() + " in " + workspace); // TODO hyperlink context.newBodyInvoker() .withContexts(exec, computer, env, workspace) .withCallback(new Callback(cookie, lease)) .start();
.withContexts(exec, computer, env, workspace) .withCallback(new Callback(cookie, lease)) .start();
getContext().get(TaskListener.class).getLogger().println("Running in " + workspace); getContext().newBodyInvoker() .withContexts( EnvironmentExpander.merge(getContext().get(EnvironmentExpander.class), EnvironmentExpander.constant(Collections.singletonMap("WORKSPACE", workspace.getRemote()))),
@Override public boolean start() throws Exception { StepContext context = getContext(); value = "one"; context.newBodyInvoker(). withContexts(EnvironmentExpander.merge(context.get(EnvironmentExpander.class), new ExpanderImpl(this))). withCallback(BodyExecutionCallback.wrap(context)). start(); return false; } @Override public void onResume() {
private void invokeBody(DockerTransientNode node, TaskListener listener) { this.nodeName = node.getNodeName(); FilePath ws = null; Computer computer = null; EnvVars env = null; try { // TODO workspace should be a volume ws = node.createPath(node.getRemoteFS() + "/workspace"); FlowNode flowNode = getContext().get(FlowNode.class); flowNode.addAction(new WorkspaceActionImpl(ws, flowNode)); computer = node.toComputer(); if (computer == null) throw new IllegalStateException("Agent not started"); env = computer.getEnvironment(); env.overrideExpandingAll(computer.buildEnvironment(listener)); env.put("NODE_NAME", computer.getName()); env.put("EXECUTOR_NUMBER", "0"); env.put("NODE_LABELS", Util.join(node.getAssignedLabels(), " ")); env.put("WORKSPACE", ws.getRemote()); } catch (IOException | InterruptedException e) { getContext().onFailure(e); } getContext().newBodyInvoker().withCallback(new Callback(node)).withContexts(computer, env, ws).start(); }