GitLab

GitLab is a DevOps platform that combines Git repositories, CI/CD pipelines, issue tracking, and code review in one application for the full software lifecycle.

Table of Contents

Table of Contents

Further Reading

No items found.
No items found.
No items found.
No items found.
No items found.
No items found.

What Is GitLab?

GitLab is a DevOps platform that brings source control, CI/CD, planning, and code review into one application. Teams use it to manage the full software lifecycle, from first commit to production.

GitLab is built on Git. It is available as GitLab.com, a hosted SaaS offering, or as a self-managed instance on your own infrastructure.

Core Components of GitLab

  • Git repositories: hosted source control with branches, tags, and merge requests
  • CI/CD pipelines: jobs defined in .gitlab-ci.yml and executed by runners
  • Issue tracking: boards, milestones, and epics for planning work
  • Code review: merge requests with inline comments and approval rules
  • Container and package registries: storage for images and build outputs next to the code
  • Deployment options: GitLab.com SaaS or a self-managed instance

GitLab vs. GitHub

Both platforms host Git repositories and support CI/CD. They differ mainly in packaging and defaults.

Aspect GitLab GitHub
CI/CD GitLab CI/CD, built in and defined in .gitlab-ci.yml GitHub Actions, defined in workflow YAML files
Change review Merge requests Pull requests
Planning Issues, boards, milestones, and epics Issues, Projects, and milestones
Hosting GitLab.com or self-managed GitHub.com or GitHub Enterprise Server
Approach One application across the lifecycle Core platform plus a large marketplace

How a GitLab Pipeline Runs Tests

  1. Push or open a merge request: a developer pushes code or opens a merge request.
  2. Create the pipeline: GitLab reads .gitlab-ci.yml and creates a pipeline with stages.
  3. Run jobs: runners pick up each job, such as build, test, and deploy.
  4. Report results: job logs and artifacts appear on the merge request.
  5. Gate the change: the merge request passes or fails based on the pipeline result.

Runners can be shared, group-specific, or project-specific. They run jobs on virtual machines, containers, or Kubernetes pods.

GitLab Runners vs. Testkube In-Cluster Execution

Both approaches start from the same GitLab pipeline. The difference is where the tests run.

Aspect Tests on GitLab Runners Tests Orchestrated by Testkube
Where tests run Runner machines or runner pods Inside your Kubernetes clusters
Scaling Limited by runner capacity Scales with cluster resources
Results Per-job pipeline logs Centralized across pipelines and teams
Triggers Pipeline events Pipelines, schedules, Kubernetes events, or API
Environment parity Runner environment differs from production Same cluster networking and configuration as the app

Why GitLab Matters for Engineering Teams

GitLab gives teams one place to plan, build, test, and ship code. Fewer tools mean fewer handoffs and less integration work.

  • Single source of truth: code, pipelines, and issues live together.
  • Built-in automation: CI/CD is part of the platform, not an add-on.
  • Traceability: every merge request links code, reviews, and pipeline results.
  • Flexible hosting: self-managed instances suit teams with strict data rules.

Testing is often where pipelines slow down. Large end-to-end or load suites compete for shared runners, so every merge request waits in the same queue.

Real-World Example

A B2B SaaS team runs a large Playwright suite on shared GitLab runners. As the team grows, merge requests wait longer for feedback, and runner costs rise.

  1. Keep GitLab in charge: the .gitlab-ci.yml test stage now calls the Testkube CLI.
  2. Run in the cluster: Testkube executes the suite in the staging Kubernetes cluster, sharded across pods.
  3. Report back: the pipeline job passes or fails based on the Testkube result.
  4. See everything: results from every pipeline land in one Testkube dashboard.

Runners stay free for builds, and test capacity grows with the cluster.

How GitLab Relates to Testkube

Testkube integrates with GitLab CI/CD. A pipeline triggers Testkube, and the tests run inside your Kubernetes clusters instead of on GitLab runners.

GitLab stays the CI/CD orchestrator. Testkube adds scalable test execution and one view of results across pipelines and teams. For a worked example, see implementing TestOps with GitLab and Testkube.

Best Practices for Testing in GitLab

  • Keep fast tests in the pipeline: run unit tests and linting on runners for quick feedback.
  • Offload heavy suites: move end-to-end, load, and integration tests to in-cluster execution.
  • Use merge request pipelines: validate every change before it reaches the main branch.
  • Store tokens as CI/CD variables: mask and protect credentials used to call other tools.
  • Publish results to merge requests: keep feedback where reviewers already look.

Frequently Asked Questions (FAQs)

What is GitLab used for?

GitLab hosts Git repositories, runs CI/CD pipelines, tracks issues, and supports code review. Teams use it to manage the full software lifecycle in one tool.

How is GitLab different from GitHub?

Both platforms host Git repositories. GitLab bundles CI/CD and planning tools into one application and is available as SaaS or self-managed.

What is GitLab CI/CD?

GitLab CI/CD is the built-in pipeline system. Pipelines are defined in a .gitlab-ci.yml file and run on GitLab runners.

Can Testkube run tests from GitLab pipelines?

Yes. GitLab pipelines can trigger Testkube, which runs the tests inside your Kubernetes clusters.

Why run GitLab pipeline tests in Kubernetes?

Running tests in Kubernetes removes the limit of runner capacity. Tests scale with cluster resources and run in an environment closer to production.

Does GitLab stay the CI/CD orchestrator with Testkube?

Yes. GitLab still runs the pipeline. Testkube handles test execution and centralizes results across pipelines and teams.

Related Terms and Concepts