This repo demonstrates how to deploy to Google Cloud from a Travis file and run an end to end test ( in e2e_test.py) against a staging environment.
Please see the associated blog post for details.
See the managed_vms
example for a similar repo and Travis deployment
using Managed VMs.
- Download Google Cloud SDK
- Install Travis CI client
- Enable your repo or fork of this repo on Travis CI
- Delete existing credentials
rm credentials.tar.gz.enc
- Enable the Books API
- Download a Public API Key and add it to api_key.py (see sample)
- Download a Service Account JSON file, copy it into this direcotry as 'cont-deployment.json'
- Remove the openssl line from the .travis file
- `tar -czf credentials.tar.gz api_key.py cont-deployment.json'
travis login
- Encrypt the file with travis, using --add adds the SSL command back
to the .travis file
travis encrypt-file credentials.tar.gz --add
- Add the encrypted archive and the changes to the .travis file to your repo
git add credentials.tar.gz
git add .travis.yml
git commit -m "Add credentials and Travis changes
- Push to your repo and read the Travis console to verify the build succeeds
git push origin master
- See CONTRIBUTING.md
- See LICENSE
Copyright (C) 2015 Google Inc.