sudo: false
language: python
cache:
    directories:
        - ${HOME}/gcloud/
install:
    - pip install tox
env:
    - PATH=${PATH}:${HOME}/gcloud/google-cloud-sdk/bin
before_install:
    - openssl aes-256-cbc -K $encrypted_a53bb0208314_key -iv $encrypted_a53bb0208314_iv -in client-secret.json.enc -out client-secret.json -d
    - if [ ! -d ${HOME}/gcloud/google-cloud-sdk ]; then
          mkdir -p ${HOME}/gcloud &&
          wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --directory-prefix=${HOME}/gcloud &&
          cd ${HOME}/gcloud &&
          tar xzf google-cloud-sdk.tar.gz &&
          printf '\ny\n\ny\ny\n' | ./google-cloud-sdk/install.sh &&
          cd ${TRAVIS_BUILD_DIR};
      fi
    - gcloud -q components update gae-python
    - if [ -a client-secret.json ]; then
          gcloud auth activate-service-account --key-file client-secret.json;
      fi
    - gcloud config set project cloud-pubsub-sample-test
    - mkdir appengine-push/lib
    - pip install -t appengine-push/lib -r appengine-push/requirements.txt
    - gcloud -q preview app deploy --project cloud-pubsub-sample-test --version=py appengine-push/app.yaml

script:
    - tox

sudo: false
language: python
cache:
    directories:
        - ${HOME}/gcloud/
install:
    - pip install tox
env:
    - PATH=${PATH}:${HOME}/gcloud/google-cloud-sdk/bin
before_install:
    - openssl aes-256-cbc -K $encrypted_a53bb0208314_key -iv $encrypted_a53bb0208314_iv -in client-secret.json.enc -out client-secret.json -d
    - if [ ! -d ${HOME}/gcloud/google-cloud-sdk ]; then
          mkdir -p ${HOME}/gcloud &&
          wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz --directory-prefix=${HOME}/gcloud &&
          cd ${HOME}/gcloud &&
          tar xzf google-cloud-sdk.tar.gz &&
          printf '\ny\n\ny\ny\n' | ./google-cloud-sdk/install.sh &&
          cd ${TRAVIS_BUILD_DIR};
      fi
    - gcloud -q components update gae-python
    - if [ -a client-secret.json ]; then
          gcloud auth activate-service-account --key-file client-secret.json;
      fi
    - gcloud config set project cloud-pubsub-sample-test
    - mkdir -p appengine-push/lib
    - pip install -t appengine-push/lib -r appengine-push/requirements.txt
    - gcloud -q preview app deploy --project cloud-pubsub-sample-test --version=py appengine-push/app.yaml

script:
    - tox

Use mkdir's -p option for jenkins build.
Use mkdir's -p option for jenkins build.
