Conversation
refactor: restructure CI/CD workflows for improved execution order an…
|
Caution Review failedThe pull request is closed. WalkthroughThe changes restructure GitHub Actions CI/CD workflows into three specialized files: a new Changes
Sequence Diagram(s)sequenceDiagram
participant Developer
participant GitHub
participant PR Flow as build-test.yaml
participant Push Flow as build.yaml
participant Manifest as update-manifest.yaml
participant GHCR
participant ArgoCD
rect rgb(240, 248, 255)
note over Developer, PR Flow: Pull Request Path
Developer->>GitHub: Push to PR (main/dev)
GitHub->>PR Flow: Trigger on PR
PR Flow->>PR Flow: Checkout, Setup JDK 17
PR Flow->>PR Flow: Maven build (skip tests)
PR Flow->>GitHub: Add summary to step output
end
rect rgb(240, 250, 240)
note over Developer, Manifest: Push/Merge Path
Developer->>GitHub: Merge to main/dev
GitHub->>Push Flow: Trigger on push
Push Flow->>Push Flow: Checkout, Setup JDK 17
Push Flow->>Push Flow: Maven build & package
Push Flow->>Push Flow: Build Docker image
Push Flow->>GHCR: Push image {branch}-{sha}
GHCR->>GitHub: Workflow completes
GitHub->>Manifest: Trigger via workflow_run
Manifest->>Manifest: Checkout k8s-config
Manifest->>Manifest: Update deployment image tag
Manifest->>GitHub: Commit & push changes
GitHub->>ArgoCD: Trigger auto-sync
ArgoCD->>ArgoCD: Deploy new image
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Poem
✨ Finishing touches🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull Request Overview
This PR restructures the CI/CD workflow to fix a race condition where Kubernetes manifests were being updated before Docker images were built. The solution splits the original monolithic workflow into three focused workflows with proper sequential execution.
- Split the original
build.yamlinto separate PR validation (build-test.yaml) and Docker build (build.yaml) workflows - Updated
update-manifest.yamlto trigger on the correct workflow name ("Build and Push Docker Image") - Added comprehensive documentation explaining the problem, solution, and testing approach
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| WORKFLOW_FIX_SUMMARY.md | New documentation explaining the workflow race condition issue and the solution implemented |
| .github/workflows/build.yaml | Simplified to single-job workflow that only runs on push to main/dev, removing PR triggers and conditional logic |
| .github/workflows/build-test.yaml | New lightweight workflow for PR validation that only builds without pushing Docker images |
| .github/workflows/update-manifest.yaml | Updated workflow trigger to reference the renamed "Build and Push Docker Image" workflow |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary by CodeRabbit