Overview
The production release workflow:- Trigger: When a GitHub release is published (not draft)
- Build and Publish: Full build with all quality gates enabled
- Artifact Publishing: Packages and Docker images published to registries
- Quality Checks: SonarQube, Promptfoo, and Redteam tests
Workflow Flowchart
Workflow Configuration
The production release workflow is defined in.github/workflows/release.yaml:
Release Process
1. Release Publication
When a GitHub release is published:- The workflow is automatically triggered
- Only non-draft releases trigger the workflow
- The release tag name is used for versioning
2. Build and Publish
The workflow uses the reusablebuild-publish.yaml workflow with:
- Full Quality Gates: All quality checks enabled
- SonarQube: Code quality and security analysis
- Promptfoo: LLM prompt evaluation
- Redteam: Security and adversarial testing
- Docker Build: Container image building
- Security Scan: Trivy vulnerability scanning
- Publish: Artifacts published to Azure Container Registry
3. Artifact Publishing
The workflow publishes:- Docker Images: Tagged with release version
- Packages: Agent packages published to registry
- Quality Reports: SonarQube and test reports
Release Artifacts
The release workflow creates and publishes:Agent Packages
Compiled and packaged agent artifacts
Docker Images
Containerized agent images tagged with release version
Quality Reports
SonarQube and test reports
Security Reports
Trivy security scan results
Publishing a Release
Steps
- Create Release Draft: Use the release draft workflow to create a draft
- Review Release: Review the release draft and release notes
- Edit if Needed: Update release notes or version if necessary
- Publish Release: Click “Publish release” in GitHub
- Workflow Triggers: Production release workflow automatically starts
- Monitor Build: Watch the workflow execution
- Verify Artifacts: Confirm artifacts are published successfully
Configuration
Quality Gates
All quality gates are enabled for production releases:- SonarQube:
enableSonar: true - Promptfoo:
enablePromptfoo: true - Redteam:
enableRedteam: true
Timeout
The workflow has a 600-minute (10-hour) timeout to accommodate full quality checks.Reusable Components Used
This workflow leverages:- build-publish.yaml: Main reusable workflow that orchestrates the entire build and publish process
- All quality check actions (SonarQube, Promptfoo, Redteam)
- Docker build and push actions
- Security scanning actions
Best Practices
- Review Before Publish: Always review release drafts before publishing
- Quality Checks: Ensure all quality gates pass in release draft
- Version Verification: Verify version numbers are correct
- Release Notes: Include comprehensive release notes
- Testing: Test release artifacts before deploying
Troubleshooting
Release Failures
Common issues:- Build Failures: Review build logs for compilation errors
- Quality Gate Failures: Address SonarQube, Promptfoo, or Redteam issues
- Security Scan Failures: Fix critical vulnerabilities
- Docker Build Issues: Check Dockerfile and dependencies
- Publish Errors: Verify Azure ACR credentials and permissions
Verification
- Check workflow logs in GitHub Actions
- Verify Docker images in Azure Container Registry
- Review SonarQube reports
- Check security scan results