sudo: required

language: python

env:
  global:
    - CLOUDSDK_CORE_DISABLE_PROMPTS=1

services:
  - docker

cache:
  directories:
    - "$HOME/google-cloud-sdk"

before_install:
  # Install gcloud
  # From https://stackoverflow.com/questions/38762590/how-to-install-google-cloud-sdk-on-travis
  - export BOTO_CONFIG=/dev/null
  - gcloud version || true
  - if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then
      rm -rf $HOME/google-cloud-sdk;
      curl https://sdk.cloud.google.com | bash;
    fi
  - source $HOME/google-cloud-sdk/path.bash.inc
  - gcloud version

install:
  - pip install jsonschema
  - pip install git+https://github.com/flywheel-io/gears.git

script:
  - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
  - git fetch --quiet
  - if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
      git checkout $TRAVIS_BRANCH;
    else
      git checkout $TRAVIS_PULL_REQUEST_BRANCH;
    fi
  - travis_wait 1440 bin/process-manifests.sh


sudo: required

language: python

env:
  global:
    - CLOUDSDK_CORE_DISABLE_PROMPTS=1

services:
  - docker

cache:
  directories:
    - "$HOME/google-cloud-sdk"

before_install:
  # Install gcloud
  # From https://stackoverflow.com/questions/38762590/how-to-install-google-cloud-sdk-on-travis
  - export BOTO_CONFIG=/dev/null
  - gcloud version || true
  - if [ ! -d "$HOME/google-cloud-sdk/bin" ]; then
      rm -rf $HOME/google-cloud-sdk;
      curl https://sdk.cloud.google.com | bash;
    fi
  - source $HOME/google-cloud-sdk/path.bash.inc
  - gcloud version

install:
  - pip install jsonschema
  - pip install git+https://github.com/flywheel-io/gears.git

script:
  - git config remote.origin.fetch "+refs/heads/*:refs/remotes/origin/*"
  - git fetch --quiet
  - if [ -z "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
      git checkout $TRAVIS_BRANCH;
    else
      git checkout $TRAVIS_PULL_REQUEST_BRANCH || true;
    fi
  - travis_wait 1440 bin/process-manifests.sh


Make checkout by branch name optional for PR
Make checkout by branch name optional for PR
