Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-45810

Jenkinsfile can't access environment variables in parameter descriptions

XMLWordPrintable

      This does not work:

      pipeline {
          environment {
              FOO = "bar"
          }
          parameters {
              string(name: 'BAZ', defaultValue: '', description: "Foo = $env.FOO")
          }
      

      The description for the parameter is always "Foo = null" instead of "Foo = bar".

            abayer Andrew Bayer
            echatman Elizabeth Chatman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: