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
glabcommand in the practice terminal
The parts of GitLab
| Part | What it does | Lesson |
|---|---|---|
| Repository | Stores your code, branches and tags | 2 and 4 |
| Merge requests | Lets people review code before it is added | 2 and 4 |
| Plan | Issues, labels, milestones and boards to track work | 3 |
| CI/CD | Pipelines that build, test and deploy. You write them in .gitlab-ci.yml | 5 to 13 |
| Registries | Stores container images and packages (npm, Maven and more) | 11 |
| Deploy | Environments and deployments, including Kubernetes | 12 and 14 |
| Secure | Security scans of your code and images | 15 |
| Govern | Company rules and audit logs | 20 |
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):
| Plan | Who uses it | What you get |
|---|---|---|
| Free | People and small teams | Git, CI/CD, issues, merge requests, container registry |
| Premium | Growing teams | Approval rules, protected environments, push rules, faster support |
| Ultimate | Companies that care a lot about security | Security 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)- 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 variableCI_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:
| Role | What they can do |
|---|---|
| Guest | See the project and open issues |
| Reporter | Read the code, manage issues, see pipeline logs |
| Developer | Push to normal branches, open merge requests, run pipelines |
| Maintainer | Push and merge to protected branches, change CI/CD settings, secrets and runners |
| Owner | Everything, 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:
glabis 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-localruns 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 statusglab 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: **************************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 view2eb037f (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: mainLook 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.jsonDockerfile 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": {...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 listNo 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 @lynuxproIssue #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:
- An issue describes the work (lesson 3).
- A developer makes a branch, commits and pushes (lesson 2).
- The push starts a pipeline that builds and tests the code (lessons 5 to 9).
- The developer opens a merge request. The pipeline runs again. Other people review and approve it (lessons 2 and 4).
- A review app puts the branch on a temporary website so people can try it (lesson 12).
- Security scans show any new problems in the merge request (lesson 15).
- After the merge, the pipeline on
mainbuilds 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
| Command | What it does |
|---|---|
glab auth login | Log in with a token |
glab auth status | Show who you are logged in as |
glab repo view | Show the current project |
glab issue list | List open issues |
glab ci list | List pipelines |
git remote -v | Show 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. You add a CI/CD variable to the group acme/shop. Which projects can use it?
2. Which role should most engineers on a team have?
3. What does a personal access token starting with glpat- let you do?