Writing a multiline command in configuration file

circle.yml

#1

Hello everyone.
Is there a way to write a multiline command in the yaml configuration file?

Something like

test:
  override:
      if something
      then
        echo 'something'
      else
        echo 'something else'
      fi

Thanks and have a nice day


#2

You could put it into a bash script and execute that script


#3

Thanks for you reply.
I’d rather keeping everything in circle.yml.


#4

I stumbled upon the following:)

test:
  post:
    - >
      if [ -n "${RUN_NIGHTLY_BUILD}" ]; then
        ./bin/run-functional-tests.sh ${FUNCTIONAL_TEST_TARGET};
      fi

See: https://circleci.com/docs/nightly-builds


#5

Thanks man.


#6