Initial implementation CI environments
This commit is contained in:
parent
7f8b0234b9
commit
047cedaab3
21 changed files with 850 additions and 42 deletions
|
|
@ -35,6 +35,7 @@ class BuildService
|
|||
|
||||
/**
|
||||
* @param Project $project
|
||||
* @param string $environment
|
||||
* @param string|null $commitId
|
||||
* @param string|null $branch
|
||||
* @param string|null $committerEmail
|
||||
|
|
@ -44,6 +45,7 @@ class BuildService
|
|||
*/
|
||||
public function createBuild(
|
||||
Project $project,
|
||||
$environment,
|
||||
$commitId = null,
|
||||
$branch = null,
|
||||
$committerEmail = null,
|
||||
|
|
@ -54,6 +56,10 @@ class BuildService
|
|||
$build->setCreated(new \DateTime());
|
||||
$build->setProject($project);
|
||||
$build->setStatus(0);
|
||||
$build->setEnvironment($environment);
|
||||
|
||||
$branches = $project->getBranchesByEnvironment($environment);
|
||||
$build->setExtraValue('branches', $branches);
|
||||
|
||||
if (!is_null($commitId)) {
|
||||
$build->setCommitId($commitId);
|
||||
|
|
@ -77,7 +83,7 @@ class BuildService
|
|||
}
|
||||
|
||||
if (!is_null($extra)) {
|
||||
$build->setExtra(json_encode($extra));
|
||||
$build->setExtraValues($extra);
|
||||
}
|
||||
|
||||
$build = $this->buildStore->save($build);
|
||||
|
|
|
|||
|
|
@ -84,6 +84,10 @@ class ProjectService
|
|||
$project->setGroup($options['group']);
|
||||
}
|
||||
|
||||
if (array_key_exists('environments', $options)) {
|
||||
$project->setEnvironments($options['environments']);
|
||||
}
|
||||
|
||||
// Allow certain project types to set access information:
|
||||
$this->processAccessInformation($project);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue