Add support for Bitbucket's Mercurial based repos

This commit is contained in:
bochkovprivate 2017-03-19 11:17:10 +07:00 committed by Dmitry Khomutov
commit 7084b49da7
No known key found for this signature in database
GPG key ID: 7EB36C9576F9ECB9
9 changed files with 126 additions and 22 deletions

View file

@ -25,9 +25,9 @@ class MercurialBuild extends Build
*/
public function createWorkingCopy(Builder $builder, $buildPath)
{
$key = trim($this->getProject()->getSshPublicKey());
$key = trim($this->getProject()->getSshPrivateKey());
if (!empty($key) && strpos($this->getProject()->getReference(), 'ssh') > -1) {
if (!empty($key)) {
$success = $this->cloneBySsh($builder, $buildPath);
} else {
$success = $this->cloneByHttp($builder, $buildPath);