sudo: required

language: node_js
node_js:
  - node

services:
  - docker

env:
  global:
  - DOCKER_COMPOSE_VERSION=1.11.1
  - DOCKER_REPO=nhsuk/profiles
  - DOCKER_USERNAME=nhsukautomata
  - RANCHER_ACCESS_KEY=655696CC96424E6D4DB0
  - RANCHER_ENVIRONMENT=c2s-dev
  - RANCHER_TEMPLATE_NAME=c2s-profiles
  - RANCHER_URL=https://rancher.nhschoices.net

before_install:
  - 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

after_success:
  - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - ./ci-deployment/docker_ci.sh
  - ./ci-deployment/rancher_pr_deploy.sh

script:
  - docker-compose -f docker-compose-tests.yml build travis-tests
  - docker-compose -f docker-compose-tests.yml run travis-tests

after_script:
  - docker-compose -f docker-compose-tests.yml down -v


sudo: required

language: node_js
node_js:
  - node

services:
  - docker

env:
  global:
  - DOCKER_COMPOSE_VERSION=1.11.1
  - DOCKER_REPO=nhsuk/profiles
  - DOCKER_USERNAME=nhsukautomata
  - RANCHER_ACCESS_KEY=C80FFC0090AC735DEACB
  - RANCHER_ENVIRONMENT=c2s-dev
  - RANCHER_TEMPLATE_NAME=c2s-profiles
  - RANCHER_URL=https://rancher.nhschoices.net

before_install:
  - 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

after_success:
  - docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD"
  - ./ci-deployment/docker_ci.sh
  - ./ci-deployment/rancher_pr_deploy.sh

script:
  - docker-compose -f docker-compose-tests.yml build travis-tests
  - docker-compose -f docker-compose-tests.yml run travis-tests

after_script:
  - docker-compose -f docker-compose-tests.yml down -v


Update Rancher Access key to new env
Update Rancher Access key to new env