machine:
  post:
  - cd $HOME && git clone --depth 1 -v git@github.com:clever/ci-scripts.git && cd ci-scripts && git show --oneline -s
  - $HOME/ci-scripts/circleci/golang-install 1.7
  services:
  - docker
checkout:
  post:
  - $HOME/ci-scripts/circleci/golang-move-project
compile:
  override:
  - make build
test:
  override:
  - echo "replSet = TailTest" | sudo tee --append /etc/mongod.conf > /dev/null
  - sudo service mongod restart
  - mongo --eval 'rs.initiate()'
  - make test
  post:
  - $HOME/ci-scripts/circleci/report-card $RC_DOCKER_USER $RC_DOCKER_PASS "$RC_DOCKER_EMAIL" $RC_GITHUB_TOKEN
deployment:
  all:
    branch: master
    owner: Clever
    commands:
    - $HOME/ci-scripts/circleci/docker-publish $DOCKER_USER $DOCKER_PASS "$DOCKER_EMAIL" $DOCKER_ORG
    - $HOME/ci-scripts/circleci/catapult-publish $CATAPULT_URL $CATAPULT_USER $CATAPULT_PASS oplog-dump
general:
  build_dir: ../.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME

machine:
  post:
  - cd $HOME && git clone --depth 1 -v git@github.com:clever/ci-scripts.git && cd ci-scripts && git show --oneline -s
  - $HOME/ci-scripts/circleci/golang-install 1.7
  services:
  - docker
checkout:
  post:
  - $HOME/ci-scripts/circleci/golang-move-project
compile:
  override:
  - make build
test:
  override:
  - echo "replSet = TailTest" | sudo tee --append /etc/mongod.conf > /dev/null
  - sudo service mongod restart
  - mongo --eval 'rs.initiate()'
  - make test
  post:
  - $HOME/ci-scripts/circleci/report-card $RC_DOCKER_USER $RC_DOCKER_PASS "$RC_DOCKER_EMAIL" $RC_GITHUB_TOKEN
deployment:
  master:
    owner: Clever
    commands:
    - $HOME/ci-scripts/circleci/docker-publish $DOCKER_USER $DOCKER_PASS "$DOCKER_EMAIL" $DOCKER_ORG
    - $HOME/ci-scripts/circleci/catapult-publish $CATAPULT_URL $CATAPULT_USER $CATAPULT_PASS oplog-dump
    branch: master
  non-master:
    owner: Clever
    commands:
    - $HOME/ci-scripts/circleci/docker-publish $DOCKER_USER $DOCKER_PASS "$DOCKER_EMAIL" $DOCKER_ORG
    - $HOME/ci-scripts/circleci/catapult-publish $CATAPULT_URL $CATAPULT_USER $CATAPULT_PASS oplog-dump
    branch: /^(?!master$).*$/
general:
  build_dir: ../.go_workspace/src/github.com/$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME

Enable docker builds for all branches
Enable docker builds for all branches