Kubernetes-container-service-GitLab-sample
Kubernetes-container-service-GitLab-sample copied to clipboard
cURL http://localhost:30080/-/liveness in CI
Issue description
IBM/Kubernetes-container-service-GitLab-sample#29 added tests/test-docker-compose.sh, which verifies GitLab is up via docker-compose ps
and nc -z -v localhost 30080
. While this tells us if the containers are up and if port 30080 is reachable, it does not effectively check for GitLab being functional.
Suggestion
While writing tests/test-docker-compose.sh, I looked into GitLab's Health Check documentation. This was not working (throwing 404s in my testing), but would give us JSON with status for GitLab services. If we get GitLab Health Checks working, we can cURL http://localhost:30080/-/liveness and process the results.
Update
- Upon further reading, it became obvious that 404s from /-/liveness and /-/readiness are expected behavior when not coming from a whitelisted IP address or using the admin token
- The trick would be to either:
- Figure out what address Travis CI is hitting GitLab from and add it to the whitelist
- Programmatically grab the admin token and use it in the URL
- The trick would be to either: