Search code examples
google-app-enginegcloud

gcloud promote a version


So, I've deployed a custom runtime to gcloud (with --no-promote), using:

gcloud preview app deploy --project $PROJECT_NAME --version ${VERSION} --no-promote --quiet app.yaml

I saw that it all works well, and now I want to route traffic to it. Using the UI, it is simple - just checking the version's checkbox, and clicking a button.

However, from the CLI, it appears that I need specify the app.yaml again. Why is that? Everything was already deployed...

Is there a way to route traffic to it (i.e., "promote" it), without having to specify app.yaml again? i.e., other means rather than:

gcloud preview app deploy --project $PROJECT_NAME --version ${VERSION} --promote --quiet app.yaml

Thanks for all your help.

Cheers,

Ohad


Solution

  • I think what you are looking for is

    gcloud preview app modules set-default <module_name> --version <version_name> --project=<project_name>
    

    This will set the specified version as default for the module you want. Additional documentation can be found here:

    https://cloud.google.com/sdk/gcloud/reference/preview/app/modules/set-default