2017 © Pedro Peláez
 

library autodeploy

Bitbucket webhook auto deployer

image

tiorafa/autodeploy

Bitbucket webhook auto deployer

  • Friday, January 27, 2017
  • by ti0rafa
  • Repository
  • 2 Watchers
  • 1 Stars
  • 11 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 10 % Grown

The README.md

Autodeploy

Process Bitbucket webhook 2.0, please be advise that this is a work in progress., (*1)

Installation

Using composer, (*2)

$ composer require tiorafa/autodeploy

Usage

Create a PHP similar to this:, (*3)

<?php

require_once 'composer/autoload.php'; // autoloader

use AutoDeploy\Handler;

$Handler = new Handler();
$Handler->add('team/repo_name', [
    'branch' => 'master',
    'folder' => 'folder_name',
    'destination' => '/var/www/test/repos'
]);

$Handler->register();

Point Bitbucket's webhook to that file., (*4)

Configure user running php

The user running php must be configured correctly. Please make sure to check any of the following steps., (*5)

Figure who is running php

To figure out who is running run whoami in a php script, create a file with the following code:, (*6)

<?php

exec('whoami');

Common values are:, (*7)

  • www-data
  • apache
  • etc.

The following steps will use www-data but please change it to what ever user your php is running from., (*8)

Paths must be writable

Make your sure destination is writable for www-data, (*9)

$ sudo chown www-data {destination_path}
Configure ssh
$ sudo -u www-data ssh-keygen -t rsa

You may need to create a .ssh directory somewhere in the file system with access for www-data., (*10)

The Versions

27/01 2017

dev-master

9999999-dev

Bitbucket webhook auto deployer

  Sources   Download

MIT

27/01 2017

0.0.4

0.0.4.0

Bitbucket webhook auto deployer

  Sources   Download

MIT

26/01 2017

0.0.3

0.0.3.0

Bitbucket webhook auto deployer

  Sources   Download

MIT

19/01 2017

0.0.2

0.0.2.0

Bitbucket webhook auto deployer

  Sources   Download

MIT

19/01 2017

0.0.1

0.0.1.0

Bitbucket webhook auto deployer

  Sources   Download

MIT