examples/

directory
v1.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 16, 2026 License: MIT

README

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)
Directory Project Description LOC
imported/go/gitlab gitlab-org/gitlab GitLab main CE/EE monorepo ~81
imported/go/gitaly gitlab-org/gitaly Git RPC service with FIPS testing ~653
imported/go/gitlab-runner gitlab-org/gitlab-runner CI/CD runner ~10
imported/go/gitlab-shell gitlab-org/gitlab-shell SSH access handler ~353
imported/nodejs/gitlab-ui gitlab-org/gitlab-ui Vue.js component library ~287

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

  1. Create a new directory under examples/
  2. Initialize with wetwire-gitlab init or create manually
  3. Add your pipeline code
  4. Test with wetwire-gitlab build
  5. 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

Directories

Path Synopsis
imported
Example pipeline without requiring go.mod Run: wetwire-gitlab build .
Example pipeline without requiring go.mod Run: wetwire-gitlab build .

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL