Processes starting with JENKINS_HOME environment variable value of server not agent

This issue is archived. You can view it, but you can't modify it. Learn more

XMLWordPrintable

      We are in the process of migrating our Jenkins agents to new servers. In order to reduce path-too-long exceptions, we're using a different directory for the Jenkins home directory on the agents than on the server. The server uses D:\Jenkins_Home. The agents use D:\J . However, when Jenkins starts child build processes (specifically PowerShell), it sets the JENKINS_HOME environment variable to the path of the Jenkins home on the server/controller, not what's configured as the home directory on the node/agent configuration page.

      Steps to reproduce:

      1. Add a Jenkins node/agent to Jenkins. Set its home ("remote root directory") directory to be a different path than the server/controller's home directory.
      2. Run a build with a PowerShell step that just outputs the environment variables, e.g. dir env:.
      3. Note that the JENKINS_HOME environment variable is set to the controller's Jenkins home directory, not the one configured for the agent.

      I would expect that the JENKINS_HOME environment variable get set to the home directory for each agent.

            Assignee:
            Unassigned
            Reporter:
            Aaron Jensen
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Resolved:
              Archived: