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

Run-conditions should also expand Parameters and ENV variables

    Details

    • Type: Improvement
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Component/s: run-condition-plugin
    • Labels:
      None
    • Environment:
      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,
    • Similar Issues:

      Description

      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]

        Attachments

          Activity

          Hide
          cjo9900 cjo9900 added a comment -

          pull request opened for adding this improvement

          https://github.com/jenkinsci/run-condition-plugin/pull/1

          Show
          cjo9900 cjo9900 added a comment - pull request opened for adding this improvement https://github.com/jenkinsci/run-condition-plugin/pull/1
          Hide
          cjo9900 cjo9900 added a comment -
          Show
          cjo9900 cjo9900 added a comment - Resolved in commit https://github.com/jenkinsci/run-condition-plugin/commit/d22633371add636a0bc6fc9ca6c96f329559b2b1 Released in version 0.7

            People

            • Assignee:
              cjo9900 cjo9900
              Reporter:
              cjo9900 cjo9900
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: