Skip to content
Permalink
Browse files

[#1] Wrap Docker install client in a Robo task

  • Loading branch information...
juampynr committed Aug 7, 2019
2 parents e92b627 + 93738e3 commit 872d4ced47965427d495619acc7f7d8ecd937a72
Showing with 19 additions and 8 deletions.
  1. +1 −8 .circleci/config.yml
  2. +18 −0 RoboFile.php
@@ -13,18 +13,11 @@ jobs:
- checkout
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Install Docker client
command: |
set -x
VER="18.09.3"
curl -L -o /tmp/docker-$VER.tgz https://download.docker.com/linux/static/stable/x86_64/docker-$VER.tgz
tar -xz -C /tmp -f /tmp/docker-$VER.tgz
mv /tmp/docker/* /usr/bin
- run:
name: Configure environment
command: |
composer install
vendor/bin/robo docker:install-client
cp .circleci/config/settings.local.php web/sites/default/settings.local.php
- run:
name: Replace the full database by the config database
@@ -58,4 +58,22 @@ public function databasePushImage($tag_name) {
return $collection->run();
}
/**
* Task to install the Docker client.
*
* @return \Robo\Result
* The result of the collection of tasks.
*/
public function dockerInstallClient() {
$version = '18.09.3';
$collection = $this->collectionBuilder();
$collection->addTask($this->taskExec('curl -L -o /tmp/docker-' . $version . '.tgz https://download.docker.com/linux/static/stable/x86_64/docker-' . $version . '.tgz'))
->addTask($this->taskExec('tar -xz -C /tmp -f /tmp/docker-' . $version . '.tgz'))
->addTask($this->taskExec('mv /tmp/docker/* /usr/bin'));
return $collection->run();
}
}

0 comments on commit 872d4ce

Please sign in to comment.
You can’t perform that action at this time.