hodor

command module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2022 License: MIT Imports: 13 Imported by: 0

README

Hookable Deployment of Releases

Go Tests Coverage Status Go Report Card Go Reference

Hodor is a service that deploys releases locally based on HTTP requests. It can be used from a CI/CD to automatically deploy the new version of a software.

The service has two components: a server and a deployer. The server is an http server that provides the following endpoints:

// POST /api/hook/:releaseID
// GET /api/status/:jobID
// GET /api/tags/:releaseID

The first endpoint triggers a new deployment and returns a jobID:

curl -X POST -d '{"browser_download_url": "<a valid URL>.tar.gz", "tag": "<optional tag>"}' /api/hook/o2vie
→ application/json
{"jobID": "<Job id>"}

The second endpoint return the status of a job, given a jobID. It doesn't take any input as the job is in the URL:

curl -X GET /api/status/<jobID>   
→ application/json
{"status":"<status>","message":"<status message>"}

It is possible to get the latest deployed tag of a release, as a shields.io badge, or in plain text:

# Get shields.io badge:
curl -X GET /api/tags/<releaseID>?format=SVG
→ text/html
<svg>...</svg>

# Get in plain text:
curl -X GET /api/tags/<releaseID>
→ text/plain
v1.0.0

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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