Exemplo n.º 1
0
 /**
  * 部署后置触发任务
  * git代码检出之后,可能做一些调整处理,如vendor拷贝,配置环境适配(mv config-test.php config.php)
  *
  * @return bool
  * @throws \Exception
  */
 private function _postDeploy()
 {
     $task = new WalleTask();
     $sTime = Command::getMs();
     $task->setConfig($this->conf);
     $ret = $task->postDeploy($this->task->link_id);
     // 记录执行时间
     $duration = Command::getMs() - $sTime;
     Record::saveRecord($task, $this->task->id, Record::ACTION_POST_DEPLOY, $duration);
     if (!$ret) {
         throw new \Exception('后置任务操作失败');
     }
     return true;
 }