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

Environment variables created in the global properties are ignored at build time

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • envinject-plugin
    • None
    • Debian 7.8
      oracle 1.8.0_72
      Jenkins 1.643
      envinject-plugin 1.92.1

      After installing this plugin and without any further configurations, it looks like the environment variables that have been set in the global properties section are removed at build time.
      E.g. we create the environment variable ANT_OPTS="-Djavax.xml.accessExternalSchema=file -Dsvnkit.http.methods=Basic,Digest,Negotiate,NTLM" . However, after installing this plugin our builds are failing because the accessExternalSchema variable is missing.

      Is this the default behaviour for this plugin and if so, is it possible to disable this, or is this just a bug?

      Thanks,
      Benny

          [JENKINS-33390] Environment variables created in the global properties are ignored at build time

          Oleg Nenashev added a comment -

          No, this behavior is not expected. I need to reproduce it.
          Have you updated the Jenkins core at the same time?

          Oleg Nenashev added a comment - No, this behavior is not expected. I need to reproduce it. Have you updated the Jenkins core at the same time?

          Benny Prange added a comment -

          This is an overview of all the plugins that are installed.

          Benny Prange added a comment - This is an overview of all the plugins that are installed.

          Benny Prange added a comment -

          No, I did not update the Jenkins core.

          Benny Prange added a comment - No, I did not update the Jenkins core.

          Benny Prange added a comment -

          I could not reproduce the bug by installing jenkins 1.653 and envinject-plugin 1.92.1.
          I will update the jenkins instance that is affected by this bug and see if it still occurs.

          Benny Prange added a comment - I could not reproduce the bug by installing jenkins 1.653 and envinject-plugin 1.92.1. I will update the jenkins instance that is affected by this bug and see if it still occurs.

          Benny Prange added a comment -

          I've found a way to reproduce this behaviour. This was done using 1.653 and 1.92.1.

          1. java -jar jenkins.war
          2. In the global options, create the environment value FOO=GLOBAL
          3. create a job, shell build step: echo $FOO
          4. execute it, console output shows: + echo GLOBAL
            GLOBAL
          5. stop jenkins
          6. on the commandline: export FOO=CONSOLE
          7. java -jar jenkins.war
          8. execute the same job, console output + echo CONSOLE
            CONSOLE

          Benny Prange added a comment - I've found a way to reproduce this behaviour. This was done using 1.653 and 1.92.1. java -jar jenkins.war In the global options, create the environment value FOO=GLOBAL create a job, shell build step: echo $FOO execute it, console output shows: + echo GLOBAL GLOBAL stop jenkins on the commandline: export FOO=CONSOLE java -jar jenkins.war execute the same job, console output + echo CONSOLE CONSOLE

          Oleg Nenashev added a comment -

          Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize.

          Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

          Oleg Nenashev added a comment - Unfortunately I will not have time to work on EnvInject issues for a while. I decided to unassign all issues so that somebody can take them and finalize. Context: The plugin has been waiting for adoption for ~2 years. During all this time I was trying to keep this plugin afloat by reviewing the incoming pull requests, fixing defects and keeping the codebase up to date to simplify the handover. But I have not been using this plugin on my own so that such maintenance was a bit lame. I invite all active users to contribute to the plugin by taking ownership of this plugin and of EnvInject API. I am happy to provide any required knowledge transfers and do some assistance during the first months of maintenance

            Unassigned Unassigned
            bennyprange Benny Prange
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: