forked from zebrunner/community-edition
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstop.sh
More file actions
executable file
·48 lines (44 loc) · 1.14 KB
/
stop.sh
File metadata and controls
executable file
·48 lines (44 loc) · 1.14 KB
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#!/bin/bash
KEEP_CONTAINERS=false
echo_help() {
echo "
Flags:
--keep-containers | -k keep containers
For more help join telegram channel https://t.me/qps_infra"
exit 0
}
for arg in "$@"
do
case $arg in
--help | -h)
echo_help;
shift
;;
--keep-containers | -k)
KEEP_CONTAINERS=true;
shift
;;
*)
echo "There's no such parameter" $arg
echo_help
;;
esac
done
if $KEEP_CONTAINERS
then
docker-compose -f jenkins/docker-compose.yml stop
docker-compose -f reporting-service/docker-compose.yml stop
docker-compose -f sonarqube/docker-compose.yml stop
# docker-compose -f mcloud/docker-compose.yml stop
docker-compose -f selenoid/docker-compose.yml stop
docker-compose stop
echo "Containers were stopped"
else
docker-compose -f jenkins/docker-compose.yml down
docker-compose -f reporting-service/docker-compose.yml down
docker-compose -f sonarqube/docker-compose.yml down
# docker-compose -f mcloud/docker-compose.yml down
docker-compose -f selenoid/docker-compose.yml down
docker-compose down
echo "Containers were stopped and deleted"
fi