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

WIndows System Environment Variables Not updating in until restart

XMLWordPrintable

      We have a python script ( using py2exe ) that modifies System Environment Variables and recently noticed that on our Slaves calling SET in Jenkins vs SET in a shell on the slave shows different results.  The only way we have found to make the JENKINS System Env Variables to change is to physically re-start that machine.

      The 2 images show how Jenkins and the system disagree on what this var ( V_PROJECT_WORKSPACE_DIR ) is set to.

      jenkins_rdp_view.jpg : The remote view of a NEW command window

      jenkins_console_output_view.jpg : A script running on that slave that show what it sees.

      EDIT:
      After thinking on this more, and talking with some Programmers the theory is that Jenkins is in a VM and thus snap-shots the system then passes those variables down. we use setx KEY VALUE, and that sets registry, but doesn't change the local environment. Maybe this should be a feature, but a way to 're-snap' the System's Environment variables if prompted to.

        1. jenkins_console_output_view.jpg
          73 kB
          Nathan Turner
        2. jenkins_rdp_view.jpg
          69 kB
          Nathan Turner

            Unassigned Unassigned
            nathan_turner Nathan Turner
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: