CI servers compared: Jenkins, GitLab CI and Actions

Intermediate · 5 min

The same two-stage pipeline in GitHub Actions, GitLab CI and a Jenkinsfile, and the real differences: hosting, runners, plugins, and where the config lives.

Before thisAnatomy of a pipeline: stages, jobs and gatesBuild artifacts and artifact repositories

Vishakha Sadhwani · 10 min · from 4:17

CI servers compared: Jenkins, GitLab CI and Actions

The player loads from youtube-nocookie.com when you press play. Nothing reaches YouTube before that.

Taught by Vishakha SadhwaniReport a problem with this video
Not started
Set this lesson's status

What you'll learn

  • All three tools model the same thing: a pipeline file in the repository, triggers, ordered stages or dependent jobs, steps that run shell commands, and artifacts passed between them.
  • GitHub Actions orders work by job dependencies with needs, GitLab CI by named stages, and a Jenkinsfile by stages in a Groovy DSL.
  • Jenkins is self-hosted and extended by plugins, which gives total control and makes you responsible for patching the server, its agents and every plugin.
  • GitHub Actions and GitLab CI are built into their code hosts, with hosted runners available and the option to run your own.
  • Choose mostly by where your code lives and who will operate the CI system. The pipeline concepts transfer, and the syntax is learnable in a day.

Many products, one idea

Everything in this group so far has been tool-agnostic: stages, jobs and gates, tests, artifacts. At some point you have to pick a product that runs it. You will meet three most often:

  • Jenkins, the open-source automation server that grew out of Hudson around 2011. It is self-hosted and extended with plugins.
  • GitLab CI/CD, built into GitLab, configured by .gitlab-ci.yml.
  • GitHub Actions, built into GitHub since 2019, configured by YAML files in .github/workflows/.

CircleCI, Buildkite, Azure Pipelines, Tekton and others exist and are fine. The concepts carry over.

The same pipeline three ways

To compare like with like, I wrote one pipeline in all three: on a pull request or a push to main, install dependencies and run the tests, then build and keep dist/ as an artifact.

GitHub Actions, .github/workflows/ci.yml:

name: CI
on:
  push:
    branches: [main]
  pull_request:
jobs:
  test:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - uses: actions/setup-node@v7
        with:
          node-version: 24
      - run: npm ci
      - run: npm test
  package:
    needs: test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v7
      - run: npm ci && npm run build
      - uses: actions/upload-artifact@v7
        with:
          name: dist
          path: dist/

GitLab CI, .gitlab-ci.yml:

stages: [test, package]
default:
  image: node:24
workflow:
  rules:
    - if: $CI_PIPELINE_SOURCE == "merge_request_event"
    - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
test:
  stage: test
  script:
    - npm ci
    - npm test
package:
  stage: package
  script:
    - npm ci
    - npm run build
  artifacts:
    paths: [dist/]

Jenkins, a declarative Jenkinsfile:

pipeline {
  agent { docker { image 'node:24' } }
  stages {
    stage('Test') {
      steps {
        sh 'npm ci'
        sh 'npm test'
      }
    }
    stage('Package') {
      when { branch 'main' }
      steps {
        sh 'npm run build'
        archiveArtifacts artifacts: 'dist/**'
      }
    }
  }
}

What I ran and what I didn’t. I have no GitHub, GitLab or Jenkins instance here, so none of these pipelines was executed. I wrote them from each tool’s documentation. The action versions are real: actions/checkout v7.0.1 and actions/upload-artifact v7.0.2 were the latest releases when I checked GitHub on 2026-11-27. I parsed both YAML files with Python to prove they are well formed and to read back the structure:

actions jobs: {'test': '-', 'package': 'test'}
actions 'on' key parsed as: [True]
gitlab stages: ['test', 'package'] jobs: {'test': 'test', 'package': 'package'}

That second line is a real YAML quirk. PyYAML follows YAML 1.1, where a bare on means boolean true, so the key came back as True. GitHub’s parser reads it as the string on, so the workflow is fine. It only bites if your own scripts parse workflow files. The Jenkinsfile is Groovy, so I couldn’t validate it without Jenkins. The docker agent also needs the Docker Pipeline plugin and Docker on the agent.

What the syntax reveals

The files are about the same length and the shapes line up, but each tool orders work differently.

  • Actions has no stages. Jobs run in parallel unless one declares needs. The order is a graph you build from dependencies.
  • GitLab has explicit stages. Every job in a stage must pass before the next stage starts. It also supports needs for a graph when stages are too coarse.
  • Jenkins declarative pipelines have stages in a Groovy DSL, with a script block that drops into full Groovy when you need logic. That power is also how Jenkinsfiles turn into unreadable programs.

Reuse differs too: Actions has the marketplace and reusable workflows, GitLab has include and a CI component catalog, and Jenkins has shared libraries.

The differences that actually matter

Syntax takes a day to learn. These take longer to live with.

  • Who runs it. Jenkins is software you operate: a controller, build agents, Java, and a plugin ecosystem. The current long-term-support line, 2.580.x, is one of many you will upgrade through. Plugins are both Jenkins’s strength and its main source of breakage and security advisories. Actions and GitLab.com run the control plane for you.
  • Runners. All three can run jobs on your own machines. Actions and GitLab also offer hosted runners billed by the minute. Self-hosted runners are cheaper at scale and can reach private networks, but they are servers you have to secure. Runners and the marketplace covers the trade-offs for Actions.
  • Integration with the code host. Built-in CI knows about pull requests, required checks, environments and permissions out of the box. Jenkins does this through plugins and webhooks.
  • Where it can run. Jenkins and GitLab can be fully self-hosted, which matters for air-gapped or regulated environments. GitHub Enterprise Server also exists, but most Actions use is on github.com.

A practical rule: use the CI that comes with your code host unless you have a specific reason not to. Common reasons are a regulated on-premises environment, an existing Jenkins estate with years of pipelines, or builds needing hardware the hosted runners lack. Many companies run Jenkins for a long time because migrating hundreds of pipelines costs more than keeping it.

About the video

The embed is a 4½-minute clip from Vishakha Sadhwani’s “CI/CD CRASH COURSE For Beginners | Jenkins, GitHub Actions, GitLab” (June 2026, nearly 10 minutes in full). It starts at the Jenkins chapter and runs through GitHub Actions and GitLab CI, stopping before a chapter on Harness AI and the takeaways. Its description says it covers how these tools work and their trade-offs. The opening minutes on CI and CD definitions are skipped, since earlier lessons cover them. I had no transcript, so this is from the title, description and chapters. English was judged from the same metadata. For a round-by-round comparison of Actions and GitLab only, see Thetips4you’s 2026 video under deeper.

Where this fits

That completes continuous integration. The next group takes the artifact from a green build to users, starting with the distinction people blur most often: continuous delivery vs continuous deployment.

Check yourself

  1. 01In GitLab CI, how do you make a packaging job run only after tests pass?

    Put the test job in an earlier stage and the packaging job in a later one in the stages list. Jobs in a later stage start only when every job in the earlier stage has succeeded.

  2. 02What is the main operational cost of Jenkins compared to hosted CI?

    You run it. The controller, the build agents, Java updates and dozens of plugins all need patching and upgrading, and plugin compatibility problems are a common source of breakage and security issues.

  3. 03Why does it make sense for most teams to use the CI built into their code host?

    Pull requests, status checks, permissions and secrets are already integrated, there is no extra server to run, and hosted runners remove most of the maintenance.

  4. 04A YAML parser read the key on in a GitHub workflow as the boolean True. Is the workflow broken?

    No. YAML 1.1 parsers such as PyYAML treat a bare on as a boolean, but GitHub's own parser reads it as the key on. It only matters if your own tooling parses workflow files, in which case look up the True key or quote 'on'.

Go deeper

Notes

Private to you

Esc
↑↓ navigate↵ open? shortcuts

Keyboard shortcuts

Press Esc to close

Anywhere

⌘K
Search and commands
/
Search
?
This sheet
Esc
Close

Reading a lesson

J
Next lesson
K
Previous lesson
B
Bookmark