handwheel

command module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 30, 2025 License: GPL-2.0 Imports: 1 Imported by: 0

README

deployments_frequency lead_time_for_changes

Handler Project

DevOps Research and Assessment (DORA) enables organizations to measure the speed and reliability of customer value delivery. Two core velocity metrics include:

  • Deployment Frequency — How frequently code deploys successfully to production.
  • Lead Time for Changes — The duration from code commit to production deployment.

Handler simplifies capturing these metrics by automatically tracking container images across deployment environments and reporting events to DevLake. This eliminates manual pipeline instrumentation, enabling seamless DORA reporting with minimal configuration

Check dora-badges for badges and stats.

Getting Started

In order handler to work, docker images during build time need to be labeled, handler has to know where to fetch data from and where to push events to.

Label images

During build time add following labels:

repo_url - where the docker is build
commit_sha - full commit sha which triggered the build

In ko builder this could be done with:

ko build --sbom=none --platform=linux/amd64 --tags=$VERSION --image-label="repo_url=${{ github.event.repository.html_url }},commit_sha=${{ github.sha }}"

See ko-build.yaml for more details

For docker build docker this could be done throug dockerfile or buildx

Configure devlake

Devlake allows different configurations of projects see tutorial

The minimum is required:

  • Data connection
  • Data scope (under the details in data connection) - points what Git repose to track
  • Scope config - describes what to fetch
  • Project - in a simpliest form on per data connection
  • Webhook - endpoint to push deployments

Setup handler

Modify values.yaml file (see schema for descriptions)

  • Point to prometheus instance to read the data
  • Define in crane section docker registry credentials and url to fetch image labels
  • devlake section to assign patterns of images to devlake projects.

Deploy the handler with updated helm values

Test

Go to devlake grafana and check metrics - check DORA Validation, DORA Details - Deployment Frequency and DORA Details - Lead Time for Changes dashboards

If handler-badges are installed check url

<handler-badge host>/v1/Tiktai-handler/df - to check are deployments pushed
<handler-badge host>/v1/Tiktai-handler/ltfc-stats - to check lead time for changes

Running Locally

To start the server:

go run . --config ./.image-handler.yaml 

Project Structure

  • cmd/ - Main application entry point(s)
    • root.go - Primary command logic
  • integrations/ - Integrations with external services
    • crane.go - Crane integration
    • prometheus.go - Prometheus metrics integration
  • logic/ - Core business logic (currently empty)
  • model/ - Data models and configuration
    • config.go - Configuration structures
    • data.go - Data types
  • routing/ - Routing logic
    • devlake.go - DevLake routing

License

See LICENSE for details.


Generated on 2025-05-17

Documentation

Overview

Copyright © 2025 NAME HERE <EMAIL ADDRESS>

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL