private function execDeploy($form, $model) { $models = Tasks::find()->byId($form->tasks_id)->all(); $hashItem = ArrayHelper::getColumn($models, 'hash'); $messageItem = ArrayHelper::getColumn($models, 'title'); $website = $model->website; DepControl::run(['deployScript' => $website->deploy_script, 'deployProject' => $website->deploy_project])->deploy(implode(';', $hashItem), implode(';', $messageItem)); }
public function actionPass($id) { /* @var Tasks $model */ $model = Tasks::find()->getById($id); WebsiteService::checkAccess($model->websites_id); $this->_tasksService->audit($model); return Json::encode(['status' => !$model->hasErrors()]); }
public function actionStatus($hash) { $model = Tasks::find()->getByHash($hash); $result = 0; if ($model) { $result = 1; } $this->stdout((int) $result); }
public function actionRedeploy($id) { $model = Deploy::find()->getById($id); WebsiteService::checkAccess($model->websites_id); $tasks = Tasks::find()->byWebsite($model->websites_id)->isPass()->all(); $service = new DeployService(); $form = $service->redeploy($model, \Yii::$app->request->post('DeployForm')); return $this->render('deploy', ['model' => $form, 'tasks' => $tasks]); }