Пример #1
0
 /**
  * @{inheritdoc}
  *
  * @throws \RuntimeException
  * @throws \GitWrapper\GitException
  * @throws \Symfony\Component\Filesystem\Exception\IOException
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $projectName = new ProjectName($input->getArgument('project-name'));
     $gitWrapper = new GitWrapper($input->getOption('git-binary'));
     $repository = $this->newRepository($projectName, $gitWrapper)->setConfig('directory', $input->getArgument('directory'))->setConfig('label', $input->getOption('label'))->setConfig('description', $input->getOption('description'))->setConfig('copyright.year', $input->getOption('copyright-year'))->setConfig('copyright.holders', $input->getOption('copyright-holders'))->setConfig('namespace', $input->getOption('namespace'))->setConfig('class', $input->getOption('class'));
     if (!$input->getOption('no-repo')) {
         $repository->create();
     }
     if ($jenkinsUrl = $input->getOption('jenkins-url')) {
         $jenkinsJob = new JenkinsJob($projectName, $repository, $jenkinsUrl);
         $jenkinsJob->sslVerification(!$input->getOption('no-ssl-verification'));
         $jenkinsJob->create();
     }
 }
 public function newHttpClient()
 {
     $client = parent::newHttpClient();
     $plugin = new MockPlugin();
     $plugin->addResponse(new Response(200));
     $client->addSubscriber($plugin);
     return $client;
 }