An open API service indexing awesome lists of open source software.

https://github.com/wednesday-solutions/automated-dora-metrics

Ability to generate automated metrics for your every releases.
https://github.com/wednesday-solutions/automated-dora-metrics

automated-dora-metrics devops docker dora-metrics python release-automation shell-scripting wednesday-automated-dora-metrics wednesday-building-products

Last synced: 2 months ago
JSON representation

Ability to generate automated metrics for your every releases.

Awesome Lists containing this project

README

        





Automated DORA & Delivery Metrics



A tool to provide the ability to generate automated DORA and delivery metrics for your every release.

---




Expert teams of digital product strategists, developers, and designers.









We’re always looking for people who value their work, so come and join us. We are hiring!

---

- This repository demonstrates the power of automation in generating DORA and delivery metrics for your software releases. By utilizing the provided scripts and tools
- You can streamline the process of calculating and recording metrics for your projects.
- Once the metrics are generated, you can seamlessly push them to πŸ“£ [Compass](https://www.atlassian.com/software/compass) to keep track πŸ“ of your custom metrics effortlessly by following our instructions.
- We have hosted a docker image [here](https://hub.docker.com/repository/docker/abhimishraa/dorametrics/general)

---

### Metrics Included

Including this in your CI pipeline will automatically uncover detailed insights about your releases, and delivery efficiency.
The following metrics will be automatically calculated per release

- total number of releases - feature, bugfix, and hotfix release breakdown
- average features, bugs & hotfixes per release
- Hotfixes per release
- Bugs per feature
- Bug release ratio

### Getting started

- [Detailed usage guide](https://github.com/wednesday-solutions/automated-delivery-metrics/tree/main/guide/usage)
- [Quick usage summary](https://github.com/wednesday-solutions/automated-delivery-metrics/tree/main#for-getting-straight-into-commands-heres-how--)

#### For getting straight into commands, here's how :-

- βž• Generate metrics for recent release

```
docker run --rm
-v "$(pwd)/metrics":/app/metrics

-v "$(pwd)/.git":/app/.git

abhimishraa/dorametrics:latest --calculate-metrics

```

- βž• Generate metrics for your previous releases / pre-existing repository

_Considering your repository had followed strict git flow as stated [here](https://github.com/wednesday-solutions/automated-delivery-metrics/tree/main#for-getting-straight-into-commands-heres-how--)_

```
docker run --rm
-v "$(pwd)/metrics":/app/metrics

-v "$(pwd)/.git":/app/.git

abhimishraa/dorametrics:latest --calculate-metrics -e True

```

- If your parent / production branch is not `main`, specify it manually :-

```
docker run --rm -v $(pwd)/metrics:/app/metrics abhimishraa/dorametrics:latest --calculate-metrics -p
```

- πŸ“£ To notify Jira Compass with the generated metrics:

```
docker run --rm \
-e COMPASS_USER_EMAIL=$COMPASS_USER_EMAIL \
-e COMPASS_USER_API_KEY=$COMPASS_USER_API_KEY \
-e COMPASS_METRICS_BASE_URL=$COMPASS_METRICS_BASE_URL \
-v $(pwd):/app abhimishraa/dorametrics:latest \
--notify-compass "metrics/data.yaml" "metrics/target-metrics.yaml"
```

- For getting help from the metrics tool:-

```
docker run --rm abhimishraa/dorametrics:latest --calculate-metrics --help
```

- For more, please check out our detailed [documentation](https://github.com/wednesday-solutions/automated-delivery-metrics/tree/main/guide/usage) to understand in depth concepts.

---

#### Sample CI Pipeline to integrate into your production release workflow can be found [here](https://github.com/wednesday-solutions/automated-delivery-metrics/blob/main/.github/workflows/calculate-metrics.yml)

#### Structure of target-metrics.yaml

The target-metrics.yaml file defines the metrics you want to calculate and track. Customize the metrics and their associated IDs according to your project's needs.

The structure should be similar to what we have [here](https://github.com/wednesday-solutions/automated-delivery-metrics/tree/main/guide/target-metrics)

### πŸ›‘ Creating a Pull request πŸ›‘ :-

- The branch name must correspond to the ticket number such as `/-`
- For example:-

```
`feat/-1`
`chore/-6`
`docs/-7`
`bug/-2`
`fix/-5`
`bugfix/-2`
`hotfix/-3`
```

---

### πŸ“ Things to note while importing to an existing Git repository and limitations :-

##### 1 data.yaml

- Running this tool to an existing git repository `(-e True flag)` will list down all the merges done into your `main` branch and the count of it will be considered as the total number of releases which we can see in the `total_releases` section of the file itself.

##### 2 release.yaml

- Running this tool to an existing git repository `(-e True flag)` the time when you execute the --calculate-metrics command marks the initiation of the first release in this sequence.
- _Note_ πŸ›‘:- although we do get the `total_releases` in `data.yaml`, the tool does not has the ability to list break down every release (merge into `main`) branch and hence the release number in the list order will start from `1`

---

- **Important Note** πŸ›‘: Although there are some limitations while integrating this to an existing git repository as this tool was built with the focus of calculating the metrics for `next release cycles` that come into a `git branch (main)`, but it's crucial to recognize that correct metrics will be generated for all subsequent releases. The tool will seamlessly calculate and provide accurate metrics for your future releases. It's a powerful step toward enhancing your project's insights and tracking its progress effectively. Happy measuring! πŸ“ŠπŸš€