GitLab CI/CD runs pipelines defined in .gitlab-ci.yml on GitLab Runners, with stages, jobs, environments and built-in DevSecOps scanning - all in one platform next to the repo.
Why teams use it
- One platform for SCM, CI/CD, registry and security scanning
- Pipelines-as-code with reusable includes and templates
- Built-in environments, review apps and manual deploy gates
Install it
# Register a self-managed runner (Docker executor)
gitlab-runner register --url https://gitlab.com \
--registration-token $TOKEN --executor docker --docker-image alpine:3A first working config
Stages, caching and a manual production gate.
stages: [build, test, deploy]
cache: { paths: [node_modules/] }
build:
stage: build
image: node:20
script: [npm ci, npm run build]
test:
stage: test
image: node:20
script: [npm test]
deploy:prod:
stage: deploy
script: [./deploy.sh]
environment: { name: production }
when: manual
rules: [{ if: '$CI_COMMIT_BRANCH == "main"' }]Run and verify
# Validate and lint the pipeline before pushing
gitlab-ci-local --list
glab ci lintMistakes to avoid early
- Everything in one stage, so nothing runs in parallel
- No cache/artifacts config, re-downloading dependencies every job
- Secrets in .gitlab-ci.yml instead of masked/protected CI variables
Want senior help putting GitLab CI/CD to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.