version: 2
jobs:
  build:
    working_directory: /PySyft
    docker:
      - image: docker:latest
    steps:
      - checkout
      - setup_remote_docker
      - run:
          name: Build application Docker image
          command: |
            docker build -t pysyft .
      - run:
          name: Run tests
          command: |
            docker run --rm pysyft pytest
            docker run --rm pysyft pytest --flake8
      - deploy:
          name: Push application Docker image
          command: |
            if [ "${CIRCLE_BRANCH}" == "develop" ]; then
              docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
              docker tag pysyft "${DOCKERHUB_REPO}:edge"
              docker push "${DOCKERHUB_REPO}:edge"
            elif [ "${CIRCLE_BRANCH}" == "master" ]; then
              docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
              docker tag pysyft "${DOCKERHUB_REPO}:latest"
              docker push "${DOCKERHUB_REPO}:latest"
            fi

version: 2
jobs:
  build:
    working_directory: /PySyft
    docker:
      - image: docker:latest
    steps:
      # Ensure your image has git, otherwise the checkout step will fail
      - run: apt-get -qq update; apt-get -y install git
      - checkout
      - setup_remote_docker
      - run:
          name: Build application Docker image
          command: |
            docker build -t pysyft .
      - run:
          name: Run tests
          command: |
            docker run --rm pysyft pytest
            docker run --rm pysyft pytest --flake8
      - deploy:
          name: Push application Docker image
          command: |
            if [ "${CIRCLE_BRANCH}" == "develop" ]; then
              docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
              docker tag pysyft "${DOCKERHUB_REPO}:edge"
              docker push "${DOCKERHUB_REPO}:edge"
            elif [ "${CIRCLE_BRANCH}" == "master" ]; then
              docker login -u "${DOCKERHUB_USER}" -p "${DOCKERHUB_PASS}"
              docker tag pysyft "${DOCKERHUB_REPO}:latest"
              docker push "${DOCKERHUB_REPO}:latest"
            fi

Add git to circle image
Add git to circle image
