title: Jenkins: Passing a variable between scripts, and accessing it on a post build actions
body: <p>I have a Jenkins job, with SCM from bitbucket, two shell scripts, and a post build action publishing the result to Slack.</p>
  
  <p>Naively I want to pass a concluded variable in the first shell script to the second, add some information to that variable in the second shell script, and then to append that variable to the Slack custom message.</p>
  
  <p>I was expecting this to be a built in feature, and now spending few days on and off at it. I've tired the <strong>EnvInject</strong>, <strong>Environment Inject</strong>, <strong>Global Variable String Parameter</strong> plugins, but in any configuration I've tried it didn't work.</p>
  
  <p>In some cases I got this error: </p>
  
  <pre><code>21:01:08 [EnvInject] - [ERROR] - The given properties file path 'build.properties' doesn't exist.
  </code></pre>
  
  <p>I know this file does not exist.. I expected the plugin to create it, so I can add new content to it in first shell script, and to be loaded in every other step of the job.</p>
  
  <p>Am I missing something or misusing these plugins?</p>