Skip to main content

The missing tool to extract reports about projects you build on Bitrise

Project description

Bitrise Reports

Complete blog post to come. Stay tuned!

Context

Main features:

  • Backed by Bitrise REST API under the hood
  • Computes minutes for queued, building and total execution, for all builds in given a time frame
  • Breakdown numbers per machine type (aka Bitrise Build Stack) and also per Workflow
  • Supports emulation of consumed Bitrise Velocity credits (for Enterprise customers)
  • Report types : CLI (stdout), JSON and Excel spreadsheet

Installing

This tool requires Python, supporting versions 3.8.x and 3.9.x.

Install bitrise-reports with pip

 pip install bitrise-reports

Using

Let's say you want see analyse numbers for the project my-app, learning from the builds that ran during February of 2021. You'll firstly need a Bitrise Personal Access Token for that. Note you must be a member in the project you want to analyse.

By running

 bitrise-reports \
    --token=$BITRISE_PAT_TOKEN \
    --app=my-app \
    --starting=2021-02-01 \
    --ending=2021-02-28

you should get something like that on your CLI

The full list CLI options :

Option Details Required
token Personal access token for Bitrise API Yes
app The title of your app in Bitrise Yes
starting Starting date in the target time frame Yes
ending Ending date in the target time frame Yes
report The style of report you want No
velocity Estimate Bitrise Velocity credits consumed No

where

  • starting and ending follows YYYY-MM-DD convention
  • report accepts stdout (default), json and excel
  • velocityis a CLI flag

For instance, if you want an Excel spreadsheet instead of the fancy CLI UI from the previous example while also estimating Velocity usage for the builds, you can run

 bitrise-reports \
    --token=$BITRISE_PAT_TOKEN \
    --app=my-app \
    --starting=2021-02-01 \
    --ending=2021-02-28 \
    --report=excel \
    --velocity

and the output file bitrise-reports.xlsx will be available in the same folder.

Contributing

If you want to contribute with this project

  • Check the contribution guidelines
  • Ensure you have Python 3.8.x or newer installed
  • Ensure you have Poetry installed
  • Ensure you have Flake8 installed
  • Ensure you have Black installed
  • Prepare your environment
 make setup
  • Code you changes
  • Make sure you have a green build
  make inspect && make test
  • Submit your PR 🔥

Author

  • Coded by Ubiratan Soares (follow me on Twitter)

License

The MIT License (MIT)

Copyright (c) 2021 Dotanuki Labs

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bitrise-reports-0.0.1.tar.gz (11.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bitrise_reports-0.0.1-py3-none-any.whl (13.6 kB view details)

Uploaded Python 3

File details

Details for the file bitrise-reports-0.0.1.tar.gz.

File metadata

  • Download URL: bitrise-reports-0.0.1.tar.gz
  • Upload date:
  • Size: 11.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.6 Linux/5.4.0-1041-azure

File hashes

Hashes for bitrise-reports-0.0.1.tar.gz
Algorithm Hash digest
SHA256 959e877da4743dd07b44cbcd8f246d9bde7574cd34ab4b787c4541a9c3b9f88c
MD5 a053362aa3f4ef9f4338b651e1dec746
BLAKE2b-256 00270f4ee87cbabaf1275695f62b724ad48f56be24eac8e01615c5ee8ff3d096

See more details on using hashes here.

File details

Details for the file bitrise_reports-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: bitrise_reports-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 13.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.5 CPython/3.8.6 Linux/5.4.0-1041-azure

File hashes

Hashes for bitrise_reports-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2b9c8bbb6a498a91b3b334bd53a26cfe3c742319e3b455787a6aa5fdd3346282
MD5 e6137e9c85f6ed939e78bf2f454c7b07
BLAKE2b-256 4b1b35388b2def6c84284057b855a72a48a3516b5178d006a5761ebed5432c42

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page