forked from resource-watch/resource-watch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
resourcewatch.sh
executable file
·26 lines (24 loc) · 1.33 KB
/
resourcewatch.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
case "$1" in
test-frontend)
type docker-compose >/dev/null 2>&1 || { echo >&2 "docker-compose is required but it's not installed. Aborting."; exit 1; }
docker-compose -f docker-compose-test.yml build && docker-compose -f docker-compose-test.yml up --abort-on-container-exit --exit-code-from cypress cypress frontend-test-server
;;
test-backend)
type docker-compose >/dev/null 2>&1 || { echo >&2 "docker-compose is required but it's not installed. Aborting."; exit 1; }
docker-compose -f docker-compose-test.yml build && docker-compose -f docker-compose-test.yml up --abort-on-container-exit --exit-code-from backend-test backend-test
;;
start)
type docker-compose >/dev/null 2>&1 || { echo >&2 "docker-compose is required but it's not installed. Aborting."; exit 1; }
docker-compose -f docker-compose-develop.yml build && docker-compose -f docker-compose-develop.yml up
;;
develop)
type docker-compose >/dev/null 2>&1 || { echo >&2 "docker-compose is required but it's not installed. Aborting."; exit 1; }
docker-compose -f docker-compose-develop.yml build && docker-compose -f docker-compose-develop.yml up
;;
*)
echo "Usage: service.sh {test-backend|test-frontend|start|develop}" >&2
exit 1
;;
esac
exit 0