Git Product home page Git Product logo

continuous-deployment-demo's Introduction

Build Status

Sample of how to deploy from Travis CI and run an end-to-end test

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.

See the managed_vms branch for a similar repo and Travis deployment using Managed VMs.

Travis Continual Deployment Provider

Travis has a builtin Travis deploy provider that can simplify your .travis.yml.

The main difference is that you no longer need to explicitly download the Cloud SDK and run the deploy command, although you still need to specify a service account credential.

To see an example, look at the following branches:

Prerequisites

Steps to deploy to your own App Engine project

You can watch a screencast that walks through these steps with this repo here.

https://www.youtube.com/watch?v=7U4jjRw_AJk&feature=youtu.be

Note that the Books API Key is a specific requirement of this app, but is not generally necessary to deploy from Travis. The service account credential is always necessary, in order to authenticate the gcloud command line tool.

  • Enable your repo or fork of this repo on Travis CI
  • Delete existing credentials rm credentials.tar.gz.enc
  • Enable the Books API
  • Enable the App Engine Admin 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 'client-secret.json'
  • Remove the openssl line from the .travis file
  • `tar -czf credentials.tar.gz api_key.py client-secret.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

Contributing changes

Licensing

  • See LICENSE

Copyright (C) 2015 Google Inc.

continuous-deployment-demo's People

Contributors

kylemoschetto avatar richieescarez avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.