This commit is contained in:
caoyanyi
2023-09-05 11:23:58 +08:00
parent 923190bf5f
commit 269d424b8c
2 changed files with 6 additions and 2 deletions
+1 -1
View File
@@ -383,7 +383,7 @@ class job extends control
//if(strtolower($job->engine) == 'gitlab' and (!isset($job->reference) or !$job->reference)) return $this->send(array('result' => 'fail', 'message' => $this->lang->job->setReferenceTips, 'locate' => inlink('edit', "id=$jobID")));
$compile = $this->job->exec($jobID);
if(dao::isError()) return $this->sendError(dao::getError());
if(dao::isError()) return $this->sendError(implode('\n', dao::getError()));
$this->app->loadLang('compile');
$this->loadModel('action')->create('job', $jobID, 'executed');
+5 -1
View File
@@ -591,7 +591,11 @@ class jobModel extends model
$compile = new stdclass;
$pipeline = $this->loadModel('gitlab')->apiCreatePipeline($job->server, $pipeline->project, $pipelineParams);
if(empty($pipeline->id)) $compile->status = 'create_fail';
if(empty($pipeline->id))
{
$this->gitlab->apiErrorHandling($pipeline);
$compile->status = 'create_fail';
}
if(!empty($pipeline->id))
{