File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 66RED=' \033[0;31m'
77GREEN=' \033[0;32m'
88NC=' \033[0m'
9+ DOCKERCOMPOSE=' docker compose'
10+ if type ' docker-compose' > /dev/null 2>&1 ; then
11+ # fallback to docker-compose v1
12+ DOCKERCOMPOSE=' docker-compose'
13+ fi
914
1015# kill and remove any running containers
1116cleanup () {
12- docker compose -p ci kill
13- docker compose -p ci rm -f
17+ ${DOCKERCOMPOSE} -p ci kill
18+ ${DOCKERCOMPOSE} -p ci rm -f
1419}
1520
1621# catch unexpected failures, do cleanup and output an error message
1722trap ' cleanup ; printf "${RED}Tests Failed For Unexpected Reasons${NC}\n"' HUP INT QUIT PIPE TERM
1823
1924# build and run the composed services
20- docker compose -p ci build && docker compose -p ci up -d
25+ ${DOCKERCOMPOSE} -p ci build && ${DOCKERCOMPOSE} -p ci up -d
2126if (( $? != 0 )) ; then
2227 printf " ${RED} Docker Compose Failed${NC} \n"
2328 exit -1
You can’t perform that action at this time.
0 commit comments