Gae deploy doesn't support --image-url and --docker-build is deprecated

We started using the docker_build: local setting, as our docker image was already being built on Travis and we wanted to avoid rebuilding it. However, this seemed to have no effect, as the image was still rebuilt. Looking at the gcloud docs, the flag no longer exists:

gcloud app deploy app.yaml --docker-build local
ERROR: (gcloud.app.deploy) argument --docker-build: The --docker-build flag no longer exists.

Docker images are now built remotely using Google Container Builder. To run a
Docker build on your own host, you can run:
  docker build -t gcr.io/<project>/<service.version> .
  gcloud docker push gcr.io/<project>/<service.version>
  gcloud app deploy --image-url=gcr.io/<project>/<service.version>
If you don't already have a Dockerfile, you must run:
  gcloud beta app gen-config
first to get one.

So instead we tried manually pushing the image to gcr. After some headaches of figuring out how to auth docker with the very old gcloud version running on travis, we got this to work. Then we tried to specify the image_url in the gae deploy section, but this was ignored.

It would be great if support could be added for image_url to support this use case. It would also be great if the gcloud running on Travis was upgraded! It looks like maybe it gets updated specifically for the deploys, but this isn’t accessible from other parts of the script?

In the meantime I am planning to write a simple deploy script to call gcloud for us.

Imprint