Capturing Data From a Script File and Setting Environment Variables

15 views
Skip to first unread message

John Bobinyec

unread,
Mar 9, 2016, 2:13:41 PM3/9/16
to Jenkins Users
I have several perl scripts which develop information which is to be used as environmental variables in subsequent parts of the build. 

How do I:
  1. Pass the information back from the perl script to the main build program?
  2. Once the main program has the information, set up environment variables with these values so subsequent script files can use them?

Thanks,

jb

Ioannis Moutsatsos

unread,
Mar 14, 2016, 1:14:48 PM3/14/16
to Jenkins Users
I would start with the https://wiki.jenkins-ci.org/display/JENKINS/EnvInject+Plugin
if your perl scripts write a simple key-value properties file, this plugin can read it to create environment variables that you can use in subsequent tasks or builds. 
hope this helps
Ioannis
Reply all
Reply to author
Forward
0 new messages