Skip to content
masdzub.com
~/articles/devops — one from the notebook

Architectural Comparison: Jenkins vs. GitLab CI vs. GitHub Actions

Compare agent-based vs. serverless CI architectures. Technical trade-offs, deployment patterns, and agent management.

masdzub@website:~$ cat ~/articles/jenkins-gitlab-ci-and-github-actions-architectural-analysis.aspx.md
# 1 file · 3 min read · topic: devops · status: published

Introduction

Jenkins, GitLab CI, and GitHub Actions represent three distinct architectural approaches to CI/CD. Jenkins uses a master-agent model requiring self-hosted infrastructure. GitLab CI integrates directly into the GitLab repository using runners. GitHub Actions operates as a cloud-native orchestrator managing ephemeral Docker containers. Select the architecture based on your infrastructure control requirements versus the desire for managed scale.

The Agent Model: Jenkins

Jenkins relies on a Controller and Agent architecture. You must run an instance of Java (OpenJDK) to host the Controller. The Controller manages the build pipeline and dispatches tasks to Agents. Agents are separate processes that execute the actual build steps.

This architecture offers granular control over the build environment. You can define custom Docker images or use legacy software installed directly on the node. The downside is the operational overhead. You must maintain the Controller, manage Agent connectivity, and handle Java heap size issues.

Trade-offs

  • Pros: Maximum control over the build environment. Supports complex logic and custom plugins. Self-hosted by default.
  • Cons: High operational overhead. Requires Java runtime. Scaling agents often requires adding physical or virtual machines.

The Runner Model: GitLab CI

GitLab CI is tightly coupled with the GitLab platform. You define jobs in .gitlab-ci.yml. These jobs run on registered Runners. Runners can be hosted on your infrastructure, Docker containers, or managed by GitLab itself.

The Runner connects to the GitLab API, receives a job, and executes the defined script. This model reduces the need to manage a separate controller for CI logic. It works best when your monorepo lives in GitLab.

Trade-offs

  • Pros: Zero configuration for basic jobs. Native integration with GitLab security scanners and artifacts. Efficient use of shared runners.
  • Cons: Tight coupling with GitLab. Scaling runners manually requires infrastructure management.

The Orchestrator Model: GitHub Actions

GitHub Actions uses a serverless architecture. You write workflows in YAML files. GitHub manages the execution environment. The runner is a Docker container spawned for the workflow job.

The orchestrator handles the state of the workflow, retries, and matrix builds automatically. This removes the need to provision servers for every build. You pay for the minutes used in the cloud.

Trade-offs

  • Pros: No infrastructure to manage. Ephemeral environments prevent state leakage. Huge marketplace of pre-built actions.
  • Cons: Vendor lock-in. Costs can scale quickly with parallel jobs. Self-hosted runners add management complexity.

Troubleshooting Common Issues

Jenkins: “Agent is offline”

Error: Connection refused or Agent is offline. Cause: The Agent process on the target machine stopped or the network firewall blocked the connection. Fix: Check jenkins-agent.jar logs on the agent. Ensure port 50000 is open on the agent machine and reachable from the controller.

GitLab CI: “Job failed: Glitch in system”

Error: Generic failure with no specific log output. Cause: The Runner is registered but cannot reach the GitLab API or the job times out during initialization. Fix: Verify the Runner token in the GitLab UI. Check the Runner configuration file for listen_address parameters.

GitHub Actions: “Error: resource not found”

Error: Resource not accessible by integration during actions/checkout. Cause: GitHub changed default permissions for workflows in recent versions, or the repository is private without a token configuration. Fix: Add permissions: contents: read to the workflow file header or generate a Personal Access Token (PAT) and use it in the checkout action.

filed under → DevOpsCI/CDArchitecture
found this useful? share it →
Written by

Dzubayyan Ahmad

System Administrator, SRE & Technical Support Engineer specialising in web hosting infrastructure — Linux servers, automation, and monitoring. Writing these notes since 2015 so future-me can find the fix again.