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

Pre-pending to PATH environment variable in declarative pipeline

      Using the following in my declarative pipeline:

      environment {
        PATH = '/usr/bin:$PATH'
      }

      Gives this warning at build time:

      Warning: JENKINS-41339 probably bogus PATH=/usr/bin:$PATH; perhaps you meant to use 'PATH+EXTRA=/something/bin'?

      The problem is, the "PATH+EXTRA" syntax this warning is suggesting doesn't seem to be available in declarative pipelines. Also, the issue mentioned in this warning seems to be about scripted pipelines only.

          [JENKINS-50299] Pre-pending to PATH environment variable in declarative pipeline

            Unassigned Unassigned
            fr0 Chris Frolik
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: