Deploy to Google App Engine

2 minute read

CodeShip makes it easy to deploy your application to Google App Engine using CodeShip’s integrated deployment pipelines.

We support deploying projects in the following stacks: go, java, node, php, python, and ruby. Note that for java, you need to set an optional flag (see below for details).

Setup Google App Engine Deployment

Step 1 - Google Cloud Service Account

Before getting into actually configuring CodeShip to deploy your code, you should create a dedicated Service Account. Service accounts are like users, but meant for system integrations and usually have very limited permissions. Since we just need to deploy your code, and not have access to anything else on your project, we suggest you create a new service account specifically for CodeShip, but you could also reuse an existing one if you’re comfortable with that.

Creating Service Account

First thing is to navigate to the AIM & admin section and locate the Service accounts menu. Navigate to service account

In that view, click the Create Service Account button and give the account a name, e.g. codeship-deploy so you can easily remember what it’s for. Also ensure you check the box for `Furnish a new private key'' and leave the option on `JSON.

The last thing needed is to specify the permissions needed for the service account to be able to deploy to app engine. The only one we need is App EngineApp Engine Deployer.

Create service account

That’s it. Once you save the new service account a key file will be generated and automatically downloaded to your computer.

The key file is very important to keep safe as it provides the keys to pushing deployments to your project. Treat it like any other password, and keep it in a safe place.

Step 2 - Navigate to Deployment Configuration

With the service account key file in place, navigate to your project’s deployment configuration page by selecting Project Settings on the top right side of the project page, and then the Deploy option in the secondary navigation.

Step 3 - Add New Deployment Pipeline

Edit an existing deployment pipeline or create a new deployment pipeline by selecting + Add new deployment pipeline. If you create a new deployment pipeline, you need to select when it’s triggered. You can either match the exact name of a branch or a specify a wildcard branch.

Create branch deploy

Step 4 - Google App Engine

Now we’re ready to configure your app engine deployment.

Select the Google App Engine template from the list of available deploy templates.

Select GAE

Step 5 - Deployment Configuration

Next step is to provide the project ID as well as the keys file you downloaded in step 1.

Project ID

Copy-paste the project ID of the project you want the pipeline to deploy to.

Key File

This is the file you generated in step 1. The file includes private keys etc. that will allow us to connect to Google App Engine on your behalf, with the permissions specified for the service account.

Configure GAE


GAE Success

You have now successfully setup deployment to Google App Engine. Go ahead and push a commit to your configured deploy branch.