machine:
    services:
        - docker
    node:
        version: 5.4.0

test:
    pre:
        - webdriver-manager update
        - webdriver-manager --ignore_ssl start:
            background: true
        - node test/google_mock_server/mock_google_server.js:
            background: true
        - npm start:
            background: true
        - sleep 5
    override:
        - protractor test/protractor/conf.js

deployment:
    staging:
        branch: master
        commands:
            - docker info
            - docker build -t $DOCKER_USER/index_cards .
            - docker login -u $DOCKER_USER -p $DOCKER_PASS -e $DOCKER_EMAIL
            - docker push $DOCKER_USER/index_cards
        heroku:
            appname: salty-basin-2309

machine:
    services:
        - docker
    node:
        version: 5.4.0

test:
    pre:
        - webdriver-manager update
        - webdriver-manager --ignore_ssl start:
            background: true
        - node test/google_mock_server/mock_google_server.js:
            background: true
        - npm start:
            background: true
        - sleep 5
    override:
        - protractor test/protractor/conf.js
    post:
        - docker info
        - docker build -t $DOCKER_USER/index_cards .
        - docker login -u $DOCKER_USER -p $DOCKER_PASS -e $DOCKER_EMAIL
        - docker push $DOCKER_USER/index_cards
        
deployment:
    staging:
        branch: master
        heroku:
            appname: salty-basin-2309

Build Docker image after test, not during deploymentw
Build Docker image after test, not during deploymentw
