Conditional expression bash script

Hi Circle friends,

Based on documentation, I know conditional expressions can refer to parameters, but I was wondering if they could use the output of a bash script (ie. 1 or 0)?

version: 2.1

    jobs: # conditional steps example
      job_with_conditional_steps:
        machine: true
        steps:
          - when:
              condition: ./script_returning_tf.bash
              steps:
                - run: echo "my script returned true"
          - unless:
              condition: ./script_returning_tf.bash
              steps:
                - run: echo "my script returned false"

I appreciate your help in advance!!!

Cheers,
Andrew

Hi Andrew,

You cannot run your config as is. However, you can use the when attribute together with on_success and on_fail values to achieve your desired goal. You can have a look at some examples here: https://circleci.com/docs/2.0/configuration-reference/#the-when-attribute