vault-sync-operator

CI/CD Pipeline Documentation

This document describes the GitHub Actions CI/CD pipeline for the vault-sync-operator.

Overview

The CI/CD pipeline consists of several workflows that handle testing, building, security scanning, and releasing:

CI Workflow

Triggers

Jobs

1. Test

2. Lint

3. Security Scan

4. Build Test

5. Docker Test

Release Workflow

Triggers

Process

1. Create Release

2. Build Binaries

3. Build and Push Docker Images

4. Update Manifests

Security Workflow

Triggers

Scans

Container Registry

Images are published to GitHub Container Registry:

ghcr.io/danieldonoghue/vault-sync-operator:latest
ghcr.io/danieldonoghue/vault-sync-operator:v1.0.0
ghcr.io/danieldonoghue/vault-sync-operator:v1.0
ghcr.io/danieldonoghue/vault-sync-operator:v1

Multi-Architecture Support

All Docker images support:

Binary Releases

For each release, the following binary artifacts are available:

Each archive includes:

Version Information

Binaries and Docker images include embedded version information:

Access version info:

./vault-sync-operator --version

Release Process

Creating a Release

  1. Prepare the release:
    git checkout main
    git pull origin main
    
  2. Create and push a version tag:
    git tag v1.0.0
    git push origin v1.0.0
    
  3. Monitor the release workflow:
    • Check GitHub Actions for workflow progress
    • Verify artifacts are uploaded correctly
    • Confirm Docker images are published

Pre-release Versions

For pre-release versions (alpha, beta, rc):

git tag v1.0.0-alpha.1
git push origin v1.0.0-alpha.1

Pre-release versions are marked as “prerelease” in GitHub and don’t update the latest tag.

Development Workflow

Branch Protection

The master branch should be protected with:

PR Requirements

Before merging PRs:

Troubleshooting

Common Issues

Build Failures

Docker Build Issues

Release Issues

Debug Commands

Test the build locally:

# Test Go build
go build -ldflags="-X main.version=test" cmd/main.go

# Test Docker build
docker buildx build --platform linux/amd64,linux/arm64 .

# Test cross-compilation
GOOS=linux GOARCH=arm64 go build cmd/main.go

Security Considerations

Monitoring

Monitor the CI/CD pipeline health: