Skip to content
$ lynuxpro
← GitLab CI/CD

LESSON 1 OF 20 · BEGINNER · 18 MIN

GitLab overview

Free previewLesson 1 of the 2 free lessons in this Pro course.Unlock all 20

HOW IT WORKSGroups pass settings down to projects

acmegroup: the company
1/4

Everything lives in groups, like folders. The top group is the company.

GitLab is one tool for the whole job of making software. In one place you can:

  • plan work (issues)
  • store code (Git)
  • review code (merge requests)
  • build and test code automatically (CI/CD pipelines)
  • check code for security problems
  • store container images and packages
  • deploy to servers and Kubernetes

Teams like this because everything is in one app. There is one login, one set of permissions and one history of who did what. You don't have to connect five different tools together.

In this course you will learn GitLab the way a DevOps engineer uses it at work. By the end you will build a full pipeline for a small web shop: build, test, scan, make a container image, and deploy it to test, staging and production.

In simple words

  • GitLab: one platform for code, reviews, issues, CI/CD pipelines, a container registry and security scanning.
  • Group: a folder that holds related projects and shares members and settings.
  • Project: one repository plus its issues, pipelines and settings.
  • Role: a member's level of access, from Guest up to Owner.

What you'll learn

  • The main parts of GitLab
  • The different ways to run GitLab, and the Free, Premium and Ultimate plans
  • Groups and projects, and how access is shared
  • The five roles and what each one can do
  • How to use the glab command in the practice terminal

The parts of GitLab

PartWhat it doesLesson
RepositoryStores your code, branches and tags2 and 4
Merge requestsLets people review code before it is added2 and 4
PlanIssues, labels, milestones and boards to track work3
CI/CDPipelines that build, test and deploy. You write them in .gitlab-ci.yml5 to 13
RegistriesStores container images and packages (npm, Maven and more)11
DeployEnvironments and deployments, including Kubernetes12 and 14
SecureSecurity scans of your code and images15
GovernCompany rules and audit logs20

The most important idea is the pipeline. When you push code, a pipeline can build it, test it, scan it and deploy it for you. The other parts of GitLab show pipeline results: a merge request shows if the tests passed, and an environment shows which version is deployed.

Ways to run GitLab

GitLab.com is GitLab on the internet. You sign up and start using it. GitLab looks after the servers and updates them every month. It also gives you free machines (called shared runners) to run your pipelines.

GitLab Self-Managed is the same GitLab installed on your company's own servers. Companies use it when code must stay inside their own network. The downside is that your team must do the updates, backups and scaling (lessons 16 and 18).

GitLab Dedicated is a private GitLab that GitLab runs only for your company. It is for companies that want their own copy but don't want to look after it.

Each one comes in three plans (also called tiers):

PlanWho uses itWhat you get
FreePeople and small teamsGit, CI/CD, issues, merge requests, container registry
PremiumGrowing teamsApproval rules, protected environments, push rules, faster support
UltimateCompanies that care a lot about securitySecurity dashboards, security policies, compliance tools

Good to know: the security scanners work on every plan. Only the dashboards that collect the results need Ultimate. The course will tell you when a feature needs a paid plan.

Groups and projects

GitLab is organised like folders on a computer:

acme                      (top-level group: the company)├── platform              (subgroup: a team)│   ├── ci-templates      (project: shared CI configuration)│   └── runners           (project)└── shop                  (subgroup)    ├── storefront        (project: the web shop you'll build pipelines for)    └── payments          (project)
OUTPUTterminalutf-8 · 7L
  • A project is like one folder for one app. It has the code plus its issues, merge requests and pipelines.
  • A group is a folder that holds projects (and smaller groups called subgroups).
  • Anything you set on a group is inherited, which means it is passed down to everything inside it. This works for members, CI/CD variables, runners and settings.
  • The full name of a project, like acme/shop/storefront, is used in web links, clone links and the CI variable CI_PROJECT_PATH.

Why this matters: add a new engineer to acme/shop once, and they can see every shop project. Add a DOCKER_REGISTRY_TOKEN variable to acme once, and every pipeline in the company can use it.

Roles

Every member gets a role. A higher role can do everything a lower role can, plus more:

RoleWhat they can do
GuestSee the project and open issues
ReporterRead the code, manage issues, see pipeline logs
DeveloperPush to normal branches, open merge requests, run pipelines
MaintainerPush and merge to protected branches, change CI/CD settings, secrets and runners
OwnerEverything, including deleting the project and managing group members

Newer GitLab versions also have a Planner role for people who only manage issues and don't need the code.

In real teams: most engineers are Developers, a few senior people are Maintainers, and only certain people can deploy to production (lesson 12).

The practice terminal

You will do everything in the terminal next to the lesson. It acts like a laptop with Git, Node.js, Docker, kubectl and two GitLab tools:

  • glab is GitLab's official command-line tool. You use it to work with merge requests, issues, pipelines, variables and releases without opening the website.
  • gitlab-ci-local runs your pipeline on your own machine. It is great for testing pipeline changes before you push.

In the lab, glab is connected to a GitLab.com project called acme/storefront, and pipelines really run the jobs you write. First, check the tools and your login:

glab --versionglab auth status
SHELLbashutf-8 · 2L
glab 1.48.0 (2026-11-12)gitlab.com  ✓ Logged in to gitlab.com as lynuxpro (/home/lynuxpro/.config/glab-cli/config.yml)  ✓ Git operations for gitlab.com configured to use ssh protocol.  ✓ API calls for gitlab.com are made over https protocol.  ✓ REST API Endpoint: https://gitlab.com/api/v4/  ✓ Token: **************************
OUTPUTterminalutf-8 · 7L

On a real computer you log in once with glab auth login. It asks for a personal access token, which is like a password for tools. It starts with glpat-. You make one in GitLab by clicking your picture, then Preferences > Access tokens. Give it the api scope and an end date.

Meet the storefront project

Your home folder has a project called storefront. It is a small web shop, and in this course you will build its pipeline. It has an API, a small website, tests, a Dockerfile and Kubernetes files. It is already a Git repository connected to GitLab:

cd ~/storefrontgit log --onelinegit remote -vglab repo view
SHELLbashutf-8 · 4L
2eb037f (HEAD -> main, origin/main) Add Dockerfile, Kubernetes manifests and smoke test8b08b86 Add pricing with 18% GST and the API serverb7708ef Initial storefrontorigin	git@gitlab.com:acme/storefront.git (fetch)origin	git@gitlab.com:acme/storefront.git (push)acme/storefrontSimulated GitLab project for the lynuxpro coursehttps://gitlab.com/acme/storefrontDefault branch: mainProtected branches: main
OUTPUTterminalutf-8 · 11L

Look at Protected branches: main. GitLab protects the main branch of every new project. This means Developers can't push to it directly. Changes must come in through a merge request. Lesson 4 explains this.

Look around the project:

lscat package.json
SHELLbashutf-8 · 2L
Dockerfile  README.md  index.html  k8s  package-lock.json  package.json  scripts  src{  "name": "storefront",  "version": "1.4.0",  "private": true,  "type": "module",  "scripts": {    "build": "vite build",    "test": "vitest run",    "lint": "eslint src",    "start": "node src/server.js"  },  "dependencies": {    "express": "^4.21.2"  },  "devDependencies": {...
OUTPUTterminalutf-8 · 17L

The pipeline will run the three npm scripts: build, test and lint. There is no .gitlab-ci.yml file yet, so there are no pipelines:

glab ci listglab issue list
SHELLbashutf-8 · 2L
No pipelines available on acme/storefront.Showing 3 issues in acme/storefront that match your search. (Page 1)#1	Checkout shows wrong tax for Karnataka	(bug, workflow::todo)  %v1.1#2	Add /health endpoint version	(feature)  %v1.1  @lynuxpro#3	Set up CI pipeline	(ci, workflow::doing)  %v1.1  @lynuxpro
OUTPUTterminalutf-8 · 6L

Issue #3 is your task for this course. You will see issues again in lesson 3.

How a change moves through GitLab

This is the path every change takes in a good team. Each step has its own lesson:

  1. An issue describes the work (lesson 3).
  2. A developer makes a branch, commits and pushes (lesson 2).
  3. The push starts a pipeline that builds and tests the code (lessons 5 to 9).
  4. The developer opens a merge request. The pipeline runs again. Other people review and approve it (lessons 2 and 4).
  5. A review app puts the branch on a temporary website so people can try it (lesson 12).
  6. Security scans show any new problems in the merge request (lesson 15).
  7. After the merge, the pipeline on main builds a container image, deploys to staging, and waits for someone to approve production (lessons 11, 12 and 14).

Common mistakes

  • Putting every project at the top. Without groups, nothing is passed down, so you set the same members and variables fifty times. Make a group for each team or product from the start.
  • Making everyone a Maintainer. Then anyone can change secrets and settings. Most people only need Developer.
  • Tokens that never expire. GitLab now asks for an end date (one year at most). Give a token only the access it needs. For automation, use a project or group token, so it doesn't stop working when one person leaves.

Quick reference

CommandWhat it does
glab auth loginLog in with a token
glab auth statusShow who you are logged in as
glab repo viewShow the current project
glab issue listList open issues
glab ci listList pipelines
git remote -vShow where your code is pushed to

In the next lesson you will set up SSH, push a branch and open your first merge request.

CHECK YOUR UNDERSTANDING

3 quick questions

  1. 1. You add a CI/CD variable to the group acme/shop. Which projects can use it?

  2. 2. Which role should most engineers on a team have?

  3. 3. What does a personal access token starting with glpat- let you do?