Skip to content

HennaAbbas/generate_cci_usage_report

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 

Repository files navigation

CircleCI Usage Export Script

This script programmatically creates a usage export using the CircleCI v2 API and downloads related usage export reports locally.

Prerequisites

You can read more about CircleCI API token in the CircleCI docs here: https://circleci.com/docs/managing-api-tokens/#creating-a-personal-api-token

Getting Started

  1. Clone this repository

    git clone https://github.com/HennaAbbas/generate_cci_usage_report.git
    cd generate_cci_usage_report
    
  2. update environment variables We reccomend settings environment variables in a .env file. You will need to set the following enviornment variables: CIRCLE_TOKEN, ORG_ID, START_DATE,END_DATE Note: your org ID can be found on your organization settings page in CircleCI: https://circleci.com/docs/introduction-to-the-circleci-web-app/#organization-settings

  3. make the script executable

    chmod +x circleci_usage_export.sh
    
  4. Import environment variables and execute script

    set -o allexport; source .env; set +o allexport
    ./circleci_usage_export.sh

About

generate a usage report

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages