On Wednesday, January 28, 2015 at 12:36:14 PM UTC-8, Jingyi Li wrote:
>
> Hi,
>
> I'm working on a task to nightly build our project and deploy it to app 
> engine instance. Right now, every time we deployed, we had to manually 
> change the default version on app engine instance. Is there a way to 
> automatically change the default version to the latest one that is deployed?
>

As long as you don't change index.yaml (which requires a delay for index 
rebuilding and thus would make it an error to "automatically change the 
default version to the latest one that is deployed") you could use a a 
2-line shell script or the like:

    appcfg.py <options> update yourapp/
    appcfg.py <options> set_default_version yourapp/

The latter uses the version set in yourapp/app.yaml; if that's not good for 
you, use the --version flag.

If you do want to update index.yaml, I don't know of a reliable way to 
check when the index is done re-building in a fully automated way (as 
opposed to manually checking the "Indexes" section of the Admin Console).

If you're using `gcloud`, I think 

    gcloud preview app modules set-default default

(again possibly with a `--version` flag) is the equivalent of appcfg's 
set_default_version.  You can set default version on other modules too of 
course -- the last arg (of which you can have several) says which modules 
you want to affect.

But the index-rebuilding-delay problem, to the best of my knowledge, 
doesn't go away by moving from appcfg to gcloud...


Alex

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/604d0d80-0302-40b7-9684-4b51bb335c95%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to