This repo is very specific to a project at my last job, and not generalised at all
This is a cheeky little tool that fetches some metrics from an Azure Devops pipeline (The Exact YAML one) for reporting on that.
This is meant to be a supplement to the analytics and reporting that natively come out of Azure Devops, and one day will likely be made obsolete by improvements in their platform (huge fucking 🤞 on that one)
- It doesn't even return proper json, just a blob of text that contains json
- It's janky as hell
- Hardcoded config
- Uses someones personal access token XP
In AWS Lambda, inside the account soei-sandbox
in the ap-southeast-2 region. here is a link.
🔑 - In order to run it needs a personal access token. This is provided to the tool via an environment variable named AZURE_DEVOPS_PAT
, this can be configured in the AWS lambda config page here, which any inheritors of this project will need to do, as my tokens will be revoked before 2021-10-01.
🔧 - Configuration is currently managed by a bunch of global variables at the top of main.py.
💡 - Ideas for extension could be:
- query parameters to override some options
- path based routing to query different pipelines
- or using environment variables and hosting separate lambdas
- pulling in to an Azure Function app instead of AWS lambda 🤢
Good luck, have fun