forked from GoogleCloudPlatform/cloud-pubsub-samples-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
30 lines (29 loc) · 1.16 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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