• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • job-dsl-plugin
    • None
    • Jenkins 1.646
      Custom Tools Plugin 0.4.4
      Matrix Project Plugin 1.6

      When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

      My installer configuration is :

      Name: phpenv
      Exported paths; phpenv/bin,phpenv/shims
      Command :
      ```
      export PHPENV_ROOT=$(pwd)/phpenv
      export PATH="$PATH:$PHPENV_ROOT/bin"

      (
      if ! flock --exclusive --nonblock 9; then
      flock --exclusive 9
      exit 1
      fi

      if test -d $PHPENV_ROOT; then
      echo 'phpenv installed'
      else
      curl -L http://git.io/phpenv-installer | bash
      fi

      if ! test -d $PHPENV_ROOT/shims; then
      mkdir $PHPENV_ROOT/shims
      fi
      ) 9>phpenv.lock

      eval "$(phpenv init -)"
      ```

      My Job configuration is

      Axis config:
      Name: PHP_VERSION
      Value: 5.3.29 5.4.45 5.5.30

      Build config:
      ```
      phpenv versions | grep ${PHP_VERSION} || phpenv install ${PHP_VERSION}
      ```

      In the building process, I got 'phpenv not found' error and reason is the installation path is not in $PATH.

          [JENKINS-32739] Unable to export path in matrix jobs.

          Wenzheng Jiang created issue -

          Oleg Nenashev added a comment -

          Cannot reproduce. Which versions of Matrix project and Custom Tools do you use?

          Oleg Nenashev added a comment - Cannot reproduce. Which versions of Matrix project and Custom Tools do you use?
          Wenzheng Jiang made changes -
          Environment Original: Jenkins 1.646
          Custom Tools Plugin 0.4.4
          New: Jenkins 1.646
          Custom Tools Plugin 0.4.4
          Matrix Project Plugin 1.6
          Wenzheng Jiang made changes -
          Description Original: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs. New: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          # Use `flock` to ensure that we do not install/update `phpenv` simultaneously across different jobs.
          (
              if ! flock --exclusive --nonblock 9; then
                  # Wait for the lock to be released and then continue.
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          Wenzheng Jiang made changes -
          Description Original: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          # Use `flock` to ensure that we do not install/update `phpenv` simultaneously across different jobs.
          (
              if ! flock --exclusive --nonblock 9; then
                  # Wait for the lock to be released and then continue.
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          New: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          ```
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          # Use `flock` to ensure that we do not install/update `phpenv` simultaneously across different jobs.
          (
              if ! flock --exclusive --nonblock 9; then
                  # Wait for the lock to be released and then continue.
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          ```
          Wenzheng Jiang made changes -
          Attachment Original: 2.png [ 31739 ]

          Updated description

          Wenzheng Jiang added a comment - Updated description
          Wenzheng Jiang made changes -
          Description Original: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          ```
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          # Use `flock` to ensure that we do not install/update `phpenv` simultaneously across different jobs.
          (
              if ! flock --exclusive --nonblock 9; then
                  # Wait for the lock to be released and then continue.
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          ```
          New: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          ```
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          # Use `flock` to ensure that we do not install/update `phpenv` simultaneously across different jobs.
          (
              if ! flock --exclusive --nonblock 9; then
                  # Wait for the lock to be released and then continue.
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          ```

          I also export the path in the installer command, but it also doesn't work. In the building process, I get 'phpenv not found' error and reason is the installation path is not in $PATH.
          Wenzheng Jiang made changes -
          Description Original: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          ```
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          # Use `flock` to ensure that we do not install/update `phpenv` simultaneously across different jobs.
          (
              if ! flock --exclusive --nonblock 9; then
                  # Wait for the lock to be released and then continue.
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          ```

          I also export the path in the installer command, but it also doesn't work. In the building process, I get 'phpenv not found' error and reason is the installation path is not in $PATH.
          New: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          ```
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          (
              if ! flock --exclusive --nonblock 9; then
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          ```

          I also export the path in the installer command, but it also doesn't work. In the building process, I get 'phpenv not found' error and reason is the installation path is not in $PATH.
          Wenzheng Jiang made changes -
          Description Original: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          ```
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          (
              if ! flock --exclusive --nonblock 9; then
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 # phpenv update
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          ```

          I also export the path in the installer command, but it also doesn't work. In the building process, I get 'phpenv not found' error and reason is the installation path is not in $PATH.
          New: When using customTools plugin, I export the installation path by putting them in "Exported paths". But these paths don't appear later in PATH in matrixjobs, while it works fine in freestylejobs.

          My installer configuration is :

          Name: phpenv
          Exported paths; phpenv/bin,phpenv/shims
          Command :
          ```
          export PHPENV_ROOT=$(pwd)/phpenv
          export PATH="$PATH:$PHPENV_ROOT/bin"

          (
              if ! flock --exclusive --nonblock 9; then
                  flock --exclusive 9
                  exit 1
              fi
              
              if test -d $PHPENV_ROOT; then
                 echo 'phpenv installed'
              else
                  curl -L http://git.io/phpenv-installer | bash
              fi
              
              if ! test -d $PHPENV_ROOT/shims; then
                  mkdir $PHPENV_ROOT/shims
              fi
          ) 9>phpenv.lock

          eval "$(phpenv init -)"
          ```

          I also export the path in the installer command, but it also doesn't work. In the building process, I get 'phpenv not found' error and reason is the installation path is not in $PATH.

            jamietanna Jamie Tanna
            wjiang Wenzheng Jiang
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: