mirror of
https://github.com/Dannecron/netology-devops-gitlab.git
synced 2025-12-25 15:22:35 +03:00
add test and gitlab-ci
This commit is contained in:
11
test/validate_api.sh
Executable file
11
test/validate_api.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
statusCode=$(curl -s -o /dev/null -w "%{http_code}" http://$PYTHON_API_HOSTNAME:5290/get_info)
|
||||
|
||||
if [ $statusCode == "200" ]; then
|
||||
echo "service available"
|
||||
exit 0
|
||||
else
|
||||
echo "service unavailable"
|
||||
exit 1
|
||||
fi
|
||||
Reference in New Issue
Block a user