Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to set up auto-deploy to AppEngine when pushing to Git Repository

I've heard that other platforms support auto-deployment of their code to production when they push changes to their Git repository.

Can I set up something similar to this for AppEngine? How?

I'm using Python2.7 on Windows, and bitbucket as a repository.

Thanks!

like image 370
Albert Avatar asked Apr 23 '12 02:04

Albert


People also ask

What command should you use to deploy an App Engine app from the command line?

App Engine provides the gcloud app deploy command, which builds an image with your source code and deploys that image on App Engine. You can use the cloud-sdk image as a build step in your config file to invoke gcloud commands within the image.


2 Answers

Since app engine deploy is just a python script, why can't you just write a shell script that calls 'git push' followed by 'python appcfg.py deploy'?

Any bitbucket hooks that will send from bitbucket->appengine after you upload to app is probably a bad idea since it will require storing your app engine login credentials on github.

Other projects might have your app server pull from github/bitbucket. You can do this if your app engine site just serves static websites using http://drydrop.binaryage.com/, but you can't update actual running code this way.

like image 71
dragonx Avatar answered Nov 14 '22 22:11

dragonx


Recently, App Engine added Push to Deploy features: https://developers.google.com/appengine/docs/push-to-deploy

It only has built in support for GitHub, but it might still be possible to configure BitBucket to work with it.

like image 30
Sam King Avatar answered Nov 14 '22 23:11

Sam King