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.
To set up the project, follow these steps:
-
Clone the repository:
git clone https://github.com/sofatutor/circleci-tools.git cd circleci-tools
-
Install the dependencies:
bundle install
The CLI provides the following commands:
-
evaluate: Evaluate concurrency requirements for self-hosted runners.
bin/circleci-metrics evaluate --org=ORG_NAME --project=PROJECT_NAME
-
aggregate: Aggregate data from an existing jobs JSON file.
bin/circleci-metrics aggregate --jobs_json=JOBS_JSON_PATH
-
upload: Store aggregated CSV data into SQLite database for analysis.
bin/circleci-metrics upload --csv_file_path=CSV_FILE_PATH
-
usage_report: Create usage export job, download CSV, and upload to cloudwatch metrics (CircleCI/<PROJECT_NAME>)/s3
bin/circleci-metrics usage_report --org_id=CIRCLECI_ORG_ID --days_ago=1 --upload --s3_bucket=CI_LOG_BUCKET
-
upload_metrics: Upload CloudWatch metrics from CSV file.
bin/circleci-metrics upload_metrics --csv_file_path=CSV_FILE_PATH
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.
This project is licensed under the MIT License.