Services run side-by-side with CI jobs
Services can be declared using the services
keyword
Services are accessed using the image
name (or an alias
)
Services are available for runners with Docker/Kubernetes executor
GitLab only starts the service
No guarantee of availability
Recommendation: Implement in dedicated project
Add top-level service based on nginx
services:
- nginx:1.20.2
Access service from job
test:
script:
- curl -s http://nginx
Check pipeline
See new .gitlab-ci.yml
:
git checkout origin/160_gitlab_ci/220_services -- '*'