Ravindra BagaleCourses & study guides मराठी

Chapter 92: GitLab CI Deep Dive

DevOps

92.14 Comparison — GitLab CI vs GitHub Actions vs Jenkins

Story (fictional teaching scenario). In a fictional client meeting in Visakhapatnam, Emre from Ankara asked which CI to standardise on. Swati gave a short answer: the one next to your code, unless you have a strong reason. Their code was on GitLab, so GitLab CI. A sister team on GitHub kept GitHub Actions. An old on-prem system kept Jenkins until it was replaced.

Pick the CI built into your code host unless on-prem control or plugins force Jenkins.
Pick the CI built into your code host unless on-prem control or plugins force Jenkins.

Why

Interviewers ask, and teams waste months arguing. Clear trade-offs end the argument.

What

Comparison card: GitLab CI vs GitHub Actions vs Jenkins
Comparison card: GitLab CI vs GitHub Actions vs Jenkins
Topic GitLab CI GitHub Actions Jenkins
File .gitlab-ci.yml .​github/​workflows/*.​yml Jenkinsfile
Unit of work Stages and jobs Jobs and steps Stages and steps
Where jobs run GitLab runners (shared or self-managed) GitHub-hosted or self-hosted runners Jenkins agents
Order stages, plus needs graph parallel jobs, plus needs stages in order, parallel blocks
One deploy at a time resource_group concurrency lockable resources plugin
Human approval when: manual + protected environments environments with reviewers input step
Reuse include, extends, components reusable workflows, actions shared libraries

How

  1. Start from where the code lives.
  2. Check hard needs: on-prem, special plugins, approvals, budget.
  3. Pick one main CI per team.

Example 1: The same test job three ways

GitLab CI:       unit-test: { script: ["python -m pytest -q"] }
GitHub Actions:  steps: - run: python -m pytest -q
Jenkins:         stage('Test') { steps { sh 'python -m pytest -q' } }

What it means: The command is identical. Only the wrapper changes.

Example 2: One-at-a-time deploy three ways

GitLab CI:       resource_group: production
GitHub Actions:  concurrency: { group: deploy-prod }
Jenkins:         lock('production') { ... }   (Lockable Resources plugin)

What it means: All three can stop two production deploys racing. Learn the keyword for your tool.

Ravindra Bagale's Tip

Say it plainly: same ideas, different file names. Then name one real difference, like resource_group in GitLab or environments in Actions.

Did you understand? Let us try it once more.