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

Unable to export path in matrix jobs.

XMLWordPrintable

    • 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.

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

              Created:
              Updated: