Services


Services

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)

GitLab only starts the service

No guarantee of availability


Hands-On

Recommendation: Implement in dedicated project

  1. Add top-level service based on nginx

     services:
     - nginx:1.20.2
    
  2. Access service from job

     test:
       script:
       - curl -s http://nginx
    
  3. Check pipeline

(See .gitlab-ci.yaml)