Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy to Google App Engine via a GitHub Repo

I'm learning how to use Google App Engine and I can deploy fine via terminal but I want to allow people to contribute to my github repo and anything they publish will update my app. Here is my repo:

https://github.com/rajtastic/roshanissuperveryawesome

I've sync'd my repo to app engine and I can see the contents in my Cloud instance

enter image description here

My question is:

  • How do I deploy a new version of my app whenever I commit to my repo?

Does anyone know if this is possible?

like image 562
Rajtastic Avatar asked Dec 23 '16 23:12

Rajtastic


1 Answers

Looks like the original push-to-deploy feature is now deprecated, but you can use Google Cloud Platform's Build Trigger to do this:

Navigate to Google Cloud Platform > Container Registry > Build Triggers and set up the branch(es) you want to auto build from your connected github repository.

Make sure you've added a build definition to your repository. Here you can find the full specification, but here's an example of the bare minimum to do a gcloud deploy via cloudbuild.yaml:

steps:
- name: 'gcr.io/cloud-builders/gcloud'
  args: ['app', 'deploy']
like image 150
Justin Avatar answered Sep 29 '22 14:09

Justin