GoogleCloudPlatform / gradle-appengine-plugin

Gradle plugin that provides tasks for uploading, running and managing Google App Engine projects
Apache License 2.0
236 stars 60 forks source link

Recommended approach to deploy through CI Server to different environments #218

Open dave-r12 opened 8 years ago

dave-r12 commented 8 years ago

Hi, we're beginning to use this plugin for our App Engine application and I'd like to set up our CI server to deploy the app. My initial thought was that we'd need to deploy to: a development environment, a test environment, a production environment.

Given that, I believe we'll need to parameterize our 'application name' as it will vary between the environments. Am thinking we can do that with gradle itself, but wasn't sure if there was a better approach with this plugin.

The bit I'm struggling with is the OAuth2 piece for deployment. Do you have any suggestions on a good way of doing this with a CI server? Ideally, we'd enter the credentials on our CI host and click a button. I'm also thinking there might be a better tool for the job, possibly gcloud.

Thanks

loosebazooka commented 8 years ago

I seemed have missed this until now.

You can try customizing gradle's ProcessResources task to edit your "applicationId" in appengine-web.xml which is a way to do it using Gradle features.

There's not really any way to do it using the appengine plugin. There's a way to do it using the gcloud plugin, but that is very experimental and subject to change without notice https://github.com/GoogleCloudPlatform/gradle-appengine-plugin/blob/master/GCLOUD.md

loosebazooka commented 8 years ago

Yeah for OAuth2, depending on your CI you might have to try some things : I think this answer will work for some systems http://stackoverflow.com/a/30777747

dave-r12 commented 8 years ago

Gotcha, thanks