Overview
You can pass the pipeline values within an orb to jobs. This article explains how to troubleshoot an issue when passing the values.
Cases and steps
- Case 1
You may see the error message below on a job result.
Job: command not found
This error may happen because the bash interpreter is treating "$fail_only"==
as a command named since there's no space after the variable. Please check if there is a missing space in this case.
if [ "$BUILD_STATUS" == "success" ] && [ "$fail_only"== "false" ]; then
- Case 2
You can confirm that the value is passed, but the result is not what you expected, especially for a boolean value. For instance, false
is passed to the variable $fail_only
, but the following conditional statement is not executed.
if [ "$fail_only" == "false" ]; then
It may happen because the boolean values true
and false
can be interpreted as 1
and 0
instead. You can resolve this issue by comparing 0
instead of false
.
Comments
Please sign in to leave a comment.