Introduction
The CodeBlock DevKit SaaS Template includes comprehensive build automation and CI/CD workflows to streamline your development and deployment process.
Build System Architecture
The current build system is implemented via Nuke, a powerful cross-platform build automation tool. This provides:
- Centralized Build Logic: All build operations are defined in
src/4-Build/Build.cs - Dependency Management: Automatic dependency resolution between build targets
- Cross-Platform Support: Consistent behavior across Windows, macOS, and Linux
- CI/CD Integration: Seamless integration with GitHub Actions and other CI systems
What's Included
- Nuke Build System: Core build automation with dependency management
- Build Scripts: Cross-platform convenience scripts for common tasks
- CI Workflow: Pre-configured GitHub Actions for automated builds and testing
- CD Workflow: Deployment configuration for Windows IIS (customizable for other platforms)
Build Scripts vs Nuke Commands
Build Scripts (src/4-Build/scripts/ folder)
- Purpose: Convenience scripts for local development
- Location:
scripts/compile/,scripts/lint/,scripts/tests/,scripts/packages/ - Use Case: Quick access to common build tasks during development
Nuke Commands (Recommended)
- Purpose: Full build system with dependency management
- Commands:
nuke Compile,nuke RunUnitTests,nuke Lint, etc. - Use Case: Production builds, CI/CD pipelines, and when you need dependency resolution
Note: The build scripts in the scripts/ folder are convenience wrappers around Nuke commands. For production use and CI/CD, Nuke commands are recommended.
Key Benefits
- Automated Quality: Built-in linting, testing, and compilation checks
- Dependency Resolution: Automatic execution order based on target dependencies
- Cross-Platform: Consistent behavior across all operating systems
- CI/CD Ready: GitHub Actions workflows included out of the box
- Flexible Deployment: Deploy to any environment (cloud, Windows, Linux, etc.)
Quick Start
- Local Development: Use
nukecommands for full build automation - Quick Tasks: Use build scripts for simple operations
- CI Pipeline: Push to GitHub to trigger automated builds and tests
- Deployment: Customize CD workflow for your target environment
Repository Integration
The build system is already integrated into the CI workflow at .github/workflows/ci.yml and can be customized for your specific deployment needs.
For detailed guidance on each aspect, refer to the specific guides in this section.