Giter VIP home page Giter VIP logo

deploy-bot's Introduction

DeployBot

Laravel Zero Deployment Bot for Envoyer.io.

This package gives you a starting point for separating your deployment hooks into an easily update-able cli that notifies you on slack for every step. Example commands for working with various tasks are included. Create a fork to customize this code for your deployment workflow.

#Environment Settings
SLACK_ENDPOINT=https://hooks.slack.com/services/XXX
SLACK_CHANNEL=#logger
SLACK_USERNAME=DeployBot
SLACK_EMOJI=:robot_face:

SNAPSHOTS_PATH=/home/forge/snapshots
ENVOYER_PRODUCTION_ID=XXX
ENVOYER_PRODUCTION_URL=https://app.com
ENVOYER_PRODUCTION_DATABASE=production

ENVOYER_STAGING_ID=XXX
ENVOYER_STAGING_URL=https://staging.app.com
ENVOYER_STAGING_DATABASE=staging

Built-In Updater

Install it un-compiled on your server and run deploybot update to pull in your latest changes and update dependencies.

deploybot update

~/.profile Shortcut

# DeployBot
function deploybot(){
    php ~/deploy-bot/deploybot "$@"
}

Custom Scripts (resources/scripts)

$bash = Bash::script('my/script', "arg1 arg2");

$bash->isSuccessful();

$collection = $bash->output();

if($error = $collection->where('type', 'error')->first()){
    dd($error->buffer);
}

Envoyer Hooks

Copy these hooks to your envoyer.io project and customize the commands for your needs.

#DeployBot-PreClone
php ~/deploy-bot/deploybot pre:clone staging {{ release }} {{ sha }};

#DeployBot-PostClone
php ~/deploy-bot/deploybot post:clone staging {{ release }} {{ sha }};

#DeployBot-PreInstall
php ~/deploy-bot/deploybot pre:install staging {{ release }} {{ sha }};

#DeployBot-PostInstall
php ~/deploy-bot/deploybot post:install staging {{ release }} {{ sha }};

#DeployBot-PreActivate
php ~/deploy-bot/deploybot pre:activate staging {{ release }} {{ sha }};

#DeployBot-PostActivate
php ~/deploy-bot/deploybot post:activate staging {{ release }} {{ sha }};

#DeployBot-PrePurge
php ~/deploy-bot/deploybot pre:purge staging {{ release }} {{ sha }};

#DeployBot-PostPurge
php ~/deploy-bot/deploybot post:purge staging {{ release }} {{ sha }};

deploy-bot's People

Contributors

bayareawebpro avatar

Stargazers

 avatar  avatar

Watchers

 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.