2017 © Pedro Peláez
 

library laravel-git-hook

Laravel Git Hook

image

webklex/laravel-git-hook

Laravel Git Hook

  • Wednesday, November 8, 2017
  • by webklex
  • Repository
  • 3 Watchers
  • 13 Stars
  • 389 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 4 Forks
  • 2 Open issues
  • 8 Versions
  • 9 % Grown

The README.md

Git hook deployment made for Laravel

Latest Version on Packagist ![Software License][ico-license] Build Status ![Total Downloads][ico-downloads], (*1)

Install

Via Composer, (*2)

``` bash $ composer require webklex/laravel-git-hook, (*3)


## Setup Add the service provider to the providers array in `config/app.php`. ``` php 'providers' => [ Webklex\GitHook\Providers\LaravelServiceProvider::class, ];

Publishing

You can publish everything at once, (*4)

``` php php artisan vendor:publish --provider="Webklex\GitHook\Providers\LaravelServiceProvider", (*5)


## Usage This library is designed to handle the automatic deployment by git hooks as simple as possible. There isn't much todo to get started: just add the Provider and edit the `config/git-hook.php` file to make it fit your needs. Custom configuration can be made within the `config/git-hook.php` file: | Parameter | Default | Options | Description | | ------------------ | :-------------------------------: | :---------------------------------------: | --------------------------------------------------------------------------------------------------------: | | email_recipients | `[]` | `[['name' => '', 'address' => ''], ...]` | Get notified by mail. Just add your credentials | | email_email_sender | `['address' => '', 'name' => '']` | `['address' => '', 'name' => '']` | Specify a custom email sender address | | repo_path | `null` | Leave empty to auto detect the vcs root | Perhaps your repository is somehow specially structured, if that's the case, specify your repository path | | allowed_sources | `[]` | `['192.168.1.1', '192.168.1.2', ...]` | If you want to secure the deployment process a bit more, whitelist the remote repository IPs | | remote | `origin` | | Your remote branch name | | git_path | `/usr/bin/git` | | Where is the git binary located | | logfile | `git-hook` | | Name of the logfile. It will be stored under storage/logs | | service | `github` | `github`, `gitbucket`, `gitlab` | Define your remote git service. This is required to identify the payload | | url | `git-hook` | | Define the deployment url. Keep in mind, that the given parameter will be added to your app.url | | before_pull | `[]` | `['down', ['cmd', ['arg1' => 1]]]` | If you have any commands that have to be called before a pull event, specify them here | | after_pull | `[]` | `['cmd', ['cmd1', ['arg1' => 1]], 'up']` | If you have any commands that have to be called after a pull event, specify them here | If you are concerned someone could guess it, use a more cryptic url such as: `JHFUjhd67567JHFGhsd78236784wegfJHFghdgf` ## Potential problems: Please make sure your `www-data` user can actually perform a git pull on the server without having to enter a password: so you might want to take a look at ssh-keys or something similar ## Change log Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently. ## Testing ``` bash $ composer test

Security

If you discover any security related issues, please email github@webklex.com instead of using the issue tracker., (*6)

Credits

License

The MIT License (MIT). Please see License File for more information., (*7)

The Versions

08/11 2017

dev-master

9999999-dev https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git deployment git hook webklex laravel-git-hook laravel deployment auto deployment

08/11 2017

1.0.1.7

1.0.1.7 https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git deployment git hook webklex laravel-git-hook laravel deployment auto deployment

05/03 2017

1.0.1.6

1.0.1.6 https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git git hook webklex laravel-git-hook

05/03 2017

1.0.1.5

1.0.1.5 https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git git hook webklex laravel-git-hook

05/03 2017

1.0.1.4

1.0.1.4 https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git git hook webklex laravel-git-hook

05/03 2017

1.0.1.3

1.0.1.3 https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git git hook webklex laravel-git-hook

04/03 2017

1.0.1.2

1.0.1.2 https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git git hook webklex laravel-git-hook

04/03 2017

1.0.1

1.0.1.0 https://github.com/webklex/laravel-git-hook

Laravel Git Hook

  Sources   Download

MIT

The Requires

 

by Malte Goldenbaum

laravel hook git git hook webklex laravel-git-hook