Gerrit CI/CD Integration Training
Integrate Gerrit with Jenkins, Zuul, and Tekton for automated verification. Master the REST API, custom dashboards, and automation scripting for streamlined review pipelines.
Connect Gerrit to your CI/CD pipeline with this 2-day integration-focused training. Learn to automate change verification using Jenkins Gerrit Trigger, Zuul speculative execution, and Tekton event listeners. Master the Gerrit REST API for scripting and build custom dashboards with Gerrit's powerful query language to keep your team's review workflow visible and efficient.
Training Details
| Duration | 2 days (16 hours) |
| Level | Intermediate |
| Delivery | In-person, Live online, Hybrid |
| Certification | N/A |
Who Is This For?
- DevOps engineers connecting Gerrit to CI/CD pipelines
- Build engineers automating verification and gating workflows
- Platform engineers building developer productivity tooling around Gerrit
- Release engineers managing submission pipelines and merge queues
- Automation engineers scripting Gerrit interactions via REST API
Learning Outcomes
After completing this training, participants will be able to:
- Configure Jenkins Gerrit Trigger plugin for automated build and verification
- Understand Zuul's speculative execution model and configure check/gate pipelines
- Set up Tekton event listeners that respond to Gerrit stream-events
- Automate Gerrit operations using the REST API (query, vote, submit, comment)
- Write Gerrit query language expressions for filtering changes
- Build custom dashboards for team review visibility
- Design end-to-end automation scripts for common review workflow patterns
Detailed Agenda
Day 1: CI System Integration and Automated Verification
Module 1: Jenkins Gerrit Trigger Integration
- Jenkins Gerrit Trigger plugin architecture and event flow
- Connecting Jenkins to Gerrit via stream-events SSH interface
- Trigger configuration: patchset-created, comment-added, change-merged
- Job configuration: GERRIT_CHANGE_NUMBER, GERRIT_PATCHSET_REVISION environment variables
- Posting Verified label votes from Jenkins build results
- Multi-branch and multi-project trigger patterns
- Hands-on: Configure Jenkins with Gerrit Trigger to automatically build and vote Verified +1/-1 on new patch sets
Module 2: Zuul Pipeline Gating
- Zuul architecture: scheduler, executor, merger, web interface
- Speculative execution: testing changes as if predecessors already merged
- Pipeline types: check (non-voting verification), gate (voting pre-merge), post (post-merge)
- Zuul tenant configuration and project-pipeline binding
- Dependent and independent pipeline strategies
- Cross-project gating with Zuul's dependency resolution
- Hands-on: Deploy Zuul with Docker Compose, configure check and gate pipelines for a Gerrit project
Module 3: Automated Verification Patterns
- Tekton EventListener and TriggerBinding for Gerrit events
- Tekton pipeline tasks: clone from refs/changes, run tests, post results
- Buildkite and GitHub Actions integration via webhooks plugin
- Verified label automation: bot accounts, service user permissions
- Handling flaky tests: retry logic, conditional voting, advisory labels
- Hands-on: Create a Tekton pipeline that triggers on Gerrit patchset-created events and reports verification results
Module 4: CI Pipeline Design Patterns
- Pre-submit verification vs post-submit integration testing
- Parallel verification across multiple projects and test suites
- Build result caching and incremental testing strategies
- Change-dependent builds: testing changes that depend on unmerged parents
- CI feedback in Gerrit: robot comments, build links, test result summaries
- Hands-on: Design and implement a multi-stage verification pipeline with parallel test execution and robot comments
Day 2: REST API, Query Language, and Automation
Module 5: Gerrit REST API Fundamentals
- REST API authentication: HTTP credentials, API tokens, bearer tokens
- Core endpoints: /changes/, /projects/, /accounts/, /groups/
- Querying changes: GET /changes/?q= with search operators
- Change detail: revisions, messages, reviewers, labels, submit requirements
- Pagination with _start and _limit parameters
- Response format: JSON with magic prefix )]}' for XSS protection
- Hands-on: Write a Python script that queries open changes, fetches details, and generates a review status report
Module 6: Gerrit Query Language
- Search operators: status, owner, reviewer, project, branch, age, label
- Boolean logic: AND, OR, NOT, parenthetical grouping
- Label predicates: label:Code-Review=+2, label:Verified>=1
- File and path predicates: file:, directory:, extension:
- Advanced predicates: has:draft, is:mergeable, submittable:ok
- Self and named account predicates: owner:self, reviewer:group/team-leads
- Hands-on: Write queries for common scenarios — stale changes, ready-to-submit, missing reviews, blocked changes
Module 7: Custom Dashboards
- Dashboard configuration in refs/meta/dashboards/*
- Dashboard sections with title and query parameters
- Project-level vs user-level dashboards
- Dashboard URLs and sharing with query parameter encoding
- Default dashboard configuration per project
- Hands-on: Create project dashboards for team leads showing needs-review, ready-to-submit, recently-merged, and stale changes
Module 8: Automation Scripts and Capstone
- REST API write operations: POST reviews, PUT labels, POST submit
- Bulk operations: mass-abandon stale changes, batch reviewer assignment
- Webhook consumers for event-driven automation
- Building a change validation bot: commit message checks, dependency verification
- Integration with external systems: Jira, Slack, PagerDuty
- Hands-on: Capstone — build an automation suite that includes a Jenkins CI pipeline with Verified voting, a dashboard for team visibility, and a REST API script that auto-abandons changes older than 90 days with a courtesy comment
Prerequisites
- Completion of Gerrit Fundamentals Training or equivalent hands-on Gerrit experience
- Basic CI/CD pipeline knowledge (build, test, deploy concepts)
- Familiarity with Jenkins or similar CI systems
- Basic scripting skills (Python or shell) for REST API exercises
- Docker installed on the workstation (provided in lab environments)
Delivery Formats
| Format | Description |
|---|---|
| In-Person | On-site at your company's location, hands-on with direct interaction |
| Live Online | Interactive virtual sessions with screen sharing and real-time labs |
| Hybrid | Combination of on-site and remote sessions, flexible scheduling |
All formats include hands-on labs, course materials, and post-training support.
Prerequisites
- Gerrit Fundamentals Training or equivalent experience
- Basic CI/CD pipeline knowledge
- Familiarity with Jenkins or similar CI systems
Ready to get started?
Request a training quote for your team — in-person, live-online, or hybrid.