-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdocker-entrypoint.sh
executable file
·45 lines (37 loc) · 1.36 KB
/
docker-entrypoint.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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
set -e
if [ "$ENV" = "DEV" ]; then
echo "Running Development Application"
pip install --no-deps -e .
exec python ci_testing_python/app/identidock.py
elif [ "$ENV" = "UNIT_TEST" ]; then
echo "Running Unit Tests"
pip install --no-deps -e .
exec pytest -v -s --cov=./ci_testing_python tests/unit
# exec tox -e unit
elif [ "$ENV" = "CONTRACT_TEST" ]; then
echo "Running Contract Tests"
pip install --no-deps -e .
exec pytest -v -s --cov=./ci_testing_python tests/contract
# exec tox -e contract
elif [ "$ENV" = "INTEGRATION_TEST" ]; then
echo "Running Integration Tests"
pip install --no-deps -e .
exec pytest -v -s --cov=./ci_testing_python tests/integration
# exec tox -e integration
elif [ "$ENV" = "COMPONENT_TEST" ]; then
echo "Running Component Tests"
pip install --no-deps .
exec python ci_testing_python/app/identidock.py
elif [ "$ENV" = "END_TO_END_TEST" ]; then
echo "Running End_To_End Tests"
pip install --no-deps .
exec uwsgi --http 0.0.0.0:9090 --wsgi-file ci_testing_python/app/identidock.py --callable app --stats 0.0.0.0:9191 --py-autoreload 1
elif [ "$ENV" = "PROD" ]; then
echo "Running Production Application"
pip install --no-deps .
exec uwsgi --http 0.0.0.0:9090 --wsgi-file ci_testing_python/app/identidock.py --callable app --stats 0.0.0.0:9191 --py-autoreload 1
else
echo "Please provide an environment"
echo "Stopping"
fi