I have a plugin I've been updating to support pipeline script (with some
help from this forum - thanks guys!). During testing I discovered that the
plugin is not setting environment variables when run from a pipeline
script, but works fine in a freestyle job.
Can anyone suggest anything I might have overlooked?
Thanks in advance
Andrew
*Pipeline Script*
This outputs an empty value for %BUILDMASTER_APPLICATION_ID%.
node {
buildMasterSelectApplication applicationId: '1', deployableId: '1'
bat 'echo BUILDMASTER_APPLICATION_ID = %BUILDMASTER_APPLICATION_ID%'
}
*Code*
This is how I'm setting the environment variable
public class SelectApplicationBuilder extends Builder implements
SimpleBuildStep {
@Override
public void perform(Run<?, ?> run, FilePath workspace, Launcher
launcher, TaskListener listener) throws InterruptedException, IOException {
run.addAction(new
VariableInjectionAction("BUILDMASTER_APPLICATION_ID", applicationId));
}
}
--
You received this message because you are subscribed to the Google Groups
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-dev/3a0afe81-6adf-4cd5-ae54-e8b44999a79e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.