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

problems exposing P4CLIENT and P4PASSWD to env

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • p4-plugin
    • None
    • Windows

      If the environment variable is assigned a value before the Jenkins slave starts the value is not changed by the plugin.
      The P4CLIENT problem is visible, when a system level P4CLIENT is defined and the slave is run as a service as a user (MYDOMAIN\BUILDUSER) not as SYSTEM. If the build now uses this slave, perforce plugin cannot override P4CLIENT variable.

          [JENKINS-16637] problems exposing P4CLIENT and P4PASSWD to env

          Rob Petti added a comment -

          Can you give me more detail about your environment? I'm mostly looking for specific slave OS information, and JVM versions for master and slave.

          Have you verified this behavior by adding a separate build action that does nothing but echo the P4CLIENT env variable? What sort of build actions are you using?

          Rob Petti added a comment - Can you give me more detail about your environment? I'm mostly looking for specific slave OS information, and JVM versions for master and slave. Have you verified this behavior by adding a separate build action that does nothing but echo the P4CLIENT env variable? What sort of build actions are you using?

          Both master and slave are Windows server 2008 (HPC edition) machines with jdk1.7.0_10.

          I also tested with Windows 7 + jdk1.6.0_29 combination, same results.

          We used "Windows batch" build step which simply echoed P4CLIENT. It's rather simple to reproduce.

          Mikko Tapaninen added a comment - Both master and slave are Windows server 2008 (HPC edition) machines with jdk1.7.0_10. I also tested with Windows 7 + jdk1.6.0_29 combination, same results. We used "Windows batch" build step which simply echoed P4CLIENT. It's rather simple to reproduce.

          Rob Petti added a comment -

          What plugin and Jenkins versions are you using?

          Rob Petti added a comment - What plugin and Jenkins versions are you using?

          Rob Petti added a comment -

          I tried to reproduce this, but was not successful. Are you using any kind of environment plugin such as envinject? They have been known to interfere with SCM buildVars.

          Rob Petti added a comment - I tried to reproduce this, but was not successful. Are you using any kind of environment plugin such as envinject? They have been known to interfere with SCM buildVars.

          You were correct. I installed a fresh vanilla jenkins 1.500 + latest perforce plugin. There were no such problems exposing P4CLIENT to the env. But after installing envinject (which we have by default on our own customized jenkins war) the problem was visible. Any idea can this be fixed on perforce plugin at all? Or should we go directly to envinject plugin?

          Mikko Tapaninen added a comment - You were correct. I installed a fresh vanilla jenkins 1.500 + latest perforce plugin. There were no such problems exposing P4CLIENT to the env. But after installing envinject (which we have by default on our own customized jenkins war) the problem was visible. Any idea can this be fixed on perforce plugin at all? Or should we go directly to envinject plugin?

          Rob Petti added a comment -

          Unfortunately it can't be fixed by the perforce plugin. I would double check the options you are using in the envinject plugin and try different combinations. If I recall correctly, some of them cause weird issues with other plugins, especially the "Keep X" checkboxes.

          Rob Petti added a comment - Unfortunately it can't be fixed by the perforce plugin. I would double check the options you are using in the envinject plugin and try different combinations. If I recall correctly, some of them cause weird issues with other plugins, especially the "Keep X" checkboxes.

            Unassigned Unassigned
            strand Markus Strand
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: