Skip to content

Instantly share code, notes, and snippets.

@MattLud
Created February 12, 2018 23:19
Show Gist options
  • Save MattLud/1d02a82d6707ba6c94370ba3bb358cfb to your computer and use it in GitHub Desktop.
Save MattLud/1d02a82d6707ba6c94370ba3bb358cfb to your computer and use it in GitHub Desktop.
ssh-agent-envVars
@Override
public boolean start() throws Exception {
StepContext context = getContext();
sockets = new ArrayList<String>();
initRemoteAgent();
//AgentEnvs is Map<String,String> of resulting ssh agent pid and sock.
context.newBodyInvoker().
withContext(EnvironmentExpander.merge(getContext().get(EnvironmentExpander.class), EnvironmentExpander.constant(agentEnvs))).
withCallback(BodyExecutionCallback.wrap(getContext())).withDisplayName(null).start();
return false;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment