sudo: required
language: python
services:
  - docker
env:
    DOCKER_COMPOSE_VERSION: 1.10.1
before_install:
- sudo apt-add-repository 'deb http://archive.ubuntu.com/ubuntu trusty-backports universe'
- sudo apt-get update -qq
- docker-compose --version
- sudo apt-get update
- sudo apt-get install -o Dpkg::Options::="--force-confold" --force-yes -y docker-ce
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
- docker-compose --version
before_script:
- export BRANCH=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then echo $TRAVIS_BRANCH; else echo $TRAVIS_PULL_REQUEST_BRANCH; fi)
- git checkout $BRANCH
- echo "" >> .prod.env
- echo "DJANGO_SECRET_KEY=${DJANGO_SECRET_KEY}" >> .prod.env
- echo "" >> .prod.env
- echo "DATABASE_URL=mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}/${DATABASE_NAME}" >> .prod.env
- echo "" >> .prod.env
- echo "IMPACT_API_V0_SECURITY_KEY=${IMPACT_API_V0_SECURITY_KEY}" >> .prod.env
- echo "" >> .prod.env
- echo "IMPACT_API_V0_IMAGE_PASSWORD=${IMPACT_API_V0_IMAGE_PASSWORD}" >> .prod.env
- echo "" >> .prod.env
- docker-compose build --no-cache
- docker-compose up -d 
script:
- make test
after_success:
- if [ "$DEPLOY_ENVIRONMENT" == "" ]; then export DEPLOY_ENVIRONMENT=$(if [ "$BRANCH" == "master" ]; then echo "production"; else echo "staging"; fi); fi;
- sudo curl -o /usr/local/bin/ecs-cli https://s3.amazonaws.com/amazon-ecs-cli/ecs-cli-linux-amd64-latest;
- sudo chmod +x /usr/local/bin/ecs-cli;
- pip install awscli;
- export PATH=$PATH:$HOME/.local/bin;
- eval $(aws ecr get-login --region us-east-1);
- make release AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY ENVIRONMENT=$DEPLOY_ENVIRONMENT DOCKER_REGISTRY=$DOCKER_REGISTRY RELEASE_TAG=$BRANCH

Remove Deploy Processes For Secondary Branch
[AC-4335] Remove Deploy Processes For Secondary Branch

Now that the impact-api repo is public, it is no longer necessary to deploy from a public secondary repo.  This commit moved the .travis.yml file into the impact-api repo and removed any extraneous commands that were needed to link the old repo to the previously private repo.
