This project provides an architecture for a development lifecycle tooling system aimed at collecting metrics from various Git Systems. The system will collect and store metrics from multiple Git platforms and allow for periodic analysis.
Supported Platforms:
- Azure DevOps ADO SaaS
- Bitbucket SaaS
- Bitbucket Server
- GitHub SaaS
- GitHub Server
- GitLab SaaS
- GitLab Server
- Local Repository
Metrics Collected:
- User list from org
- Repository list (including branch list)
- Pipelines
- Last activity
- Recent commit history
The Multi-Git Architecture diagram illustrates the workflow for collecting and analyzing development lifecycle metrics from multiple Git systems. The architecture supports a range of Git platforms and provides a scalable solution for metric collection and analysis. Here’s a detailed breakdown of the components and their interactions:
-
Admin:
- Role: Configures and schedules the
Metrics Collection Pipeline
. - Interaction: Directs how the pipeline should collect metrics from each Git platform.
- Role: Configures and schedules the
-
Metrics Collection Pipeline:
- Role: A centralized pipeline that gathers metrics from various Git platforms.
- Function: Executes scheduled tasks to collect data on user activities, repository lists, pipelines, last activities, and recent commits from each integrated Git.
- Collected Metrics:
- User list from the organization
- Repository list (including branch list)
- Pipelines
- Last activity
- Recent commit history
- Interaction: Periodically collects data from the Git platforms and stores it in the
Metrics Database
.
-
Git Platforms:
- Components:
- Azure DevOps ADO SaaS
- Bitbucket SaaS
- Bitbucket Server
- GitHub SaaS
- GitHub Server
- GitLab SaaS
- GitLab Server
- Local Repository
- Role: Each Git platform provides specific metrics about development activities.
- Interaction: The
Metrics Collection Pipeline
interfaces with these platforms to extract relevant metrics.
- Components:
-
Metrics Database:
- Role: A centralized database (e.g., MongoDB) where all collected metrics are stored.
- Function: Provides persistent storage for the metrics, facilitating easy querying and analysis.
- Interaction: Receives data from the
Metrics Collection Pipeline
and makes it available for analysis.
-
Data Analyst:
- Role: Analyzes the stored metrics to generate insights and reports.
- Interaction: Queries the
Metrics Database
to retrieve and analyze the collected metrics data.
- Admin Configuration: The
Admin
configures theMetrics Collection Pipeline
to specify what metrics to collect and when. - Metrics Collection: The
Metrics Collection Pipeline
connects to each Git platform (including Azure DevOps, Bitbucket, GitHub, GitLab, and Local repositories) and gathers the defined metrics. This process runs on a scheduled basis (e.g., daily). - Data Storage: Collected metrics are stored in the
Metrics Database
. - Analysis: The
Data Analyst
accesses theMetrics Database
to perform analysis, create reports, and derive insights from the data.
This architecture supports an organized and scalable method for collecting and analyzing metrics from multiple Git platforms. It allows organizations to gain a comprehensive view of their development activities, enabling better decision-making based on accurate and timely metrics.
Store Data in MongoDB:
Modify your script to insert the collected metrics into MongoDB.
Example MongoDB insertion (using Python with pymongo):
from pymongo import MongoClient
client = MongoClient('mongodb://localhost:27017/')
db = client['metrics']
collection = db['metrics_data']
# Insert collected data
with open('user_list.txt') as f:
users = f.readlines()
collection.insert_one({'type': 'users', 'data': users})
Query the Database: Use MongoDB query tools or applications to analyze the stored metrics.
Contributions are welcome! Please submit a pull request or file an issue to discuss improvements or new features.
This project is licensed under the MIT License - see the LICENSE file for details.
- Overview: Describes the project goals and supported platforms.
- Current Implementation Example: Details the current state focusing on the local repository.
- Future Implementation: Provides a brief overview of planned support for multiple Git platforms.
- Setup Instructions: Guides users on setting up the local repository example.
- Contributing and License sections provide standard project guidelines.