Just to clarify, I tried with 
https://jenkins.io/doc/pipeline/tour/environment/ but I wasn't success 
unfortunately, since those env variables aren't persistent somehow, see the 
below snippet:

pipeline {
  agent any
*  environment {*
*      TESTLAB_URL = 'NA'*
*  }*
  stage('TestLab') {
      steps {
        script {
          // This is a Long Execution Build in the Test Lab
          def bRun = build job: 'testlab', parameters: [string(name: 
'GERRIT_PATCHSET_REVISION', GERRIT_PATCHSET_REVISION)], propagate: false
          sh """
            curl 
"${bRun.getRawBuild().getAbsoluteUrl()}/artifact/testlab_run.properties/*view*/"
 
--write-out %{http_code} --silent --output /dev/null | grep '200' 
>/dev/null \
            && curl -s -o ti2_run.properties 
"${bRun.getRawBuild().getAbsoluteUrl()}/artifact/testlab_run.properties/*view*/"
 
|| echo "TESTLAB_URL=null" > testlab_run.properties
          """
        }
      }      
    }
  }

  post {
    always {
      script {
*        def props = readProperties file: 'testlab_run.properties'*
*        TESTLAB_URL = props. TESTLAB_URL*
      }
    }
  }
}


I'm pretty sure I missed something here...

Thanks again

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" 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-users/eae6d5af-f509-40f0-871e-4f2a3ecae6ab%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to