machine:
  services:
    - docker
 
dependencies:
  override:
    - if [ -z "$CIRCLE_TAG" ]; then docker build -t quay.io/levlaz/braindump:$CIRCLE_SHA .; else docker build -t quay.io/levlaz/braindump:$CIRCLE_TAG .; fi

test:
  override:
    - echo "No Tests"
    # - docker run quay.io/levlaz/braindump python manage.py test

deployment:
  master:
    branch: master
    commands:
      - docker tag quay.io/levlaz/braindump:$CIRCLE_SHA quay.io/levlaz/braindump:latest
      - docker login -e="." -u $DOCKER_USER -p $DOCKER_PASS quay.io
      - docker push quay.io/levlaz/braindump
  production:
    tag: /v[0-9]+(\.[0-9]+)*/
    owner: levlaz
    commands:
      - docker tag quay.io/levlaz/braindump:$CIRCLE_TAG quay.io/levlaz/braindump:latest
      - docker login -e="." -u $DOCKER_USER -p $DOCKER_PASS quay.io
      - docker push quay.io/levlaz/braindump
      - scripts/deploy.sh
machine:
  services:
    - docker
 
dependencies:
  override:
    - if [ -z "$CIRCLE_TAG" ]; then docker build -t quay.io/levlaz/braindump:$CIRCLE_SHA .; else docker build -t quay.io/levlaz/braindump:$CIRCLE_TAG .; fi

test:
  override:
    - echo "No Tests"
    # - docker run quay.io/levlaz/braindump python manage.py test

deployment:
  master:
    branch: master
    commands:
      - docker tag quay.io/levlaz/braindump:$CIRCLE_SHA quay.io/levlaz/braindump:latest
      - docker login -e="." -u $DOCKER_USER -p $DOCKER_PASS quay.io
      - docker push quay.io/levlaz/braindump
  production:
    tag: /v[0-9]+(\.[0-9]+)*/
    owner: levlaz
    commands:
      - docker tag quay.io/levlaz/braindump:$CIRCLE_TAG quay.io/levlaz/braindump:stable
      - docker login -e="." -u $DOCKER_USER -p $DOCKER_PASS quay.io
      - docker push quay.io/levlaz/braindump
      - scripts/deploy.sh
Tag dev as latest, tag tag as stable
Tag dev as latest, tag tag as stable
