🔄 CI/CD
Workflow Overview
The CI/CD workflow are divided into two major workflows:
- Backend CI/CD Pipeline
- Frontend CI/CD Pipeline
The main workflow is defined in the cicd.yml
file and leverages reusable workflows:
pipeline-ci-backend.yml
pipeline-ci-frontend.yml
Each workflow is triggered on changes to specific paths and includes feature flags to enable or disable specific jobs.
Backend CI/CD Pipeline
Trigger Conditions
- Triggered on
push
andpull_request
events to themain
branch. - Monitors changes in the following paths:
server/**
docker-compose.yml
.github/workflows/*-backend.yml
Feature Flags (Inputs)
Input | Description | Default Value |
---|---|---|
BACKEND_COMPILE_ENABLED | Enable compile job | true |
BACKEND_CHECKSTYLE_ENABLED | Enable checkstyle job | true |
BACKEND_UNIT_TESTS_ENABLED | Enable unit tests job | true |
BACKEND_BUILD_ENABLED | Enable build job | true |
Jobs
- Compile (compiles gradle application)
- Checkstyle (runs checkstyle analysis)
- Unit tests (runs unit tests)
- Build (build Spring Boot application)
Frontend CI/CD Pipeline
Trigger Conditions
- Triggered on
push
andpull_request
events to themain
branch. - Monitors changes in the following paths:
client/**
docker-compose.yml
.github/workflows/*-frontend.yml
Feature Flags (Inputs)
Input | Description | Default Value |
---|---|---|
FRONTEND_INSTALL_ENABLED | Enable install job | true |
FRONTEND_LINT_ENABLED | Enable lint job | false |
FRONTEND_BUILD_ENABLED | Enable build job | true |
Jobs
- Install (installs dependencies and sets up Angular CLI)
- Lint (runs lint check)
- Build (builds Angular application)
Additional Jobs
Changes Detection
Identifies whether changes occurred in backend or frontend paths.
Docker Compose
Builds and starts services using Docker Compose if changes are detected in either frontend or backend.
Input | Description | Default Value |
---|---|---|
DOCKER_COMPOSE_ENABLED | Enable Docker Compose job | true |
DEPLOY_ENABLED | Enable Coolify deployment job | false |
Deployment
Triggers deployment to Coolify (two SECRET
variables are needed: COOLIFY_WEBHOOK
and COOLIFY_TOKEN
).
Secrets
The workflows rely on the following secrets:
COOLIFY_WEBHOOK
: URL for triggering deployment.COOLIFY_TOKEN
: Authorization token for Coolify.