Commit 0cd9fa89 authored by Archie Brentano's avatar Archie Brentano
Browse files

Issue #2557621: Testrunner should have the option to download all dci containers

parent ebce9d1d
Loading
Loading
Loading
Loading
+2 −1
Changes for src/DrupalCI/Console/Command/Init/InitAllCommand.php: 2 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ class InitAllCommand extends DrupalCICommandBase {
      ->addOption('dbtype', '', InputOption::VALUE_OPTIONAL, 'Database types to support')
      ->addOption('phptype', '', InputOption::VALUE_OPTIONAL, 'PHP Versions to support')
      ->addOption('forcebuild', null, InputOption::VALUE_NONE, 'Force Building Environments locally rather than pulling the fslayers')
      ->addOption('all', null, InputOption::VALUE_NONE, 'Pull/Build all containers')
    ;
  }

@@ -42,6 +43,7 @@ class InitAllCommand extends DrupalCICommandBase {
    $options['--no-ansi'] = $input->getOption('no-ansi');
    $options['--no-interaction'] = $input->getOption('no-interaction');
    $options_force['--forcebuild'] = $input->getOption('forcebuild');
    $options_force['--all'] = $input->getOption('all');

    # Validate/Install dependencies
    $cmd = $this->getApplication()->find('init:dependencies');
@@ -63,7 +65,6 @@ class InitAllCommand extends DrupalCICommandBase {

    $arguments = array(
      'command' => 'init:base',
      'container_name' => array('drupalci/base', 'drupalci/db-base', 'drupalci/php-base', 'drupalci/web-base'),
    );
    $cmdinput = new ArrayInput($arguments + $options + $options_force);
    $returnCode = $cmd->run($cmdinput, $output);
+4 −0
Changes for src/DrupalCI/Console/Command/Init/InitBaseContainersCommand.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ class InitBaseContainersCommand extends DrupalCICommandBase {
      ->setDescription('Build initial DrupalCI base containers')
      ->addArgument('container_name', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Docker container image(s) to build.')
      ->addOption('forcebuild', null, InputOption::VALUE_NONE, 'Force Building Environments locally rather than pulling the fslayers')
      ->addOption('all', null, InputOption::VALUE_NONE, 'Pull/Build all base containers')
    ;
  }

@@ -71,6 +72,9 @@ class InitBaseContainersCommand extends DrupalCICommandBase {
          $names = array($this->default_build['base']);
        }
      }
      else if($input->getOption('all')) {
        $names = $container_names;
      }
      else {
        $names = $this->getBaseContainerNames($container_names, $input, $output);
        if (in_array('all', $names)) {
+5 −2
Changes for src/DrupalCI/Console/Command/Init/InitDatabaseContainersCommand.php: 5 added lines, 2 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ class InitDatabaseContainersCommand extends DrupalCICommandBase {
      ->setDescription('Build initial DrupalCI database containers')
      ->addArgument('container_name', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Docker container image(s) to build.')
      ->addOption('forcebuild', null, InputOption::VALUE_NONE, 'Force Building Environments locally rather than pulling the fslayers')
      ->addOption('all', null, InputOption::VALUE_NONE, 'Pull/Build all database containers')
    ;
  }

@@ -66,11 +67,13 @@ class InitDatabaseContainersCommand extends DrupalCICommandBase {
        if($this->default_build['database'] == 'all') {
          $names = $container_names;
        }
        else
        {
        else  {
          $names = array($this->default_build['database']);
        }
      }
      else if ($input->getOption('all')) {
        $names = $container_names;
      }
      else {
        $names = $this->getDbContainerNames($container_names, $input, $output);
        if (in_array('all', $names)) {
+4 −0
Changes for src/DrupalCI/Console/Command/Init/InitPhpContainersCommand.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ class InitPhpContainersCommand extends DrupalCICommandBase {
      ->setDescription('Build initial DrupalCI php containers')
      ->addArgument('container_name', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Docker container image(s) to build.')
      ->addOption('forcebuild', null, InputOption::VALUE_NONE, 'Force Building Environments locally rather than pulling the fslayers')
      ->addOption('all', null, InputOption::VALUE_NONE, 'Pull/Build all php containers')
    ;
  }

@@ -73,6 +74,9 @@ class InitPhpContainersCommand extends DrupalCICommandBase {
          $names = array($this->default_build['php']);
        }
      }
      else if ($input->getOption('all')) {
        $names = $container_names;
      }
      else {
        $names = $this->getPhpContainerNames($container_names, $input, $output);
        if (in_array('all', $names)) {
+4 −0
Changes for src/DrupalCI/Console/Command/Init/InitWebContainersCommand.php: 4 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ class InitWebContainersCommand extends DrupalCICommandBase {
      ->setDescription('Build initial DrupalCI web containers')
      ->addArgument('container_name', InputArgument::IS_ARRAY | InputArgument::OPTIONAL, 'Docker container image(s) to build.')
      ->addOption('forcebuild', null, InputOption::VALUE_NONE, 'Force Building Environments locally rather than pulling the fslayers')
      ->addOption('all', null, InputOption::VALUE_NONE, 'Pull/Build all web containers')
    ;
  }

@@ -71,6 +72,9 @@ class InitWebContainersCommand extends DrupalCICommandBase {
          $names = array($this->default_build['web']);
        }
      }
      else if ($input->getOption('all')) {
        $names = $container_names;
      }
      else {
        $names = $this->getWebContainerNames($container_names, $input, $output);
        if (in_array('all', $names)) {