Inspiration
Every day, software teams run countless CI/CD jobs without knowing their true environmental impact. Inspired by the growing need for sustainability in tech, we built GitGreen to provide precise visibility into the carbon footprint of CI/CD pipelines and actionable insights for optimization.
What it does
GitGreen integrates seamlessly with GitLab CI/CD and Google Cloud Platform (GCP) to track real-time carbon emissions from pipeline jobs. It uses actual resource usage data from GCP Monitoring and regional carbon intensity from Electricity Maps. An AI agent, powered by Google Vertex AI Gemini, analyzes logs and configurations to suggest improvements directly within GitLab merge requests and Slack.
How we built it
- Backend: NestJS deployed on Google Cloud Run
- Data Queue: Redis with BullMQ for job management
- Data Storage: PostgreSQL on Cloud SQL
- Real-time Data: Google Cloud Monitoring API & Electricity Maps API
- AI Analysis: Google Vertex AI Gemini with function calls for deep contextual analysis
- Integration: GitLab OAuth for webhooks, Pub/Sub for event-driven architecture, Slack API for notifications
- GitLab Component: Custom component published in GitLab CI/CD Catalog for easy pipeline integration
Challenges we ran into
- Integrating real-time monitoring and AI analysis efficiently to keep reports timely and accurate.
- Ensuring secure, scalable OAuth and webhook integration with GitLab.
- Tuning Pub/Sub and Redis workflows for optimal performance.
Accomplishments that we're proud of
- Successfully deployed a robust, scalable solution on Google Cloud.
- Delivered precise carbon analytics using real monitoring data, significantly more accurate than industry averages.
- Built comprehensive integration points for GitLab and Slack, enhancing developer experience and immediate actionability.
What we learned
- Advanced utilization of Google Cloud services (Cloud Run, Vertex AI, Pub/Sub) for scalable, event-driven architectures.
- Deep integration techniques with GitLab CI/CD and OAuth mechanisms.
- Optimizing AI-driven data analysis for actionable sustainability insights.
What's next for GitGreen
- Enhancing AI capabilities for broader sustainability suggestions.
- Expanding integration with more cloud providers and additional collaboration tools.
- Building advanced analytics dashboards for deeper organizational insights.
Built With
- NestJS, TypeScript
- Google Cloud (Cloud Run, Cloud SQL, Vertex AI, Pub/Sub, Monitoring)
- Redis, BullMQ
- PostgreSQL
- Electricity Maps API
- GitLab API & OAuth
- Slack API
- Docker
Try it Out
For the technical deep-dive into GitGreen, see Project README
Log in or sign up for Devpost to join the conversation.