Quantcast
Channel: CircleCI Discuss - Latest posts
Viewing all articles
Browse latest Browse all 14870

Conditional expression bash script

$
0
0

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


Viewing all articles
Browse latest Browse all 14870

Trending Articles