A service in IceCI is a container that is running during the whole pipeline execution. Services let you run backing containers for your pipeline - for example a PostgreSQL database for your integration tests.

Every service has a name - in the pipeline it can be resolved using this name. If you create a website service, running curl http://website command in your pipeline step will hit the website service assuming that it’s a container listening on port 80 (like nginx, for example).


The pipeline will stop all services after finishing - regardless of the pipeline result.


If a service stops during the pipeline execution, the pipeline will fail no matter what was the exit code of the service main process.


Hitting an nginx service

Below is an example of a working pipeline running a website service and a step1 step that will curl the nginx container running as the website service.

- name: website
  image: nginx

- name: step1
    image: iceci/utils
    script: "curl http://website/"

Further reading

Service reference can be found in the service section.