Merge branch 'master' of github.com:Block8/PHPCI
This commit is contained in:
commit
dd27695bed
|
@ -121,7 +121,7 @@ class Builder implements LoggerAwareInterface
|
|||
|
||||
$pluginFactory = $this->buildPluginFactory($build);
|
||||
$pluginFactory->addConfigFromFile(PHPCI_DIR . "/pluginconfig.php");
|
||||
$this->pluginExecutor = new Plugin\Util\Executor($pluginFactory, $this);
|
||||
$this->pluginExecutor = new Plugin\Util\Executor($pluginFactory, $this->buildLogger);
|
||||
|
||||
$this->commandExecutor = new CommandExecutor(
|
||||
$this->buildLogger,
|
||||
|
|
|
@ -97,7 +97,7 @@ class WebhookController extends \PHPCI\Controller
|
|||
}
|
||||
|
||||
try {
|
||||
$this->_buildStore->save($build);
|
||||
$this->buildStore->save($build); /** bugfix: Errors with PHPCI GitHub hook #296 */
|
||||
} catch (\Exception $ex) {
|
||||
header('HTTP/1.1 500 Internal Server Error');
|
||||
header('Ex: ' . $ex->getMessage());
|
||||
|
|
|
@ -20,7 +20,14 @@ use PHPCI\Model\Build;
|
|||
*/
|
||||
class Codeception implements \PHPCI\Plugin
|
||||
{
|
||||
protected $args;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
protected $args = '';
|
||||
|
||||
/**
|
||||
* @var Builder
|
||||
*/
|
||||
protected $phpci;
|
||||
|
||||
/**
|
||||
|
@ -35,9 +42,8 @@ class Codeception implements \PHPCI\Plugin
|
|||
if (isset($options['config'])) {
|
||||
$this->xmlConfigFile = $options['config'];
|
||||
}
|
||||
|
||||
if (isset($options['args'])) {
|
||||
$this->args = $options['args'];
|
||||
$this->args = (string) $options['args'];
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -69,9 +75,9 @@ class Codeception implements \PHPCI\Plugin
|
|||
return false;
|
||||
}
|
||||
|
||||
$cmd = 'cd "%s" && ' . $codecept . ' run -c "%s"';
|
||||
$cmd = 'cd "%s" && ' . $codecept . ' run -c "%s" '. $this->args;
|
||||
if (IS_WIN) {
|
||||
$cmd = 'cd /d "%s" && ' . $codecept . ' run -c "%s"';
|
||||
$cmd = 'cd /d "%s" && ' . $codecept . ' run -c "%s" '. $this->args;
|
||||
}
|
||||
$success = $this->phpci->executeCommand($cmd, $this->phpci->buildPath, $this->phpci->buildPath . $configPath);
|
||||
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<ul class="nav nav-pills nav-stacked">
|
||||
<li><a href="<?php echo PHPCI_URL ?>build/rebuild/<?php print $build->getId(); ?>"><i class="icon-cog"></i> Rebuild</a></li>
|
||||
<?php if($this->User()->getIsAdmin()): ?>
|
||||
<li><a href="#" id="delete-build"><i class="icon-trash"></i> Delete Build</a></li>
|
||||
<li><a href="<?php echo PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>" id="delete-build"><i class="icon-trash"></i> Delete Build</a></li>
|
||||
<?php endif; ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -44,5 +44,13 @@ foreach ($plugins as $plugin) {
|
|||
<script>
|
||||
$(document).ready(function() {
|
||||
PHPCI.renderPlugins();
|
||||
|
||||
$('#delete-build').on('click', function (e) {
|
||||
e.preventDefault();
|
||||
confirmDelete(
|
||||
"<?php echo PHPCI_URL ?>build/delete/<?php print $build->getId(); ?>", "Build"
|
||||
).onCloseConfirmed = function () {window.location = '/'};
|
||||
});
|
||||
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue