Exemple #1
0
 /**
  * AJAX call to get build meta:
  */
 public function meta($buildId)
 {
     $build = BuildFactory::getBuildById($buildId);
     $key = $this->getParam('key', null);
     $numBuilds = $this->getParam('num_builds', 1);
     $data = null;
     if ($key && $build) {
         $data = $this->buildStore->getMeta($key, $build->getProjectId(), $buildId, $numBuilds);
     }
     die(json_encode($data));
 }
Exemple #2
0
 /**
  * AJAX call to get build meta:
  */
 public function meta($buildId)
 {
     $build = BuildFactory::getBuildById($buildId);
     $key = $this->getParam('key', null);
     $numBuilds = $this->getParam('num_builds', 1);
     $data = null;
     if ($key && $build) {
         $data = $this->buildStore->getMeta($key, $build->getProjectId(), $buildId, $build->getBranch(), $numBuilds);
     }
     $response = new JsonResponse();
     $response->setContent($data);
     return $response;
 }
Exemple #3
0
 /**
  * Fetch the summary data of the current build.
  *
  * @return array
  */
 private function getBuildSummary()
 {
     $build = $this->pluginFactory->getResourceFor('PHPCI\\Model\\Build');
     $metas = $this->store->getMeta('plugin-summary', $build->getProjectId(), $build->getId());
     return isset($metas[0]['meta_value']) ? $metas[0]['meta_value'] : array();
 }