Tried build.getEnvironment() but that gives me environment variables of JobA, NOT the one that I set. Also tried buld.getBuildVariables() but it throws error. I believe the getBuildVariables() method is for 'downstream' jobs.
Any idea how do i do this ?
BTW: I am seeting VAR1=FOO in JobA as env.VAR1="FOO"