feat: Add comprehensive Gitea CI/CD workflows for multi-arch container builds
- Add build-container.yml: Main build pipeline with multi-arch support - Add pr-check.yml: Pull request validation with comprehensive testing - Add release.yml: Automated release pipeline with security scanning - Add nightly.yml: Daily builds with performance testing - Add health_check.sh: Container health validation script - Add setup-ci.sh: Local CI/CD environment setup script - Add comprehensive CI/CD documentation Features: - Multi-architecture builds (linux/amd64, linux/arm64) - Security scanning with Trivy - Automated PyPI publishing for releases - Container registry integration - Performance testing and validation - Artifact management and cleanup - Build caching and optimization Supports full development workflow from PR to production deployment.
This commit is contained in:
75
README.md
75
README.md
@@ -478,6 +478,81 @@ For comprehensive guides and references, see the [**Documentation Index**](docs/
|
||||
- [systemd.socket(5)](https://www.freedesktop.org/software/systemd/man/systemd.socket.html) - Socket units
|
||||
- [systemd documentation](https://systemd.io/) - Official documentation
|
||||
|
||||
## 🔄 CI/CD
|
||||
|
||||
UnitForge includes comprehensive CI/CD workflows for automated testing, building, and deployment using Gitea Actions.
|
||||
|
||||
### Workflow Overview
|
||||
|
||||
- **Pull Request Checks** (`pr-check.yml`) - Validates PRs with tests, builds, and configuration checks
|
||||
- **Main Build Pipeline** (`build-container.yml`) - Builds and pushes multi-arch container images
|
||||
- **Release Pipeline** (`release.yml`) - Automated releases with security scanning and PyPI publishing
|
||||
- **Nightly Builds** (`nightly.yml`) - Daily builds with comprehensive testing and performance checks
|
||||
|
||||
### Multi-Architecture Support
|
||||
|
||||
All container images are built for multiple architectures:
|
||||
- `linux/amd64` - Standard x86_64 architecture
|
||||
- `linux/arm64` - ARM64 architecture (Apple Silicon, ARM servers)
|
||||
|
||||
### Container Registry
|
||||
|
||||
Images are pushed to the configured container registry:
|
||||
```bash
|
||||
# Default registry configuration
|
||||
REGISTRY: gitea-http.taildb3494.ts.net
|
||||
IMAGE_NAME: will/unitforge
|
||||
|
||||
# Available tags
|
||||
latest # Latest stable release
|
||||
develop # Latest development build
|
||||
v1.2.3 # Specific version
|
||||
nightly-latest # Latest nightly build
|
||||
```
|
||||
|
||||
### Local CI/CD Testing
|
||||
|
||||
Set up your local environment for CI/CD development:
|
||||
|
||||
```bash
|
||||
# Setup CI/CD environment
|
||||
./scripts/setup-ci.sh
|
||||
|
||||
# Test local builds
|
||||
./scripts/setup-ci.sh --test-build
|
||||
|
||||
# Test container health
|
||||
./scripts/health_check.sh
|
||||
|
||||
# Build multi-arch locally
|
||||
make docker-buildx-local
|
||||
|
||||
# Build and push to registry
|
||||
make registry-push
|
||||
```
|
||||
|
||||
### Required Secrets
|
||||
|
||||
Configure these secrets in your Gitea repository:
|
||||
|
||||
```bash
|
||||
CONTAINER_REGISTRY_USERNAME=your-registry-username
|
||||
CONTAINER_REGISTRY_PASSWORD=your-registry-password
|
||||
PYPI_API_TOKEN=your-pypi-token
|
||||
GITHUB_TOKEN=your-github-token
|
||||
```
|
||||
|
||||
### Workflow Features
|
||||
|
||||
- **Automated Testing**: Comprehensive test suite across Python versions
|
||||
- **Security Scanning**: Trivy vulnerability scanning with blocking on critical issues
|
||||
- **Performance Testing**: Basic performance validation and memory usage checks
|
||||
- **Multi-stage Deployment**: Staging and production environment support
|
||||
- **Artifact Management**: Automatic cleanup of old nightly builds
|
||||
- **Build Caching**: GitHub Actions cache for faster builds
|
||||
|
||||
For detailed CI/CD documentation, see [`.gitea/workflows/README.md`](.gitea/workflows/README.md).
|
||||
|
||||
## 🤝 Contributing
|
||||
|
||||
**New contributors**: Please see the [**Contributing Guide**](CONTRIBUTING.md) for complete development setup and workflow instructions.
|
||||
|
||||
Reference in New Issue
Block a user