You are here

private function CircleCiManager::buildCircleCiApiBuildUrlForEnvironment in Build Hooks 8.2

Same name and namespace in other branches
  1. 3.x modules/build_hooks_circleci/src/CircleCiManager.php \Drupal\build_hooks_circleci\CircleCiManager::buildCircleCiApiBuildUrlForEnvironment()

Build the url to trigger a circle ci build depending on the environment.

Parameters

array $config: The plugin configuration array.

Return value

string The url to call to trigger a deployment in the environment.

1 call to CircleCiManager::buildCircleCiApiBuildUrlForEnvironment()
CircleCiManager::getBuildHookDetailsForPluginConfiguration in modules/build_hooks_circleci/src/CircleCiManager.php
Returns the build hooks details based on plugin configuration.

File

modules/build_hooks_circleci/src/CircleCiManager.php, line 58

Class

CircleCiManager
Class CircleCiManager.

Namespace

Drupal\build_hooks_circleci

Code

private function buildCircleCiApiBuildUrlForEnvironment(array $config) {
  $circleCiConf = $this->configFactory
    ->get('build_hooks_circleci.settings');
  $apiKey = $circleCiConf
    ->get('circleci_api_key');
  return $this
    ->buildCircleciApiBasePathForEnvironment($config) . "build?circle-token={$apiKey}";
}