version: 2
jobs:
  build:
    working_directory: /tmp/ruby-binary

    docker:
      - image: ruby:2.4.1

    steps:
      - checkout

      - setup_remote_docker

      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.03.1-ce"
            curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
            tar -xz -C /tmp -f /tmp/docker-$VER.tgz
            mv /tmp/docker/* /usr/bin

      - run:
          name: Check docker version
          command: |
            set -x
            docker version
            docker info

      - run: rake build:prepare

      - run: rake build:all

      - store_artifacts:
          path: files/binary
          destination: binary

      - store_artifacts:
          path: files/log
          destination: log


version: 2
jobs:
  build:
    working_directory: /tmp/ruby-binary

    docker:
      - image: ruby:2.4.1

    steps:
      - checkout

      - setup_remote_docker

      - run:
          name: Install Docker client
          command: |
            set -x
            VER="17.03.1-ce"
            curl -L -o /tmp/docker-$VER.tgz https://get.docker.com/builds/Linux/x86_64/docker-$VER.tgz
            tar -xz -C /tmp -f /tmp/docker-$VER.tgz
            mv /tmp/docker/* /usr/bin

      - run:
          name: Check docker version
          command: |
            set -x
            docker version
            docker info

      - run: rake build:prepare

      - run: rake build:all

      - run: rm files/binary/.gitkeep files/log/.gitkeep

      - store_artifacts:
          path: files/binary
          destination: binary

      - store_artifacts:
          path: files/log
          destination: log


Delete .gitkeep files before upload artifacts
Delete .gitkeep files before upload artifacts
