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

Unable to export path in matrix jobs.

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: job-dsl-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.646
      Custom Tools Plugin 0.4.4
      Matrix Project Plugin 1.6
    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          Hide
          joshuaspence Joshua Spence added a comment -

          Using the job-dsl-plugin

          Show
          joshuaspence Joshua Spence added a comment - Using the job-dsl-plugin
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          Wenzheng Jiang And what about you?

          Show
          oleg_nenashev Oleg Nenashev added a comment - Wenzheng Jiang And what about you?
          Hide
          wjiang Wenzheng Jiang added a comment - - edited

          Same situation here.

          Below dsl code can generate the "incorrect" xml

          customtools['arcanist'] 
          customtools['phpenv']
          

          Where

          customtools['arcanist', 'phpenv'] 
          

          generates the "correct" xml.

          Show
          wjiang Wenzheng Jiang added a comment - - edited Same situation here. Below dsl code can generate the "incorrect" xml customtools[ 'arcanist' ] customtools[ 'phpenv' ] Where customtools[ 'arcanist' , 'phpenv' ] generates the "correct" xml.
          Hide
          oleg_nenashev Oleg Nenashev added a comment -

          So it's not a bug in Custom Tools Plugin.
          Passing it to Daniel Spilker. Maybe he accepts it as an improvement to JobDSL

          Show
          oleg_nenashev Oleg Nenashev added a comment - So it's not a bug in Custom Tools Plugin. Passing it to Daniel Spilker . Maybe he accepts it as an improvement to JobDSL
          Hide
          wjiang Wenzheng Jiang added a comment -

          Yep, thanks.

          Show
          wjiang Wenzheng Jiang added a comment - Yep, thanks.

            People

            • Assignee:
              daspilker Daniel Spilker
              Reporter:
              wjiang Wenzheng Jiang
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: