CircleCI Tools
CircleCI Tools is a collection of utilities designed to enhance and streamline your CircleCI workflows. This CLI provides various commands to evaluate concurrency requirements, aggregate data, upload metrics, and generate usage reports.
Installation
To set up the project, follow these steps:
Clone the repository:
git clone https://github.com/sofatutor/circleci-tools.git cd circleci-toolsInstall the dependencies:
bundle install
Usage
The CLI provides the following commands:
evaluate: Evaluate concurrency requirements for self-hosted runners.
bin/circleci-metrics evaluate --org=ORG_NAME --project=PROJECT_NAMEaggregate: Aggregate data from an existing jobs JSON file.
bin/circleci-metrics aggregate --jobs_json=JOBS_JSON_PATHupload: Store aggregated CSV data into SQLite database for analysis.
bin/circleci-metrics upload --csv_file_path=CSV_FILE_PATHusage_report: Create usage export job, download CSV, and print file references.
bin/circleci-metrics usage_report --org_id=ORG_IDupload_metrics: Upload CloudWatch metrics from CSV file.
bin/circleci-metrics upload_metrics --csv_file_path=CSV_FILE_PATH
Contributing
We welcome contributions to enhance the functionality of CircleCI Tools. Please follow these steps to contribute:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Commit your changes with clear commit messages.
- Push your changes to your fork.
- Open a pull request with a detailed description of your changes.
License
This project is licensed under the MIT License.