Skip to content

Conversation

waleedlatif1
Copy link
Collaborator

Summary

Enable staging branch support in CI/CD workflows with infrastructure deployment triggers and Turborepo remote caching integration.

Type of Change

  • New feature

Testing

  • Workflow changes tested against existing infra repository setup
  • Docker image tagging verified for staging vs production environments
  • Repository dispatch integration confirmed with infra deployment workflows

Checklist

  • Code follows project style guidelines
  • Self-reviewed my changes
  • Tests added/updated and passing
  • No new warnings introduced
  • I confirm that I have read and agree to the terms outlined in the Contributor License Agreement (CLA)

Copy link

vercel bot commented Sep 8, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
docs Ready Ready Preview Comment Sep 8, 2025 9:16pm
sim Ready Ready Preview Comment Sep 8, 2025 9:16pm

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Greptile Summary

This PR enables comprehensive staging CI/CD pipeline support by modernizing the build and deployment infrastructure. The changes span four key areas:

Turborepo Remote Caching Integration: The turbo.json file now enables remote caching ("enabled": true), while both CI workflows have been updated to use Turborepo commands (bunx turbo test/build --filter=sim) with TURBO_TOKEN and TURBO_TEAM environment variables. This allows build artifacts to be shared across CI runs, environments, and potentially between local development and CI, significantly improving build performance in the monorepo architecture.

Staging Branch Docker Support: The build.yml workflow has been extended to build and push Docker images for the staging branch alongside main. This includes staging-specific image tagging (staging-${{ matrix.arch }}) and conditional logic that treats staging branches equivalently to main for build triggers and registry pushes. Multi-architecture manifests are also created for staging deployments.

Infrastructure Deployment Integration: A new trigger-infrastructure-deploy job has been added to build.yml that dispatches repository events to an external infrastructure repository for both staging and production deployments. This implements a GitOps pattern where deployment orchestration is separated from the application repository, allowing infrastructure changes to be managed independently.

CI Pipeline Simplification: The ci.yml workflow has been streamlined by removing the database migrations job entirely. Migration responsibilities are now delegated to the infrastructure deployment process, creating a cleaner separation between code validation (CI) and deployment operations (CD). The workflow now focuses purely on testing and building the application.

Minor Component Refactoring: The workflow-item component has been updated to use consistent drag state management by replacing dragStartedRef.current with the isDragging state variable in click handling logic.

These changes establish a production-ready staging environment that mirrors the main branch deployment process while leveraging modern build optimization techniques through Turborepo's remote caching capabilities.

Confidence score: 4/5

  • This PR introduces significant infrastructure changes that require careful coordination with external systems, particularly the infrastructure repository that receives dispatch events
  • Score reflects the complexity of multi-repository GitOps integration and potential timing issues in the workflow-item drag state refactoring
  • Pay close attention to workflow files and the workflow-item component for potential integration issues

4 files reviewed, no comments

Edit Code Review Bot Settings | Greptile

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant