Breaking down .gitlab-ci.yml

Continuous integration and continuous deployment in GitLab is described and defined by a project's .gitlab-ci.yml file. The file format is YAML (an acronym of yet Another markup language), which is a human-readable text file that's used for storing data, and can be converted into digital representations by a computer. This document is stored in the root directory of your repository and outlines all of the stages and work required for the CI/CD to run.

A basic .gitlab-ci.yml file might look something like this:

before_script:  - apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ca-certificates git php php-xml  - php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"  

Get GitLab Quick Start Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.