|
1 |
| -# Use Dockerized infrastructure |
2 |
| -sudo: false |
3 |
| -language: python |
4 |
| -# Cache our Gcloud SDK between commands |
5 |
| -cache: |
6 |
| - directories: |
7 |
| - - "$HOME/google-cloud-sdk/" |
8 |
| -env: |
9 |
| -# Make sure gcloud command is on our PATH and the App Engine SDK is in the Python path |
10 |
| -- GAE_PYTHONPATH=${HOME}/.cache/google_appengine PATH=$PATH:${HOME}/google-cloud-sdk/bin PYTHONPATH=${PYTHONPATH}:${GAE_PYTHONPATH} CLOUDSDK_CORE_DISABLE_PROMPTS=1 |
11 |
| -before_install: |
12 |
| -# Install Google App Engine Python SDK |
13 |
| -- if [ ! -d "${GAE_PYTHONPATH}" ]; then |
14 |
| - python scripts/fetch_gae_sdk.py $(dirname "${GAE_PYTHONPATH}"); |
15 |
| - fi |
16 |
| -# [START auth] |
17 |
| -# Decrypt the credentials we added to the repo using the key we added with the Travis command line tool |
18 |
| -- openssl aes-256-cbc -K $encrypted_45d1b36fa803_key -iv $encrypted_45d1b36fa803_iv -in credentials.tar.gz.enc -out credentials.tar.gz -d |
19 |
| -# If the SDK is not already cached, download it and unpack it |
20 |
| -- if [ ! -d ${HOME}/google-cloud-sdk ]; then |
21 |
| - curl https://sdk.cloud.google.com | bash; |
22 |
| - fi |
23 |
| -- tar -xzf credentials.tar.gz |
24 |
| -- mkdir -p lib |
25 |
| -# Here we use the decrypted service account credentials to authenticate the command line tool |
26 |
| -- gcloud auth activate-service-account --key-file client-secret.json |
27 |
| -# [END auth] |
28 |
| -install: |
29 |
| -# Set the correct project to deploy to |
30 |
| -- gcloud config set project jt-play-221404 |
31 |
| -- gcloud -q components update gae-python |
32 |
| -# Install the Python dependencies |
33 |
| -- pip install -r requirements.txt -t lib/ |
34 |
| -script: |
35 |
| -# Run the unit tests |
36 |
| -- python test_main.py |
37 |
| -# [START deploy] |
38 |
| -# Deploy the app |
39 |
| -- gcloud -q preview app deploy app.yaml --promote |
40 |
| -# Run and end to end test |
41 |
| -- python e2e_test.py |
42 |
| -# [END deploy] |
| 1 | +language: ruby |
| 2 | +rvm: |
| 3 | + - 2.2 |
| 4 | + - jruby |
0 commit comments