Exemple #1
0
 /**
  * Executes the task.
  *
  * @param PayloadInterface|DeploymentPayload $payload
  *
  * @return null|int The exit status code
  */
 public function run(PayloadInterface $payload)
 {
     $command = $this->getOption('command');
     $cwd = $this->getOption('cwd', '/');
     if ($payload->isDryRun()) {
         return 0;
     }
     return $this->exec($command, $cwd);
 }
Exemple #2
0
 /**
  * Executes the task.
  *
  * @param PayloadInterface|DeploymentPayload $payload
  *
  * @return null|int The exit status code
  */
 public function run(PayloadInterface $payload)
 {
     $command = $this->getOption('command');
     $timeout = $this->getOption('timeout', 60);
     $cwd = $this->getOption('cwd', $payload->getProjectDirectory());
     if ($payload->isDryRun()) {
         return 0;
     }
     return $this->exec($command, $cwd, $timeout)->getExitCode();
 }
 /**
  * Executes the task.
  *
  * @param PayloadInterface $payload
  *
  * @return null
  */
 public function run(PayloadInterface $payload)
 {
     $this->runCounter++;
     if ($this->runCounter <= $this->failCount) {
         // 2 retries triggered by method
         $this->retry();
     }
     /** @var ArrayPayload $payload */
     $payload->setData(array_merge($payload->getData(), array(__CLASS__ => true)));
 }
Exemple #4
0
 /**
  * Executes the task.
  *
  * @param PayloadInterface $payload
  *
  * @return null
  */
 public function run(PayloadInterface $payload)
 {
     /** @var ArrayPayload $payload */
     $payload->setData(array_merge($payload->getData(), array(__CLASS__ => true)));
 }