This is a repro case for issue #13199: https://code.google.com/p/googleappengine/issues/detail?id=13199
# This code builds cleanly:
./build
# But fails to deploy with `gcloud`:
gcloud -q --project PROJECT_ID app deploy
Example gcloud
ouput:
$ gcloud -q --project gcloud-app-deploy-issue app deploy
WARNING: Automatic app detection is currently in Beta
You are about to deploy the following services:
- gcloud-app-deploy-issue/default/20160810t110640 (from [/Users/mike/Development/mkscrg/sandbox/gcloud-app-deploy-issue/app.yaml])
Deployed URL: [https://gcloud-app-deploy-issue.appspot.com]
Beginning deployment of service [default]...
WARNING: Ignoring file [.gitignore]: File matches ignore regex.
WARNING: Ignoring directory [.sdk]: Directory matches ignore regex.
File upload done.
Updating service [default]...failed.
ERROR: (gcloud.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed:
2016/08/10 11:06:45 go-app-builder: build timing: 1×compile (123ms total), 0×link (0 total)
2016/08/10 11:06:45 go-app-builder: failed running compile: exit status 1
hello.go:6: can't find import: "google.golang.org/appengine"
Since Google Cloud SDK 142.0.0 with app-engine-go 1.9.50, you should be able to deploy your application doing
gcloud beta app deploy
This also enables you to use CI/CD tools