gitness
gitness copied to clipboard
RFC for new badge type: deployments
Idea
Add a badge type of deployments
to consume the deployment
status from Drone CI
Use Case
We're using deployments
more and more. The current badge
status approach is limited to type build
and a query for branch
. Exposing a badge of deployment
would allow endpoints to consume and present a visualization of status for deployment x
.
Possible Approach
The interface would be similar to the existing structure:
Status | Type | Filter | Example |
---|---|---|---|
Current | Branch | N/A | https://host/api/badges/org/repo/status.svg |
Current | Branch | branch=foo | https://host/api/badges/org/repo/status.svg?branch=foo |
New | Deployment | deployment=bar | https://host/api/badges/org/repo/status.svg?deployment=foo |
Effort
The idea would be to refactor badges.go
to allow deployments
as a badge type.
Thoughts?
Rather than using a special logic for deployment
, having a badge for each build step would be sufficient.
pipeline:
build:
deploy:
extra:
Getting a badge via https://host/api/badges/org/repo/status.svg?step=[deploy|build|extra]&branch=...
would be great.