Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

SeisoLLC/release_monitor

Repository files navigation

This project has been archived; please see its replacement over at ReleaseHound

Release Monitor

This project uses the unauthenticated GitHub APIs to identify if the provided commit is in a stable release for the provided account/repo. It is meant to be run periodically to identify when a release with the provided commit is detected.

Prereqs

  1. A lambda named "release_monitor", with a "lambda_function.lambda_handler" Handler, and Python 3.8 runtime.
  2. An API Gateway attached to the lambda with AWS_IAM authorization required, named "release_monitor", and "Invoke with caller credentials" enabled.
  3. Successful authentication to AWS with credentials that have access to lambda and API Gateway. For simplicity, we recommend using environment variables. If your environment uses roles, you may want to consider an approach such as this.
  4. The project you are looking to monitor uses actual GitHub releases, not just tags (which sometimes show in the GitHub web UI as releases).

Quickstart

Ensure all of the prereqs are met prior to running these steps.

  1. Make a reusable alias.
alias awsdocker="docker run --rm -it --env-file <(env | grep AWS_) -v \$(pwd):/usr/src/app/ -v \${HOME}/.aws:/root/.aws seiso/easy_infra:latest-terraform-aws aws"
  1. Build and deploy the lambda.
make deploy
  1. Get your REST api ID
awsdocker apigateway get-rest-apis | jq -r '.[][]["id"]'
  1. Query the lambda via API Gateway.
ACCOUNT=jonzeolla
REPOSITORY=release_monitor
COMMIT=2315efa04cd4a415916c654f26570a17b9195279
API_ID=example
./client.py --account $ACCOUNT --repository $REPOSITORY --commit $COMMIT --rest-api-id $API_ID