/** * Clones a git repository to the filesystem docker container. */ private function cloneRepository() { if (is_dir($this->localProjectDirectory)) { // Pull $this->run(sprintf('docker exec -t -i ' . 'filesystem%s bash -c "cd %s && git pull origin %s"', $this->serverSuffix, self::DOCKER_PROJECT_PATH . '/' . $this->gitBranch, $this->gitBranch)); } else { // Clone $this->run(sprintf('docker exec -t -i ' . 'filesystem%s git clone -b %s %s %s', $this->serverSuffix, $this->gitBranch, $this->project->getGitRepositoryUrl(), $this->gitBranch)); } }
/** * {@inheritdoc} */ protected function getData() { return [Project::FIELD_NAME => $this->project->getFullName(), Project::FIELD_SHORT_NAME => $this->project->getShortName(), Project::FIELD_REPOSITORY_URL => $this->project->getGitRepositoryUrl(), Project::FIELD_VHOST_NAME => $this->project->getVhostName()]; }