Reputation: 407
Sorry, real newbie question on all this... A few months ago I deployed a nodejs/ expressJS app to Heroku using continuous deployment - based on changes to my Github repo the app would upadte. It was all setup in just a few steps - so easy.https://devcenter.heroku.com/articles/github-integration#automatic-deploys
I have tried to set up something similar with Google Cloud App Engine. I've tried for hours to find out how to link a Git Repository into my App Engine, and have not been able to figure it out.
Manual deployments to App Engine using 'gcloud app deploy' seem to copy my entire project every time, takes ages. I need a git-based solution.
How do you do this? I have no idea how you would set up the a Source Repository, or a remote repository, as the 'files' of an App Engine app.
I've spent hours Googling and trying things to no avail.
https://cloud.google.com/source-repositories/docs/adding-repositories-as-remotes
https://cloud.google.com/appengine/docs/flexible/nodejs/quickstart
https://cloud.google.com/solutions/continuous-delivery-bitbucket-app-engine
https://cloud.google.com/shell/docs/quickstart
If anyone can point me in the direction of an easy step-by-step, I'd be most obliged.
Upvotes: 1
Views: 462
Reputation: 39824
For linking to GitHub you're probably looking for Connecting a Hosted Repository:
You can connect a Cloud Source Repository to a Git repository hosted on GitHub or Bitbucket. When you push changes to the hosted repository, the changes are automatically synchronized with the Cloud Source Repository.
But automatically deploying GAE code from such repo is a different matter. GAE itself doesn't (yet, at least, AFAIK) have such capability. But it's still possible to setup automatic deployments as part of various CI/CD pipelines (some small automation work is required - the preparation and invocation of the gcloud app deploy
cmd). Some examples:
As for the deployment speed - it primarily depends on the GAE environment you use:
Donno what Heroku deployments involve, but even if the steps are the same there is something else to consider: an automatic deployment performed in the background, unattended, always appears faster than a manual deployment where the developer is staring at the screen, inhaling every progress sign and counting every second (even if the wall clock says otherwise!) ;)
Looking specifically at ways to speed up GAE deployments in the cloud repository context, several possibly of interest threads exist, for example Google Cloud: How to deploy mirrored Repository (check linked/related posts as well).
Upvotes: 1