Docker-compose exists with exit code 1, but the build still succeeds


#1

I am running my cucumber test cases in a docker container.

The section of the circleci.yml
- run:
name: 'Run Cucumber Tests’
command: |
export DIANA_SOURCE_DIR=~/repo
export CIRCLE_TEST_REPORTS=/tmp/test-results
mkdir ${CIRCLE_TEST_REPORTS}/cucumber

        echo "----====>>>docker-compose with ${DIANA_SOURCE_DIR}"
        docker login -u _json_key -p "${DIANA_GCP_JSON_KEY}" https://gcr.io
        # Wow. I have no clue why I had to split this up, but I did.
        docker-compose up -d mongo
        docker-compose up -d redis
        docker-compose up -d circleci-dev
        docker-compose up -d selenium-chrome-standalone
        docker-compose up circleci-test

        docker cp diana:/app/cucumber/junit.xml ${CIRCLE_TEST_REPORTS}/cucumber/

docker-compose up circleci-test fails with exit code 1.
The next command puts my test output someplace I can get to it.
What do I need to do to make the build fail if this happens?

Beginning of log
#!/bin/bash -eo pipefail
export DIANA_SOURCE_DIR=~/repo
export CIRCLE_TEST_REPORTS=/tmp/test-results
mkdir ${CIRCLE_TEST_REPORTS}/cucumber

echo “----====>>>docker-compose with {DIANA_SOURCE_DIR}" docker login -u _json_key -p "{DIANA_GCP_JSON_KEY}” https://gcr.io

Wow. I have no clue why I had to split this up, but I did.

docker-compose up -d mongo
docker-compose up -d redis
docker-compose up -d circleci-dev
docker-compose up -d selenium-chrome-standalone
docker-compose up circleci-test

docker cp diana:/app/cucumber/junit.xml ${CIRCLE_TEST_REPORTS}/cucumber/
… Tons of BS
diana-test exited with code 1
End of log


#2

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.