Skip to content

Hacky script/lambda to automate some part of my job :)

Notifications You must be signed in to change notification settings

clampcorder/kpi_fetcher

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This repo is very specific to a project at my last job, and not generalised at all

Exact pipeline KPI Tool

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)

Why is it cheeky?

  • 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

Where does it run?

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

About

Hacky script/lambda to automate some part of my job :)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published