The project focuses on providing functionality to calculate total pipeline minutes per project in a given time.
The project is inspired from Bitbucket Pipelines Pipe: Bitbucket build statistics. https://bitbucket.org/atlassian/bitbucket-build-statistics/src/master/
The Objective:
- Understanding the pipeline duration usage for each project in the workspace.
- Bitbucket has a pipe to display pipeline minute usage, but the disadvantage of adding the usage pipe in Bitbucket pipelines itself thus increasing the duration.
Current script is setup to fetch pipeline duration for past 31 days (1 month).
- Node.js
- Javascript
- Bitbucket REST
- commander
Instructions on setting up your project. To get the project running follow these simple example steps.
- npm
npm install npm@latest -g
- Clone the repo
git clone https://github.com/prajyotpro/bitbucket-pipeline-duration.git
- Install NPM packages
npm install
node index.js -w <workspace> -t <token>
Required:
- -w --workspace Bitbucket workspace slug.
- -t --token Bitbucket Basic Auth Token: https://developer.atlassian.com/server/bitbucket/how-tos/example-basic-authentication/.
Optional:
- -d --days Duration in days.
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the Apache License. See LICENSE
for more information.
Prajyot Khandeparkar - @prajyotpro