Book Image

GitLab Quick Start Guide

By : Adam O'Grady
Book Image

GitLab Quick Start Guide

By: Adam O'Grady

Overview of this book

Gitlab is an open source repository management and version control toolkit with an enterprise offering. This book is the ideal guide to GitLab as a version control system (VCS), issue management tool, and a continuous integration platform. The book starts with an introduction to GitLab, a walkthrough of its features, and explores concepts such as version control systems, continuous integration, and continuous deployment. It then takes you through the process of downloading and installing a local copy of the on-premise version of GitLab in Ubuntu and/or CentOS. You will look at some common work?ows associated with GitLab work?ow and learn about project management in GitLab. You will see tools and techniques for migrating your code base from various version control systems such as GitHub and SVN to GitLab. By the end of the book, you will be using Gitlab for repository management, and be able to migrate projects from other VCSs to GitLab.
Table of Contents (10 chapters)

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:

- apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq ca-certificates git php php-xml
- php -r "copy('', 'composer-setup.php');"
- php composer-setup.php
- php composer.phar install

- vendor/bin/phpunit...