Skip to content
This repository was archived by the owner on Nov 23, 2025. It is now read-only.

Dev#29

Merged
RandithaK merged 3 commits intomainfrom
dev
Nov 15, 2025
Merged

Dev#29
RandithaK merged 3 commits intomainfrom
dev

Conversation

@RandithaK
Copy link
Copy Markdown
Member

@RandithaK RandithaK commented Nov 15, 2025

Summary by CodeRabbit

  • Chores
    • Implemented dedicated pull request validation workflow providing rapid feedback on code changes.
    • Consolidated Docker image building and registry push operations into a unified, efficient workflow.
    • Enhanced automated manifest update process to correctly trigger following successful image builds, enabling faster deployment synchronization.

RandithaK and others added 2 commits November 15, 2025 09:26
Copilot AI review requested due to automatic review settings November 15, 2025 03:57
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Nov 15, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes restructure GitHub Actions CI/CD workflows into three specialized files: a new build-test.yaml for PR validation without Docker, an updated build.yaml consolidating build and push operations, and an updated update-manifest.yaml to trigger on the renamed workflow. Documentation is provided via WORKFLOW_FIX_SUMMARY.md explaining the execution flow.

Changes

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/build-test.yaml, .github/workflows/build.yaml, .github/workflows/update-manifest.yaml
build-test.yaml (NEW): Triggers on PRs to main/dev; checks out code, sets up JDK 17 with Maven caching, builds project with Maven (skipping tests), and appends summary to GitHub step output. build.yaml (UPDATED): Renamed job from build-test to build-and-push; removes pull_request trigger (push-only); eliminates separate Docker job; adds Java toolchain configuration and Maven dependency caching; maintains branch-aware Docker tagging and improves image summary formatting. update-manifest.yaml (UPDATED): Changes workflow_run trigger to listen for "Build and Push Docker Image" workflow instead of "Build and Package Service".
Documentation
WORKFLOW_FIX_SUMMARY.md
(NEW): Documents the CI/CD workflow split and redesign; explains execution flow for PRs, merges, and automatic manifest updates; details changes to each workflow file's behavior and provides testing and rollout guidance. Includes reference to deploy.yaml.old.

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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Workflow trigger verification: Confirm update-manifest.yaml's workflow_run trigger name matches the renamed job in build.yaml ("Build and Push Docker Image")
  • Maven cache configuration: Validate caching keys and paths are consistent across build-test.yaml and build.yaml
  • Docker tagging logic: Ensure branch-aware tagging (branch-SHA and latest) in build.yaml produces correct image references for update-manifest.yaml to consume
  • Documentation accuracy: Verify WORKFLOW_FIX_SUMMARY.md describes the actual workflow behavior

Poem

🐰 Three workflows once tangled, now hoppy and free,
Build-test hops quick on each PR to thee,
Build-and-push merges with Docker so bright,
While manifest keeper hops in at just right,
ArgoCD syncs as the pipelines align—
Our CI/CD garden now grows by design! 🌱

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0f42d3b and 5275d12.

📒 Files selected for processing (4)
  • .github/workflows/build-test.yaml (1 hunks)
  • .github/workflows/build.yaml (2 hunks)
  • .github/workflows/update-manifest.yaml (1 hunks)
  • WORKFLOW_FIX_SUMMARY.md (1 hunks)

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@RandithaK RandithaK merged commit b59059f into main Nov 15, 2025
3 checks passed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.yaml into separate PR validation (build-test.yaml) and Docker build (build.yaml) workflows
  • Updated update-manifest.yaml to 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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants