• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • core
    • None
    • Windows XP, Red Hat Enterprise Linux 5

      The global properties system is not working as (I) expected. Tried using the Hudson release plugin, Tasks plugin, Ant build, can't pass any property.

      Steps:
      1. Enter Manage Hudson -> Configure system -> Global properties.
      2. Define a new global property: ABC, value 123.
      3. Try to access it from a task, from the release plugin, from an Ant build (via command line), using the documented syntax:
      $ABC or ${ABC}.
      4. Result - no replacement.

      This is pretty serious for us since we have lots of jobs. For example several plugins use system tools: Maven 2, SVN, ... We've already configured the paths to these tools, several versions even, in the global Hudson configuration.
      However, because of this bug, we have to replicate them for every job. Error prone and added complexity.

          [JENKINS-5312] Global properties not being replaced

          akusuma added a comment -

          I have also tried this feature but does not work well.
          I set up a global variable ("Manage Hudson" - "Configure System" - "Global Properties" - "Environment variables") for my subversion repository so that I can refer to in the jobs that I have.
          Unfortunately, the variable is never set (tried $VARIABLE_NAME and ${VARIABLE_NAME} syntax).

          akusuma added a comment - I have also tried this feature but does not work well. I set up a global variable ("Manage Hudson" - "Configure System" - "Global Properties" - "Environment variables") for my subversion repository so that I can refer to in the jobs that I have. Unfortunately, the variable is never set (tried $VARIABLE_NAME and ${VARIABLE_NAME} syntax).

          dmichonneau added a comment -

          not working as well for shell commands and P4 plugin configuration

          dmichonneau added a comment - not working as well for shell commands and P4 plugin configuration

          sdashottar added a comment -

          Has there been any resolution on this issue. I am facing similar issue.
          I set an environment variable in global configure page and can access it in email notifications but modifications to the variable are not been reflected

          sdashottar added a comment - Has there been any resolution on this issue. I am facing similar issue. I set an environment variable in global configure page and can access it in email notifications but modifications to the variable are not been reflected

          mattbilson added a comment -

          I'm experiencing the same issue.

          Is there a workaround/different way to set a global ant property?

          mattbilson added a comment - I'm experiencing the same issue. Is there a workaround/different way to set a global ant property?

          Thomas McMurray added a comment - - edited

          I've got the same issue, running 1.515. More info. If the env variable is set before you start Jenkins, any changes you make on Configure System Global Properties are ignored. However, if you use the envinject plugin for the job, they are respected.

          Thomas McMurray added a comment - - edited I've got the same issue, running 1.515. More info. If the env variable is set before you start Jenkins, any changes you make on Configure System Global Properties are ignored. However, if you use the envinject plugin for the job, they are respected.

          I just noticed this problem and I don't remember it being this way on previous releases of jenkins. This only happens on my slaves running 1.510 and remoting 2.23

          Walter Kacynski added a comment - I just noticed this problem and I don't remember it being this way on previous releases of jenkins. This only happens on my slaves running 1.510 and remoting 2.23

          Sebastian M. added a comment - - edited

          This also happens on 1.509.3 LTS. Did not happen with Hudson (www.hudson-ci.org) though, so this is Jenkins specific.

          Sebastian M. added a comment - - edited This also happens on 1.509.3 LTS. Did not happen with Hudson (www.hudson-ci.org) though, so this is Jenkins specific.

          Oleg Nenashev added a comment -

          Assigned the issue to a proper component.

          Oleg Nenashev added a comment - Assigned the issue to a proper component.

          Daniel Beck added a comment -

          This needs to be reproduced on a recent Jenkins version with clear instructions how to reproduce.

          Note that global properties are provided mostly as environment variables to build steps, so run set (Windows, Batch build step) or env (Linux, Shell build step) to see whether it's actually not defined, or just not passed to e.g. Ant as system property.

          Also, need to reproduce with EnvInject plugin disabled if you're filing a core bug.

          Daniel Beck added a comment - This needs to be reproduced on a recent Jenkins version with clear instructions how to reproduce. Note that global properties are provided mostly as environment variables to build steps, so run set (Windows, Batch build step) or env (Linux, Shell build step) to see whether it's actually not defined, or just not passed to e.g. Ant as system property. Also, need to reproduce with EnvInject plugin disabled if you're filing a core bug.

          I don't remember when this started working but under 1.532.2 and EnvInject 1.89, this is no longer a problem. In the release notes for EnvInject 1.88 this problem has been corrected.

          Walter Kacynski added a comment - I don't remember when this started working but under 1.532.2 and EnvInject 1.89, this is no longer a problem. In the release notes for EnvInject 1.88 this problem has been corrected.

            ccaraivan Costin Caraivan
            ccaraivan Costin Caraivan
            Votes:
            13 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved: