Deploy Pull Request to Google App Engine

According to Google App Engine Deployment - Travis CI it is not possible to deploy Pull Requests to Google App Engine:

Note that pull request builds skip the deployment step altogether.

Why is that?

My use case is this:

  1. Create a Pull Request
  2. Deploy it as a separate version on Google App Engine (ie. a staging app).
  3. Ideally, post the Google App Engine URL to the GitHub Pull Request.

Of course we could just enable branch builds but:

  • This will put extra load on our Travis account due to extra (branch) builds that we would otherwise not want.
  • No connection to the Pull Request so the Google App Engine URL cannot be posted.

I think my use case sounds reasonable. Am I missing something? Why is it not possible to deploy Pull Requests?

Hey @georgms,

Take a read of this Medium post:

Hey Montana,

thanks for the response!

Unfortunately the article does not mention how to deploy Pull Requests to Google App Engine, or am I missing something?

Cheers
Georg

Hey @georgms,

Of course there can be workarounds for example:

- 'if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
      bash ./someScript.sh
  fi'

Some of the reasons Google does this is, allowing any untrustworthy PR to deploy your app is simply not acceptable.

As stated above though, there are obvious workarounds. Hope this helps.

Hey @Montana!

Some of the reasons Google does this is, allowing any untrustworthy PR to deploy your app is simply not acceptable.

As far as I can tell it’s a Travis issue, not a Google one, since I can just deploy a Pull Request manually (gcloud app deploy …), right?

Of course I could use some script magic to deploy the Pull Request from Travis, but there’s currently no way to deploy Pull Request using Travis’ Google App Engine deployer, right?

Thanks!
Georg

Imprint