DumbSlave s = createSlave(story.j);
s.setLabelString("remote quick");
s.getNodeProperties().add(new EnvironmentVariablesNodeProperty(new EnvironmentVariablesNodeProperty.Entry("ONSLAVE", "true")));
p = jenkins().createProject(WorkflowJob.class, "demo");
p.setDefinition(new CpsFlowDefinition(
"node('" + s.getNodeName() + "') {\n" +
// TODO this has been observed to print the basename command, but not echo the result; why?
" sh('echo before=`basename $PWD`')\n" +
" sh('echo ONSLAVE=$ONSLAVE')\n" +