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

Environment variables can't be used in agent configuration

XMLWordPrintable

      If you try something like

      agent {
        label "${SOME_ENV_VAR}"
      }
      environment {
        SOME_ENV_VAR = "some-label"
      }
      

      You'll get an error due to SOME_ENV_VAR not existing in the binding. Not ideal, obviously, but I'm not sure if we can actually solve this without significant rewrites.

            Unassigned Unassigned
            abayer Andrew Bayer
            Votes:
            22 Vote for this issue
            Watchers:
            33 Start watching this issue

              Created:
              Updated: