Package: bitrise-reports
Bitrise ReportsWhatA simple cruncher for numbers derived from builds you run onBitrise CI. Useful if you are in charge of managing infrastructure capacity related to Bitrise, like detecting/reporting anomalies, evaluating queues impact and so on.Main features:Backed byBitrise REST APIunder the hoodCan compute timing (queued, running and total execution time) for all builds in the given time windowCan compute build statuses (success, failure or aborted) for all builds in the given time windowResults can be filtered by Git branch (egmasterormain)Result are detailed per machine type and also per WorkflowSupports emulation of consumedBitrise Velocity credits(for Enterprise customers)Report types : CLI (stdout), JSON and Excel spreadsheetThis tool is implemented with Python, being tested with versions3.8.x,3.9.xand3.10.xInstallingWith pipInstallbitrise-reportswithpip$>pipinstallbitrise-reportsWith Docker$>dockerpullghcr.io/dotanuki-labs/bitrise-reportsUsingLet's say you want analyse numbers for the projectandroid-flagship, learning from
builds that ran during April of 2021. You'll firstly need aBitrise Personal Access Tokenfor
that. Note you must be a member in the project you want to analyse.By running$>bitrise-reports\--token=$BITRISE_PAT_TOKEN\--app=android-flagship\--starting=2021-04-01\--ending=2021-04-30you should get something like that on your CLIwhich is a simple overview of what happened.Let's say now that you want to learn about how much time you are spending with queued builds.You can run then$>bitrise-reports\--token=$BITRISE_PAT_TOKEN\--app=android-flagship\--starting=2021-04-01\--ending=2021-04-30\--detailed-timingand get a report like this oneLast but not least, suppose you want to learn about execution status for all your Workflows that you run for events in yourmasterbranch (eg, push or a scheduled build).You can run$>bitrise-reports\--token=$BITRISE_PAT_TOKEN\--app=android-flagship\--starting=2021-04-01\--ending=2021-04-30\--target-branch=master\--detailed-buildsand get a report like about that tooCommand line interfaceThe complete list of CLI options:OptionDetailsRequiredtokenPersonal access token for Bitrise APIYesappThe title of your app in BitriseYesstartingStarting date in the target time frameYesendingEnding date in the target time frameYesdetailed-buildsDetails all statuses (success, failure and abortion) for buildsNodetailed-timingDetails timing (queued, running, total execution) for buildsNoemulate-velocityEstimate Bitrise Velocity credits consumedNotarget-branchFilters build by Git branchNoreport-styleThe style of report you wantNowherestartingandendingfollowYYYY-MM-DDconventionreport-styleacceptsstdout(default),jsonorexceldetailed-timingis a CLI flagdetailed-buildsis a CLI flagemulate-velocityis a CLI flagIf you opt-in for a specific report style, the corresponding file -bitrise-metrics.jsonorbitrise-metrics.xlsx- will be written in the same folder you are runnintbitrise-reports.Running with DockerGiven the current definition for the Container Image, all the previous examples are straitghtforward to run on top of Docker:$>dockerrun--rmghcr.io/dotanuki-labs/bitrise-reports\--token=$BITRISE_PAT_TOKEN\--app=android-flagship\--starting=2021-04-01\--ending=2021-04-30\--detailed-buildsWhen exporting reports (JSON or Excel) you should mount your current path upon Container'sworkdir$>dockerrun--rm-v"${PWD}:/reports"ghcr.io/dotanuki-labs/bitrise-reports\--token=$BITRISE_PAT_TOKEN\--app=android-flagship\--starting=2021-04-01\--ending=2021-04-30\--report-style=excelContributingIf you want to contribute with this projectCheck thecontribution guidelinesEnsure you have Python 3.8.+ installed. I recommendPyenvfor that.Ensure you havePoetryinstalledPrepare your environment$>makesetupCode you changesMake sure you have a green build$>makeinspecttestSubmit your PR 🔥AuthorCoded by Ubiratan Soares (follow me onTwitter)LicenseThe 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.