Hi there,
I've gotten quite frustrated deploying to AppEngine with shell scripts and 
duct-taped oauth keys and finally sat down and wrote a proper Jenkins 
plugin:

https://github.com/akbertram/appengine-plugin

The plugin exposes both a free style build step and a workflow step that 
supports staged releases along the following lines:

def appId = "jenkinsplugintest"

node {
    // checkout the repo locally
    git url: "https://github.com/akbertram/appengine-guestbook-java.git";

    // build, run unit tests, and package
    def mvnHome = tool 'M3'
    sh "${mvnHome}/bin/mvn -B clean install"

    // use our build number as the next version
    def newVersion = "build${env.BUILD_NUMBER}"

    // deploy to AppEngine, but with a new version that is not the default
    // version but still accessible
    appengine action: "update", applicationId: appId, version: newVersion

    def stagingUrl = "https://${newVersion}-dot-${appId}.appspot.com";

    echo "Version ${newVersion} staged at ${stagingUrl}"

    // Test the new version before making live
    // (poor man's integration test - ideally use web driver!)
    sh "curl -s ${stagingUrl} | grep Hello"

    // Once the tests pass, go live!
    appengine action: "set_default_version", applicationId: appId, version: 
newVersion

}


It's reached a point that it's meeting my immediate needs, but there are a 
number of gaps that are probably of interest to others. If any one is 
interested fleshing out support for python and go runtimes, for example, 
would be happy to merge the code in. 

If there's sufficient interest, it would be great if the plugin could 
ultimately be added to the update list and all the rest.

Best,
Alex


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/828e1f70-8977-4870-9e5c-9b305d63695a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to