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

Run-conditions should also expand Parameters and ENV variables

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Major Major
    • run-condition-plugin
    • None
    • Jenkins 1.446 on RHEL 6
      Plugin:run-condition, 0.6,
      Plugin:flexible-publish, 0.7
      Plugin:token-macro, 1.5.1,
      Plugin:conditional-buildstep,
      Plugin:any-buildstep, 0.1,

      Set up a job, where the job is has options set for
      This build is parameterized
      Set a STRING/Choice parameter called TEST_STRING_PARM

      add a Post-build Actions -> Flexible publish item
      and set Run? = "Strings Match"

      Set String 1 = $TEST_STRING_PARM
      Set String 2 = test_value
      Set any action to be called here

      Save and build

      Build log gives Exception that it cannot expand the macro, and fails the build.

      Run condition [Always] enabling perform for step [Trigger parameterized build on other projects]
      Exception caught evaluating condition: [org.jenkinsci.plugins.tokenmacro.MacroEvaluationException: Unrecognized macro 'CONFIG_ENABLE_TASKS' in '$CONFIG_ENABLE_TASKS'], action = [Fail the build]

            cjo9900 cjo9900
            cjo9900 cjo9900
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: