Release System
The Redis Message Queue Backend uses a comprehensive, intent-driven release system that supports multi-target deployments with full supply chain security. The system provides production, validation, and staging workflows for safe and reliable releases.
- Overview
- Release Workflows
- Enhanced Configuration System (New)
- Overview
- Architecture
- Enhanced Configuration Structure
- Configuration Parser Workflow
- Configuration Outputs
- Benefits of Config-Based System
- Migration from Environment Variables
- Usage in Child Projects
- Technical Implementation Details
- Migration Guide for Child Projects
- Compatibility Matrix
- Best Practices
- Troubleshooting
- Enhanced Release Intent & Project Configuration Reference
- Developer Guide
Overview
The release system follows modern DevOps practices with:
- Intent-Driven Configuration: YAML-based release configuration with schema validation
- Multi-Target Deployment: Python packages (PyPI), Docker images (dual registry), and documentation (Docusaurus)
- Supply Chain Security: SBOM generation, vulnerability scanning, cosign signing, and SLSA attestation
- Comprehensive Validation: Pre-release validation without publishing artifacts
- Staging Environment: Safe testing environment with TestPyPI and staging tags
- Git Synchronization: Fixed critical version sync issues ensuring artifacts use correct bumped versions
Release Workflows
1. Production Release Workflow (release.yml)
Purpose: Production releases to PyPI, Docker registries, and documentation deployment
Triggers:
- Push to
masterbranch - Manual dispatch (
workflow_dispatch)
Enhanced Config-Based Architecture:
Enhanced Workflow Steps
The production release workflow now includes an enhanced config-based flow with the following steps:
Step 1: Configuration Parsing
config:
name: Parse Configuration
uses: Chisanan232/Template-Python-UV-Project/.github/workflows/rw_parse_project_config.yaml@master
- Parses enhanced
intent.yamlwith project, docker, git, validation, and docs configuration - Provides structured outputs for all downstream jobs
- Auto-detects project name and package name from repository and
pyproject.toml - Applies smart defaults for missing configuration sections
Step 2: Release Intent Analysis
intent:
uses: Chisanan232/Template-Python-UV-Project/.github/workflows/rw_parse_release_intent.yaml@master
needs: config
- Validates release intent against enhanced JSON schema
- Compatible with both legacy and enhanced configuration formats
- Determines release artifacts (python, docker, docs) based on configuration
Multi-Target Deployments
-
Python Package (
PyPI) - Config Enhanced:- Uses
uv buildanduv publish - OIDC Trusted Publishers for secure authentication
- Config Integration: Uses
${{ needs.config.outputs.package_name }}for package identification - Git Configuration: Commits using
${{ needs.config.outputs.git_commit_name }}and${{ needs.config.outputs.git_commit_email }} - Fixed: Automatic version synchronization with git sync fix
- Enhanced:
uv.lockfile automatically updated and committed with version bumps - Builds from correct bumped version (e.g., 0.0.1, not 0.0.0)
- Uses
-
Docker Image (
GHCR&DockerHub) - Config Enhanced:- Config-Based Registry URLs:
- Docker Hub: Uses
${{ needs.config.outputs.docker_registry_dockerhub }} - GHCR: Uses
${{ needs.config.outputs.docker_registry_ghcr }}
- Docker Hub: Uses
- Health Check Configuration: Uses config-based
${{ needs.config.outputs.docker_health_check_path }}and${{ needs.config.outputs.docker_health_check_port }} - Application Environment: Uses
${{ needs.config.outputs.docker_app_env_name }}and${{ needs.config.outputs.docker_app_env_value }} - Dual Registry Publishing: Publishes to both registries simultaneously
- Parallel Publishing Jobs: Separate jobs ensure isolated registry operations
- Multi-architecture builds: amd64, arm64 support for both registries
- Supply Chain Security: SBOM generation, Cosign signing, SLSA attestation
- Registry-Specific Authentication: GHCR uses GitHub token, Docker Hub uses dedicated credentials
- Consistent Tagging: Same version tags applied to both registries
- Fixed: Uses correct version tags from git sync fix
- Config-Based Registry URLs:
-
Documentation (
Docusaurus) - Config Enhanced:- Config-Based Documentation Paths: Uses structured config outputs:
- README Path:
${{ needs.config.outputs.docs_readme_path }} - Installation Guide:
${{ needs.config.outputs.docs_installation_path }} - CI/CD Documentation:
${{ needs.config.outputs.docs_ci_cd_path }}
- README Path:
- Preview Branch Configuration: Uses
${{ needs.config.outputs.docs_preview_branch }}for staging documentation - Enhanced Configuration Support: Works with both legacy string format and new object format:
# Enhanced format (from config)
docs:
mode: "auto"
sections: ["docs", "dev"]
strategy: "changed" - Intelligent Documentation Triggering: Uses
DOCS_UPDATEDflag to automatically trigger documentation deployment - Version Reference Updates: Automatically updates documentation files that reference the package version
- Workflow Run Pattern: Triggers documentation workflow via
workflow_runto overcomeGITHUB_TOKENlimitations - Multi-section versioning support: Independent versioning for
docs,dev, andapisections - Change detection: Selective updates based on actual file changes
- Matrix-based concurrent processing: Efficient parallel versioning
- Fixed: Versions using correct bumped version from git sync fix
📖 For detailed documentation deployment architecture, see Documentation Deployment
- Config-Based Documentation Paths: Uses structured config outputs:
2. Release Validation Workflow (release-validate.yml)
Purpose: Pre-release validation without publishing artifacts
Triggers:
- Pull requests to
master - Manual dispatch
Enhanced Config-Based Validation Steps:
Step-by-Step Enhanced Validation:
Step 1: Configuration Parsing & Validation
config:
name: Parse Configuration
uses: Chisanan232/Template-Python-UV-Project/.github/workflows/rw_parse_project_config.yaml@master
- Validates enhanced
intent.yamlstructure and syntax - Tests config output generation for all sections (project, docker, git, validation, docs)
- Verifies auto-detection logic for project and package names
- Validates Docker registry URLs and health check configurations
- Confirms documentation path accessibility
Step 2: Release Intent Validation
intent-parse:
uses: Chisanan232/Template-Python-UV-Project/.github/workflows/rw_parse_release_intent.yaml@master
needs: config
- Enhanced JSON schema validation supporting both legacy and new config formats
- Validates release intent against config-provided defaults
- Tests artifact configuration (python, docker, docs) with enhanced format support
Enhanced Security Validation
- Defensive Checks: Pre-flight image existence validation
- Vulnerability Scanning: Grype integration for CVE detection
- Fallback SBOM: Workspace scanning if Docker image scan fails
- Supply Chain Security: Full SBOM, signing, and attestation testing
3. Staging Release Workflow (release-staging.yml)
Purpose: Deploy to staging environments for testing with enhanced config-based customization
Triggers:
- Manual dispatch only (
workflow_dispatch)
Enhanced Config-Based Staging Architecture:
Enhanced Staging Steps:
Step 1: Configuration Parsing
config:
name: Parse Configuration
uses: Chisanan232/Template-Python-UV-Project/.github/workflows/rw_parse_project_config.yaml@master
- Loads staging-specific configuration from enhanced
intent.yaml - Provides validation version settings:
${{ needs.config.outputs.validation_version }}and${{ needs.config.outputs.validation_test_version }} - Configures preview documentation branch:
${{ needs.config.outputs.docs_preview_branch }}
Step 2: Staging Version Computation
- Uses config-based validation version format
- Creates release candidate versions with config-provided settings
- Integrates with git configuration from config outputs
Config-Enhanced Staging Targets:
-
TestPyPI - Config Enhanced:
- Pre-release Python packages using
${{ needs.config.outputs.validation_version }} - Git commits with
${{ needs.config.outputs.git_commit_name }}and${{ needs.config.outputs.git_commit_email }}
- Pre-release Python packages using
-
GHCR Staging - Config Enhanced:
- Docker images with
-rctags using${{ needs.config.outputs.docker_registry_ghcr }} - Health check validation using config-based
${{ needs.config.outputs.docker_health_check_path }}and${{ needs.config.outputs.docker_health_check_port }} - Application environment testing with
${{ needs.config.outputs.docker_app_env_name }}and${{ needs.config.outputs.docker_app_env_value }}
- Docker images with
-
Documentation Preview - Config Enhanced:
- Staging documentation branch using
${{ needs.config.outputs.docs_preview_branch }} - Documentation paths from config: README, installation, and CI/CD documentation
- Version testing using
${{ needs.config.outputs.validation_test_version }}
- Staging documentation branch using
Enhanced Staging Validation Process
- Config-Based RC Version Generation: Creates release candidate versions using validation settings from config
- Multi-Environment Testing: Tests all config-provided registry URLs and settings
- Preview Environment: Safe testing environment with customizable branch names
- Configuration Validation: Validates that all config outputs work in staging environment
Multi-Section Documentation Versioning
The release system supports advanced documentation versioning:
Features
- Section-Based Versioning: Independent versioning for
docs,dev, andapisections - Change Detection: Automatic detection of changes per section
- Strategy Control: Version all sections or only changed sections
- Matrix Processing: Concurrent versioning for performance
Configuration Examples
# Legacy format (backward compatible)
docs: "auto"
# Enhanced format
docs:
mode: "auto"
sections: ["docs", "dev"]
strategy: "changed" # Only version changed sections
Supply Chain Security
All release workflows include comprehensive supply chain security:
Security Features
- SBOM Generation: Software Bill of Materials with Syft
- Vulnerability Scanning: CVE detection with Grype
- Digital Signing: Cosign keyless signing
- Attestation: SLSA provenance attestation
- Defensive Programming: Pre-flight checks and clear error messages