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

Can't see where "Exported variables" get defined

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I have defined a couple of custom tools for various jobs so I can use defined environment variables in various job scripts. The tools are all pre-installed on the build machine so I'm not using the "Install automatically" feature. I have named the tools, added the "Exported paths", "Installation directory" and also added various "Exported variables" of the format:

      TOOL_VAR_NAME=fred
      TOOL_VAR_VERSION=bob

      When I run the job which enables the named tool I do not see any of the variables in the build environment, displayed via a Windows DOS "SET" command, for any of the "Exported variables" I have defined. I also don't see the "Exported paths" being added to the system PATH which I thought it was supposed to be. I do the "Setting <TOOLNAME>_HOME=<blarh>" in the job log and the <TOOLNAME>_HOME variable in the environment however.

      Am I missing something here?

        Attachments

          Activity

          Hide
          huebranch Hue Branch added a comment -

          Apologies, mix up between Custom Tools and Tool Environment plugins. Sorted issue, my mistake.

          Show
          huebranch Hue Branch added a comment - Apologies, mix up between Custom Tools and Tool Environment plugins. Sorted issue, my mistake.
          Hide
          matthiesenj Jesper Matthiesen added a comment -

          I don't understand what the mentioned mixup is about, but I have the exact same issue with the custom tools plugin. Nothing I set is visible during the build when viewed through bat "set".

          Shouldn't at least stuff in Exported Paths be visible in the PATH env variable?

          If I e.g. create a custom tool named 'VSTest' and set the following:

          Installation directory 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools'

          Exported paths 'Common7\IDE\Extensions\TestPlatform'

          I would expect the PATH to contain 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\Extensions\TestPlatform'

           

          Show
          matthiesenj Jesper Matthiesen added a comment - I don't understand what the mentioned mixup is about, but I have the exact same issue with the custom tools plugin. Nothing I set is visible during the build when viewed through bat "set" . Shouldn't at least stuff in Exported Paths be visible in the PATH env variable? If I e.g. create a custom tool named 'VSTest' and set the following: Installation directory 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools' Exported paths 'Common7\IDE\Extensions\TestPlatform' I would expect the PATH to contain 'C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\Common7\IDE\Extensions\TestPlatform'  
          Hide
          dhoerner Daniel Hoerner added a comment - - edited

          Same problem here.

          I have NOT installed the Tool Envoronment plugin.

          Added following to the Custom Tool Definition:

          Exported Paths: "C:\Program Files\nodejs"

           

          I using the custom tool installer durring the runtime at the Build VM (See Preparing Build machine stage)

          But I can not see this path when running the "set" command of Windows durring build:

           

          // node('VS2017') {
          stage('Preparing Build machine...')
              {  
                  tool name: 'npm 6.4.1', type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool' 
              }
          echo "Current Environment:"
          bat 'set'
          }
          
          Show
          dhoerner Daniel Hoerner added a comment - - edited Same problem here. I have NOT installed the Tool Envoronment plugin. Added following to the Custom Tool Definition: Exported Paths: "C:\Program Files\nodejs"   I using the custom tool installer durring the runtime at the Build VM (See Preparing Build machine stage) But I can not see this path when running the "set" command of Windows durring build:   // node( 'VS2017' ) { stage( 'Preparing Build machine...' ) { tool name: 'npm 6.4.1' , type: 'com.cloudbees.jenkins.plugins.customtools.CustomTool' } echo "Current Environment:" bat 'set' }

            People

            Assignee:
            oleg_nenashev Oleg Nenashev
            Reporter:
            huebranch Hue Branch
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated: