Starting a service fails

circle.yml

#1

In our build configurations we have few services we need to start before running the tests. We start these services with a shell script. So the configuration looks like this:

test:
    pre:
    - ./Scripts/deploy_all_to_esb.sh
    - ./Scripts/esb.sh start

    override:
    - mvn verify

But for some reason the esb.sh start command didn’t start the service even though it printed to the console all echoes from the script.

But if we add sleep to the script, it works…or if we change the configuration to this, it fixes the problem:

test:
    pre:
    - ./Scripts/deploy_all_to_esb.sh

    override:
    -  ./Scripts/esb.sh start; mvn verify

Any idea why this happens?


#2