Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x Pass db-only flag intent along to the environments() create method. #454

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/Commands/BuildToolsBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -1019,12 +1019,13 @@ function ($a, $b) {
*
* @param string $site_env Source site and environment.
* @param string $multidev Name of environment to create.
* @param array $options Create options.
*/
public function create($site_env, $multidev)
public function create($site_env, $multidev, array $options = [])
{
list($site, $env) = $this->getSiteEnv($site_env, 'dev');
$this->log()->notice("Creating multidev {env} for site {site}", ['site' => $site->getName(), 'env' => $multidev]);
$workflow = $site->getEnvironments()->create($multidev, $env);
$workflow = $site->getEnvironments()->create($multidev, $env, $options);
while (!$workflow->checkProgress()) {
// TODO: Add workflow progress output
}
Expand Down
10 changes: 8 additions & 2 deletions src/Commands/EnvCreateCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ public function createBuildEnv(
// will not be applied unless we push our change.
// To allow pantheon.yml to be processed, we will
// create the multidev environment, and then push the code.
$this->create($site_env_id, $multidev);
$this->create($site_env_id, $multidev, [
'no-db' => !$options['db-only'],
'no-files' => $options['db-only'],
]);
$doNotify = true;
}

Expand All @@ -100,7 +103,10 @@ public function createBuildEnv(
// If the environment is created after the branch is pushed,
// then there is never a race condition -- the new env is
// created with the correct files from the specified branch.
$this->create($site_env_id, $multidev);
$this->create($site_env_id, $multidev, [
'no-db' => !$options['db-only'],
'no-files' => $options['db-only'],
]);
$doNotify = true;
}

Expand Down