GitLab Tutorial
- 1. Introduction to GitLab
- 2. Architecture & Self-Hosting
- 3. Groups, Projects & Namespaces
- 4. Issue Tracking & Agile
- 5. GitLab CI/CD Basics
- 6. GitLab Runners & Executors
- 7. Environments & Deployments
- 8. Merge Requests & Code Review
- 9. GitLab Container Registry
- 10. Package & Infra Registry
- 11. Security & Compliance
- 12. Monitoring & Analytics (DORA)
- 13. GitLab Pages Hosting
- 14. APIs, Webhooks & Integrations
- 15. GitLab Workflow & Best Practices
1. Introduction to GitLab
In modern software development, teams often use disjointed tools: one for planning (like Jira), one for hosting code (like GitHub), one for CI/CD (like Jenkins), and another for monitoring (like Prometheus). GitLab was built to solve this fragmentation by providing a single, unified application for the entire DevSecOps lifecycle.
What is GitLab?
GitLab is a complete, open-core DevSecOps platform delivered as a single application. Founded in 2011 by Dmitriy Zaporozhets and Sytse Sijbrandij, it has grown from a simple Git hosting solution into a fully integrated platform that handles planning, repository hosting, automated testing (CI), deployment (CD), security scanning, and production monitoring.
Unlike other platforms that rely heavily on third-party integrations and plugins, GitLab builds all of these features natively into its core model, offering a consistent user interface and unified permissions.
Git vs. GitHub vs. GitLab
| Feature / Aspect | Git | GitHub | GitLab |
|---|---|---|---|
| Core Definition | Local command-line Version Control System. | Cloud platform focusing on code hosting & social coding. | Single application for the complete DevSecOps lifecycle. |
| Primary Hosting | Self-run locally on your machine. | SaaS (GitHub.com) / Enterprise Server. | SaaS (GitLab.com) / Self-Hosted (Omnibus/Kubernetes). |
| CI/CD Approach | None (Local only). | GitHub Actions (integrated workflows). | Built-in industry-leading pipelines (`.gitlab-ci.yml`). |
| Security Scanning | None. | Dependabot, advanced security (SaaS add-ons). | Fully integrated SAST/DAST, License & Container scans. |
| Open Source Policy | Fully Open Source (GPL). | Proprietary (owned by Microsoft). | Open Core (GitLab Community Edition is open source). |
Key Value Propositions of GitLab
Why do massive enterprises (like NASA, Nvidia, and Siemens) choose GitLab?
- Single Source of Truth: One user interface, one data store, and one permission model across the entire software delivery pipeline.
- Self-Hostable Freedom: Perfect for high-security environments, government agencies, and proprietary corporate environments because you can host GitLab entirely behind your own firewall.
- Built-in Security: Shift-left security by scanning code for bugs, secrets, and licensing violations directly during the pipeline execution before code is merged.
- Robust CI/CD Pipelines: Known for having one of the most customizable, flexible, and powerful YAML-based CI/CD engines.