test svn sync
This commit is contained in:
@@ -93,8 +93,8 @@ class ci extends control
|
||||
$this->view->position[] = html::a(inlink('browseJob'), $this->lang->ci->job);
|
||||
$this->view->position[] = $this->lang->ci->create;
|
||||
|
||||
$this->view->repoList = $this->loadModel('cirepo')->listForSelection("true");
|
||||
$this->view->jenkinsList = $this->loadModel('cijenkins')->listForSelection("true");
|
||||
$this->view->repoList = $this->loadModel('repo')->listForSelection("true");
|
||||
$this->view->jenkinsList = $this->loadModel('jenkins')->listForSelection("true");
|
||||
|
||||
$this->display();
|
||||
}
|
||||
@@ -120,8 +120,8 @@ class ci extends control
|
||||
|
||||
$this->view->job = $job;
|
||||
|
||||
$this->view->repoList = $this->loadModel('cirepo')->listForSelection("true");
|
||||
$this->view->jenkinsList = $this->loadModel('cijenkins')->listForSelection("true");
|
||||
$this->view->repoList = $this->loadModel('repo')->listForSelection("true");
|
||||
$this->view->jenkinsList = $this->loadModel('jenkins')->listForSelection("true");
|
||||
|
||||
$this->view->title = $this->lang->ci->job . $this->lang->colon . $this->lang->ci->edit;
|
||||
$this->view->position[] = html::a(inlink('browseJob'), $this->lang->ci->job);
|
||||
|
||||
@@ -225,8 +225,8 @@ class gitModel extends model
|
||||
*/
|
||||
public function setRepos()
|
||||
{
|
||||
$cirepo = $this->loadModel('cirepo');
|
||||
$repoObjs = $cirepo->listForSync("true");
|
||||
$repo = $this->loadModel('repo');
|
||||
$repoObjs = $repo->listForSync("SCM='Git'");
|
||||
|
||||
$gitRepos = [];
|
||||
$paths = [];
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* The model file of cijenkins module of ZenTaoPMS.
|
||||
* The model file of jenkins module of ZenTaoPMS.
|
||||
*
|
||||
* @copyright Copyright 2009-2015 青岛易软天创网络科技有限公司(QingDao Nature Easy Soft Network Technology Co,LTD, www.cnezsoft.com)
|
||||
* @license ZPL (http://zpl.pub/page/zplv12.html)
|
||||
|
||||
@@ -1109,4 +1109,35 @@ class repoModel extends model
|
||||
}
|
||||
return $replaceLines;
|
||||
}
|
||||
|
||||
/**
|
||||
* list repos for jenkins job edit
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function listForSelection($whr)
|
||||
{
|
||||
$repos = $this->dao->select('id, name')->from(TABLE_REPO)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF(!empty(whr))->andWhere('(' . $whr . ')')->fi()
|
||||
->orderBy(id)
|
||||
->fetchPairs();
|
||||
$repos[''] = '';
|
||||
return $repos;
|
||||
}
|
||||
|
||||
/**
|
||||
* list repos for sync
|
||||
*
|
||||
* @return mixed
|
||||
*/
|
||||
public function listForSync($whr)
|
||||
{
|
||||
$repos = $this->dao->select('*')->from(TABLE_REPO)
|
||||
->where('deleted')->eq('0')
|
||||
->beginIF(!empty(whr))->andWhere('(' . $whr . ')')->fi()
|
||||
->orderBy(id)
|
||||
->fetchAll();
|
||||
return $repos;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -176,6 +176,9 @@ class svnModel extends model
|
||||
*/
|
||||
public function setRepos()
|
||||
{
|
||||
$repo = $this->loadModel('repo');
|
||||
$repoObjs = $repo->listForSync("SCM='Subversion'");
|
||||
|
||||
if(!$this->config->svn->repos)
|
||||
{
|
||||
echo "You must set one svn repo.\n";
|
||||
|
||||
Reference in New Issue
Block a user