* Fix the bug that compile can run scheduled job.

This commit is contained in:
dingguodong
2021-10-27 10:39:54 +08:00
parent fff67388f8
commit e7c337c8b5
+3 -3
View File
@@ -121,7 +121,7 @@ class compileModel extends model
*/
public function exec($compile)
{
$job = $this->dao->select('t1.id,t1.name,t1.repo,t1.pipeline,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password')
$job = $this->dao->select('t1.id,t1.name,t1.repo,t1.engine,t1.pipeline,t2.name as jenkinsName,t2.url,t2.account,t2.token,t2.password')
->from(TABLE_JOB)->alias('t1')
->leftJoin(TABLE_PIPELINE)->alias('t2')->on('t1.server=t2.id')
->where('t1.id')->eq($compile->job)
@@ -150,8 +150,8 @@ class compileModel extends model
$this->dao->update(TABLE_COMPILE)->data($compile)->where('id')->eq($compileID)->exec();
$this->dao->update(TABLE_JOB)
->set('lastStatus')->eq($build->status)
->set('lastExec')->eq($build->updateDate)
->set('lastStatus')->eq($compile->status)
->set('lastExec')->eq($compile->updateDate)
->where('id')->eq($job->id)
->exec();