Jenkins is powerful, but for smaller projects it is like using a sledgehammer to crack a nut. GitLab CI is part of GitLab — a CI/CD pipeline defined in .gitlab-ci.yml directly in the repository. No external server, no Jenkins administration.
.gitlab-ci.yml¶
stages:
- build
- test
- deploy
build:
stage: build
image: maven:3.3-jdk-8
script:
- mvn compile
artifacts:
paths:
- target/
test:
stage: test
image: maven:3.3-jdk-8
script:
- mvn test
artifacts:
reports:
junit: target/surefire-reports/*.xml
deploy_staging:
stage: deploy
script:
- ./deploy.sh staging
only:
- develop
environment:
name: staging
GitLab Runners¶
A runner is an agent that executes jobs. Shared runners (GitLab.com provides them for free) or your own runners. Docker executor — each job in a clean container. Registering a runner takes a single command.
GitLab CI vs. Jenkins¶
GitLab CI: Simplicity, integration with GitLab (merge requests, environments), zero maintenance for hosted GitLab. Jenkins: More flexible, more plugins, better for complex enterprise pipelines. Both have their place — GitLab CI for smaller projects, Jenkins for large enterprise setups.
CI/CD for Every Project¶
GitLab CI lowers the barrier for CI/CD. Every project should have an automatic build and tests — GitLab CI makes that trivial.
Need help with implementation?
Our experts can help with design, implementation, and operations. From architecture to production.
Contact us