title: How to make a Java console output a environment variable in Jenkins?
body: <p>I am new to Jenkins and even though I found a few similar questions, none of the solutions seemed to work for me the way I need it to. It might look like a basic problem to some but for me it's a very big deal that I'm struggling with.</p>
  
  <p>Basically, I built a project that executes Java Selenium code, which displays session ID in Jenkins' Console Output and that's what I need to add to environment variables to be used in the projects triggered after completion of this one.</p>
  
  <p>I tried some Groovy scripts but I don't think I understand enough how to work with it and so whatever I was given, wasn't what I hoped to get.</p>
  
  <p>Has anyone done something similar to provide some tips on how to achieve that?</p>
  
  <p>Many thanks</p>