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

          Chris Frolik created issue -
          Chris Frolik made changes -
          Description Original: Using the following in my declarative pipeline:
          {quote}{{environment \{}}
          {{  PATH = '/usr/bin:$PATH'}}
          {{ }}}{quote}
          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 also seems to be about scripted pipelines only.
          New: Using the following in my declarative pipeline:
          {quote}{{environment \{}}
           {{  PATH = '/usr/bin:$PATH'}}
          }
          {quote}
          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 also seems to be about scripted pipelines only.
          Chris Frolik made changes -
          Description Original: Using the following in my declarative pipeline:
          {quote}{{environment \{}}
           {{  PATH = '/usr/bin:$PATH'}}
          }
          {quote}
          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 also seems to be about scripted pipelines only.
          New: Using the following in my declarative pipeline:
          {quote}{{environment \{}}
           {{  PATH = '/usr/bin:$PATH'}}
           }
          {quote}
          Gives this warning at build time:
          {quote}
           Warning: JENKINS-41339 probably bogus PATH=/usr/bin:$PATH; perhaps you meant to use 'PATH+EXTRA=/something/bin'?
          {quote}

           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 also seems to be about scripted pipelines only.
          Chris Frolik made changes -
          Description Original: Using the following in my declarative pipeline:
          {quote}{{environment \{}}
           {{  PATH = '/usr/bin:$PATH'}}
           }
          {quote}
          Gives this warning at build time:
          {quote}
           Warning: JENKINS-41339 probably bogus PATH=/usr/bin:$PATH; perhaps you meant to use 'PATH+EXTRA=/something/bin'?
          {quote}

           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 also seems to be about scripted pipelines only.
          New: Using the following in my declarative pipeline:
          {quote}{{environment \{}}
           {{  PATH = '/usr/bin:$PATH'}}
           }
          {quote}
          Gives this warning at build time:
          {quote}Warning: JENKINS-41339 probably bogus PATH=/usr/bin:$PATH; perhaps you meant to use 'PATH+EXTRA=/something/bin'?
          {quote}
          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.
          Andrew Bayer made changes -
          Component/s New: pipeline-model-definition-plugin [ 21706 ]
          Component/s Original: pipeline [ 21692 ]
          Andrew Bayer made changes -
          Assignee New: Andrew Bayer [ abayer ]
          Andrew Bayer made changes -
          Assignee Original: Andrew Bayer [ abayer ]

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

              Created:
              Updated: