-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
Jenkins ver. 1.645, plugin version: "2.30", os opensuse/linux
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.
[JENKINS-32583] Predefined parameters do not expand variables properly
Description |
Original:
When chaining multiple jobs and using the option "Trigger/call builds on other projects", expanding variables in field "Predefined parameters" does not work properly. Example where the variables get not expanded in any form: step_number=$TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME step_number=${TRIGGERED_BUILD_NUMBER_${LAST_TRIGGERED_JOB_NAME}} step_number=${TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME} Is this intentional? |
New:
When chaining multiple jobs and using the option "Trigger/call builds on other projects", expanding variables in field "Predefined parameters" does not work properly. Example where the variables get not expanded in any of the forms below, they are returned as strings exactly as they are typed below: step_number=$TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME step_number=${TRIGGERED_BUILD_NUMBER_${LAST_TRIGGERED_JOB_NAME}} step_number=${TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME} Is this intentional? |
Description |
Original:
When chaining multiple jobs and using the option "Trigger/call builds on other projects", expanding variables in field "Predefined parameters" does not work properly. Example where the variables get not expanded in any of the forms below, they are returned as strings exactly as they are typed below: step_number=$TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME step_number=${TRIGGERED_BUILD_NUMBER_${LAST_TRIGGERED_JOB_NAME}} step_number=${TRIGGERED_BUILD_NUMBER_$LAST_TRIGGERED_JOB_NAME} Is this intentional? |
New:
When chaining multiple jobs and 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 Is this intentional? |
Description |
Original:
When chaining multiple jobs and 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 Is this intentional? |
New:
When chaining multiple jobs and 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 Is this intentional? |
Description |
Original:
When chaining multiple jobs and 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 Is this intentional? |
New:
When chaining multiple jobs and 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 Is this intentional? |
Environment | Original: Jenkins ver. 1.645, opensuse/linux | New: Jenkins ver. 1.645, plugin version: "2.30", os opensuse/linux |
Summary | Original: Predefined parameters does not expand | New: Predefined parameters do not expand variables properly |
Description |
Original:
When chaining multiple jobs and 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 Is this intentional? |
New:
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 Is this intentional? |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Description |
Original:
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 Is this intentional? |
New:
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 Maybe would be enough to provide the value for TRIGGERED_BUILD_NUMBER w |
Description |
Original:
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 Maybe would be enough to provide the value for TRIGGERED_BUILD_NUMBER w |
New:
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 Maybe it would be practical to provide the value for TRIGGERED_BUILD_NUMBER with implicit last project name. Thanks. |