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

Default value appears in axes when there's an input variable

XMLWordPrintable

      The plugin continuously adds the 'default' axis value even if there's an existing variable in the environment.Dynamic axis source: String parameter.

      The issue appears on the particular job only and cannot be reproduced on others. Job reloading does not resolve the issue.

      Cause in DynamicAxis::rebuild():
      1. method flushes the internal axis values cache
      2. method calls build.getEnvironment to get the variable value
      3. an external plugin (Perforce SCM in my case) calls DynamicAxis.getValues() to resolve variables
      4. DynamicAxis.getValues() adds 'default', because the cache is empty
      ....
      X. method adds variables from the variable, but 'default' still exists in the list

      System log on 1 config (reverse order):
      Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis
      FINE: Returning axis list [default, 1]
      Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis
      FINE: Variable value is '1'
      Mar 04, 2015 11:01:38 AM ca.silvermaplesolutions.jenkins.plugins.daxis.DynamicAxis
      FINE: Rebuilding axis names from variable 'NUMBER_FILES'

            oleg_nenashev Oleg Nenashev
            oleg_nenashev Oleg Nenashev
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: