Code Monkey home page Code Monkey logo

passe-partout's Introduction

passe-partout

Passe-partout is a Lazy Decentralized Locking Mechanism.

Install

Usage

First you need to get a GitHub access token (you can generate one here: https://github.com/settings/tokens), then either you define the environment variable: PASSEPARTOUT_GITHUB_TOKEN=<your token> or use --token=<your token> option.

when working on http://github.com/owner/repo, three actions are supported: lock, unlock and status

$ passepartout lock owner/repo -r "Reason why I lock the deployment for this service"
locked
$ passepartout unlock owner/repo
unlocked
$ passepartout status owner/repo
unlocked

How it works

The command is adding (lock) or removing (unlock) a .lock file at the root of your repo. It DOES NOT ENFORCE the deployment of the service, it's the responsibality of the deployment tool to able the presence (or inexistance) of .lock

If relying on git push to deploy your service, this pre-push git hook would not allow you to push in case the service is locked:

#!/bin/bash

LOCK_FILE=$(git rev-parse --show-toplevel)/.lock
if [[ -f $LOCK_FILE ]]; then
    echo "deployment is locked"
    echo "reason: $(cat $LOCK_FILE)"
    exit 1
fi

Integration with Slack

Check out: https://github.com/boertel/passe-partout-bot

Etymology

Passe-partout is a fictional character from the game TV show Fort Boyard. His role is to keep keys collected by the players during multiples challenges.

passe-partout's People

Contributors

boertel avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.