diff --git a/src/Command/CodeStudio/CodeStudioWizardCommand.php b/src/Command/CodeStudio/CodeStudioWizardCommand.php index b8053244d..fae3bca9a 100644 --- a/src/Command/CodeStudio/CodeStudioWizardCommand.php +++ b/src/Command/CodeStudio/CodeStudioWizardCommand.php @@ -119,6 +119,11 @@ protected function execute(InputInterface $input, OutputInterface $output): int $this->setGitLabCiCdVariablesForPhpProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $phpVersion); break; case "Node_project": + $parameters = [ + 'ci_config_path' => 'gitlab-ci/Auto-DevOps.acquia.gitlab-ci.yml@acquia/node-template', + ]; + $client = $this->getGitLabClient(); + $client->projects()->update($project['id'], $parameters); $this->setGitLabCiCdVariablesForNodeProject($project, $appUuid, $cloudKey, $cloudSecret, $projectAccessTokenName, $projectAccessToken, $nodeVersion); break; } diff --git a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php index 994d1fb7a..e431dcf12 100644 --- a/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php +++ b/tests/phpunit/src/Commands/CodeStudio/CodeStudioWizardCommandTest.php @@ -314,6 +314,13 @@ public function testCommand(array $mockedGitlabProjects, array $inputs, array $a Argument::type('string'), )->shouldBeCalled(); $this->mockGitLabVariables($this->gitLabProjectId, $projects); + + if ($inputs[0] === 'y' && ($inputs[1] === '1' || (array_key_exists(3, $inputs) && $inputs[3] === '1'))) { + $parameters = [ + 'ci_config_path' => 'gitlab-ci/Auto-DevOps.acquia.gitlab-ci.yml@acquia/node-template', + ]; + $projects->update($this->gitLabProjectId, $parameters)->shouldBeCalled(); + } $schedules = $this->prophet->prophesize(Schedules::class); $schedules->showAll($this->gitLabProjectId)->willReturn([]); $pipeline = ['id' => 1];