Skip to content

Commit

Permalink
DX-4969: Support Code Studio CI (#4423)
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell authored Nov 18, 2021
1 parent a0f6b8d commit 4aba896
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 11 deletions.
8 changes: 8 additions & 0 deletions settings/codestudio.settings.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<?php

/**
* @file
* Code Studio settings.
*/

$databases['default']['default']['host'] = 'mysql';
12 changes: 2 additions & 10 deletions settings/pipelines.settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,5 @@
* Pipelines environment specific settings.
*/

$databases['default']['default'] = [
'database' => 'drupal',
'username' => 'root',
'password' => 'root',
'host' => '127.0.0.1',
'port' => '3306',
'namespace' => 'Drupal\\Core\\Database\\Driver\\mysql',
'driver' => 'mysql',
'prefix' => '',
];
$databases['default']['default']['username'] = 'root';
$databases['default']['default']['password'] = 'root';
10 changes: 9 additions & 1 deletion src/Robo/Common/EnvironmentDetector.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ public static function getCiEnv() {
return current($results);
}

return isset($_ENV['PIPELINE_ENV']) ? 'pipelines' : FALSE;
if (isset($_ENV['PIPELINE_ENV'])) {
return 'pipelines';
}

if (isset($_ENV['GITLAB_CI_TOKEN'])) {
return 'codestudio';
}

return FALSE;
}

/**
Expand Down

0 comments on commit 4aba896

Please sign in to comment.