Examples
This directory contains example wetwire-gitlab-go projects demonstrating various pipeline patterns.
Getting Started
New to wetwire-gitlab-go? Start with the simple-starter example:
# Copy the starter template
cp -r examples/simple-starter ./ci
# Customize pipeline.go for your project
# Generate your .gitlab-ci.yml
wetwire-gitlab build ./ci > .gitlab-ci.yml
See the simple-starter README for detailed instructions.
Available Examples
Hand-Written Examples (Educational)
| Directory |
Description |
| simple-starter |
Start here! Turnkey template with build, test, deploy |
| error-handling |
Error handling patterns: allow_failure, exit_codes, retry, timeout |
| advanced-needs |
Advanced needs and JobRef patterns for job dependencies |
| go-pipeline |
Basic Go project with build, test, lint, and deploy stages |
| docker-build |
Docker image build and push pipeline |
| multi-stage-deploy |
Multi-environment deployment (dev, staging, production) |
| nodejs-pipeline |
Node.js/TypeScript with npm, ESLint, Jest, and coverage |
| python-pipeline |
Python with pip, pytest, mypy, ruff, and Docker build |
| security-scanning |
Full security scanning: SAST, Secret Detection, DAST, Container Scanning |
| kubernetes-deploy |
Kubernetes deployment with Helm, kubectl, and rollbacks |
| matrix-builds |
Parallel builds across multiple Go/Python/Node.js versions |
| scheduled-pipeline |
Scheduled maintenance jobs, backups, health checks, security scans |
| cross-project-triggers |
Multi-project coordination with triggers and child pipelines |
| runner-config |
GitLab Runner config.toml generation with Docker, Kubernetes, and autoscaling |
Imported Real-World Examples (Production)
See imported/README.md for details on real-world examples.
Running Examples
Each example is a complete Go module that can be built:
# Navigate to example
cd examples/go-pipeline
# Generate .gitlab-ci.yml
wetwire-gitlab build . > .gitlab-ci.yml
# Validate (requires glab)
wetwire-gitlab validate .gitlab-ci.yml
# Lint the Go code
wetwire-gitlab lint .
Creating New Examples
- Create a new directory under
examples/
- Initialize with
wetwire-gitlab init or create manually
- Add your pipeline code
- Test with
wetwire-gitlab build
- Update this README
Importing Existing Pipelines
You can convert existing .gitlab-ci.yml files to wetwire-gitlab code:
# Import to new directory
wetwire-gitlab import path/to/.gitlab-ci.yml --output ./my-example