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

Predefined parameters do not expand variables properly

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Labels:
      None
    • Environment:
      Jenkins ver. 1.645, plugin version: "2.30", os opensuse/linux
    • Similar Issues:

      Description

      When chaining multiple jobs by using the option "Trigger/call builds on other projects", expanding variables in field "Predefined parameters" does not work properly.

      Example where the first variable gets not expanded in any of the forms below:

      step_number=$TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME

      ---returns "$TRIGGERED_BUILD_NUMBER_correct_job_name"

      step_number=${TRIGGERED_BUILD_NUMBER_${LAST_TRIGGERED_JOB_NAME}}

      ---returns "$

      {TRIGGERED_BUILD_NUMBER_correct_job_name}

      "

      step_number=$

      {TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME}

      ---returns the same as the second one

      It would be practical to provide the value for TRIGGERED_BUILD_NUMBER with implicit last project name, or add new variable like LAST_BUILD_NUMBER that would provide it.
      Thanks.

        Attachments

          Activity

            People

            • Assignee:
              huybrechts huybrechts
              Reporter:
              vmoravec vlad morav
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: