version: 2
jobs:
  build:
    docker:
      - image: sicz/dockerspec
    environment:
      - MAKEFLAGS=--no-print-directory
      - RSPEC_FORMAT=doc
    steps:
      - checkout
      - run:
          name: Checkout make files
          command: |
            cd ..
            curl -sSL https://github.com/SICZ/Mk/archive/master.tar.gz | tar -xzf -
            mv Mk-master Mk
      - setup_remote_docker:
          version: 17.06.0-ce
      - run:
          name: sicz/dockerspec:latest
          command: |
            make ci
      - deploy:
          name: Push images to the Docker Hub
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_PASSWD}
              make docker-push
            fi

version: 2
jobs:
  build:
    docker:
      - image: sicz/dockerspec
    environment:
      - MAKEFLAGS=--no-print-directory
      - RSPEC_FORMAT=doc
    steps:
      - checkout
      - run:
          name: Checkout make files
          command: |
            cd ..
            curl -sSL https://github.com/SICZ/Mk/archive/master.tar.gz | tar -xzf -
            mv Mk-master Mk
      - setup_remote_docker:
          version: 17.06.0-ce
      - run:
          name: Pull Docker images
          command: |
            make docker-pull
      - run:
          name: sicz/dockerspec:latest
          command: |
            make ci
      - deploy:
          name: Push images to the Docker Hub
          command: |
            if [ "${CIRCLE_BRANCH}" == "master" ]; then
              docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_PASSWD}
              make docker-push
            fi

Add support for Docker build cache
Add support for Docker build cache
