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

PATH variable is being injected from master on multiconfiguration jobs

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: envinject-plugin
    • Labels:
      None
    • Environment:
      EnvInject version: 1.35
      Jenkins version: 1.451
      Any multi-configuration project
    • Similar Issues:

      Description

      On a multi-configuration job, the PATH env var is being over written by the PATH var of the parent node.

      Steps to Reproduce:
      1) Create a multi-configuration job
      2) Set the axis on Slaves (choose 2 different OS slave so that you can clearly see the problem)
      3) As a build step select "Execute Shell" and simply type "env | sort", so that you can see the environment.
      3) DO NOT SELECT "Prepare an environment for the job"
      Build the project and notice PATH is correct, depending on which slave it ran on. (Windows slave have their path correct, and non-windows have their path correct)
      4) Now select "Prepare an environment for the job" and check:
      Keep Jenkins Environment Variables
      Keep Jenkins Build Variables
      Load files from the master (create some dummy file on the master, just to exercise this plugin)

      Now build the project, and notice that both slaves are inheriting the same PATH env from the master. This breaks all jobs running on Slaves.

      This is using the latest EnvInject plugin, 1.35

      If you need more info, let me know!

        Attachments

          Activity

          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Gregory Boissinot
          Path:
          src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java
          src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectJobProperty/config.jelly
          src/main/webapp/help.html
          http://jenkins-ci.org/commit/envinject-plugin/9fe6112e892c11143ccfd180218ca4cc44fb1dc1
          Log:
          Fix JENKINS-13041

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Gregory Boissinot Path: src/main/java/org/jenkinsci/plugins/envinject/EnvInjectListener.java src/main/resources/org/jenkinsci/plugins/envinject/EnvInjectJobProperty/config.jelly src/main/webapp/help.html http://jenkins-ci.org/commit/envinject-plugin/9fe6112e892c11143ccfd180218ca4cc44fb1dc1 Log: Fix JENKINS-13041

            People

            • Assignee:
              gbois Gregory Boissinot
              Reporter:
              grayaii Alex Gray
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: