ignore to exec jenkins job if not exist
This commit is contained in:
@@ -158,8 +158,9 @@ class ci extends control
|
||||
*/
|
||||
public function exeJob($id)
|
||||
{
|
||||
$this->ci->exeJob($id);
|
||||
$result = $this->ci->exeJob($id);
|
||||
if(dao::isError()) $this->send(array('result' => 'fail', 'message' => dao::getError()));
|
||||
if(!$result) $this->send(array('result' => 'fail', 'message' => 'not found'));
|
||||
|
||||
$this->send(array('result' => 'success'));
|
||||
}
|
||||
|
||||
@@ -184,6 +184,10 @@ class ciModel extends model
|
||||
->where('job.id')->eq($jobID)
|
||||
->fetch();
|
||||
|
||||
if (!$po) {
|
||||
return false;
|
||||
}
|
||||
|
||||
$jenkinsServer = $po->serviceUrl;
|
||||
$jenkinsUser = $po->account;
|
||||
$jenkinsTokenOrPassword = $po->token ? $po->token : base64_decode($po->password);
|
||||
|
||||
Reference in New Issue
Block a user