Moved handleConfig functionality into general Build method.
This commit is contained in:
parent
60bf262ee7
commit
ea35f24d47
4 changed files with 26 additions and 48 deletions
|
|
@ -11,7 +11,6 @@ namespace PHPCI\Model\Build;
|
|||
|
||||
use PHPCI\Model\Build;
|
||||
use PHPCI\Builder;
|
||||
use Symfony\Component\Yaml\Parser as YamlParser;
|
||||
|
||||
/**
|
||||
* Remote Git Build Model
|
||||
|
|
@ -47,20 +46,7 @@ class RemoteGitBuild extends Build
|
|||
return false;
|
||||
}
|
||||
|
||||
$build_config = $this->getProject()->getBuildConfig();
|
||||
if (!$build_config)
|
||||
{
|
||||
if (!is_file($buildPath . '/phpci.yml')) {
|
||||
$builder->logFailure('Project does not contain a phpci.yml file.');
|
||||
return false;
|
||||
}
|
||||
$build_config = file_get_contents($buildPath . '/phpci.yml');
|
||||
}
|
||||
|
||||
$yamlParser = new YamlParser();
|
||||
$builder->setConfigArray($yamlParser->parse($build_config));
|
||||
|
||||
return true;
|
||||
return $this->handleConfig($builder, $buildPath);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue