You are here

public function CircleV2::deploymentWasTriggered in Build Hooks 3.x

Same name and namespace in other branches
  1. 8.2 modules/build_hooks_circleci/src/Plugin/FrontendEnvironment/CircleV2.php \Drupal\build_hooks_circleci\Plugin\FrontendEnvironment\CircleV2::deploymentWasTriggered()

Determine if the deployment was triggered successfully.

Parameters

\Psr\Http\Message\ResponseInterface $response: Response for the trigger request.

Return value

bool TRUE if the deployment succeeded.

Overrides FrontendEnvironmentBase::deploymentWasTriggered

File

modules/build_hooks_circleci/src/Plugin/FrontendEnvironment/CircleV2.php, line 399

Class

CircleV2
Defines a circle v2 environment.

Namespace

Drupal\build_hooks_circleci\Plugin\FrontendEnvironment

Code

public function deploymentWasTriggered(ResponseInterface $response) : bool {
  return $response
    ->getStatusCode() < 300 && $response
    ->getStatusCode() >= 200;
}