parameter of type run not added to params

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      parameters of type run are not accessible by params. They are exposed as env:

      Jenkinsfile
      pipeline {
          agent none
      
          parameters {
              string(name:'stringParam', defaultValue: null)
              run(name: 'runParam', filter: 'ALL', projectName: 'some-other-job')
          }
          
          stages {
              stage('test') {
                  steps {
                      echo "params.stringParam: ${params.stringParam}"
                      echo "params.runParam: ${params.runParam}"
                      echo "env.runParam: ${env.runParam}"
                  }
              }
          }
      }
      

      Result:

      Started by user unknown or anonymous
      Running in Durability level: MAX_SURVIVABILITY
      [Pipeline] stage
      [Pipeline] { (test)
      [Pipeline] echo
      params.stringParam: xx
      [Pipeline] echo
      params.runParam: null
      [Pipeline] echo
      env.runParam: http://xxx/job/some-other-job/4/
      [Pipeline] }
      [Pipeline] // stage
      [Pipeline] End of Pipeline
      Finished: SUCCESS
      

            Assignee:
            Oleg Nenashev
            Reporter:
            Dietmar Scheidl
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: