Added branch and update_only parameters

Fixes #1127
This commit is contained in:
Stephen Ball 2015-11-14 23:08:22 +00:00
parent 6eb180ed5f
commit 6eeddc9dc6

View file

@ -23,6 +23,7 @@ class Deployer implements \PHPCI\Plugin
{
protected $webhookUrl;
protected $reason;
protected $updateOnly;
/**
* Set up the plugin, configure options, etc.
@ -43,6 +44,8 @@ class Deployer implements \PHPCI\Plugin
if (isset($options['reason'])) {
$this->reason = $options['reason'];
}
$this->updateOnly = isset($options['update_only']) ? (bool) $options['update_only'] : true;
}
/**
@ -61,6 +64,8 @@ class Deployer implements \PHPCI\Plugin
'reason' => $this->phpci->interpolate($this->reason),
'source' => 'PHPCI',
'url' => $this->phpci->interpolate('%BUILD_URI%'),
'branch' => $this->phpci->interpolate('%BRANCH%'),
'update_only' => $this->updateOnly
));
return $response['success'];