Example #1
0
 /**
  * {@inheritdoc}
  */
 public function prepareJob(Job $job)
 {
     $origin = $job->getParameters()['origin'];
     $target = $this->buildPath . DIRECTORY_SEPARATOR . $job->getDirectory();
     $build = $job->getParameters()['build'];
     // First mirroring target
     $this->filesystem->mirror($origin, $target, null, array('delete' => true, 'override' => true));
     // Second override target with build dir
     $this->filesystem->mirror($build, $target, null, array('delete' => false, 'override' => true));
 }
 /**
  * {@inheritdoc}
  */
 public function prepareJob(Job $job)
 {
     $parameters = $job->getParameters();
     $origin = $parameters['origin'];
     $target = $this->buildPath . DIRECTORY_SEPARATOR . $job->getDirectory();
     // First mirroring target
     $this->filesystem->mirror($origin, $target, null, array('delete' => true, 'override' => true));
     // Create dockerfile
     $this->builder->setTemplateName(sprintf("%s/Dockerfile-%s.twig", $parameters['language'], $parameters['version']));
     $this->builder->setVariables($parameters);
     $this->builder->setOutputName('Dockerfile');
     $this->builder->writeOnDisk($target);
 }