Onur Yasarlar
  • About Me
  • Linux
    • How to Install KVM on CentOS 7/8 and Ubuntu 18/20
    • How to Install VirtualBox on CentOS 7/8 and Ubuntu 18
    • How to Install Vagrant on Centos 7/8 and Ubuntu 18
    • Using vim Effectively
  • Kubernetes
    • How to Install a Kubernetes Cluster
      • Installing Prerequisites for Kubernetes Cluster Installation
      • Installing Container Runtime Interface
      • Installing kubeadm
    • How to Install and Use K3D
  • CI/CD
    • GitLab CICD Pipeline Concepts
      • Stages
    • Quick Introduction to GitLab CICD Pipelines
    • How to install custom Gitlab runners with libvirt executor
  • Azure
    • Azure Infrastructure Automation with Gitlab CI
  • TERRAFORM
    • How to create a Terraform Module
Powered by GitBook
On this page

Was this helpful?

  1. CI/CD
  2. GitLab CICD Pipeline Concepts

Stages

PreviousGitLab CICD Pipeline ConceptsNextQuick Introduction to GitLab CICD Pipelines

Last updated 2 years ago

Was this helpful?

Stages define the order of the pipeline. We can think of stages as the flowchart of our pipeline. Let's assume we are writing a pipeline for a Maven project. The typical order for a Maven project (or any other software development project) is:

  1. Build

  2. Test

  3. Deploy

Each above step is called a stage in GitLab CI terminology and the tasks under the stages run sequentially.

We can have multiple Java versions to test our code against and it is efficient to run our tests in parallel.

The jobs under the same stage run in parallel and the job(s) in the next stage can only start if the previous stage is finished.

Let's also show how we can define the stages in .gitlab-ci.yml file:

stages:
  - build
  - test
  - deploy

GitLab CI pipelines are mostly formed around software development. If you do not define any stages in your pipeline, the default pipeline stages are:

  • .pre

  • build

  • test

  • deploy

  • .post