I have an app that uses "github.com/gorilla/mux" and I am able to deploy it with goapp deploy
. But I cannot do the same with gcloud preview app deploy
because I am facing this error:
Beginning deployment...
Copying files to Google Cloud Storage...
Synchronizing files to [<googlecloudsdk.api_lib.app.cloud_storage.BucketReference object at 0x10514e790>].
File upload done.
Updating module [api]...failed.
ERROR: (gcloud.preview.app.deploy) Error Response: [9] Deployment contains files that cannot be compiled: Compile failed:
2016/03/22 09:06:40 go-app-builder: build timing: 1×6g (42ms total), 0×6l (0 total)
2016/03/22 09:06:40 go-app-builder: failed running 6g: exit status 1
api.go:29: can't find import: "github.com/gorilla/handlers"
I want to be able to do it because I need to deploy from travisCI on merge and I want to use service-client.json for authorisation.
Is there any way around it?
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
To answer your question directly, the way around this would be to use goapp deploy
as is recommended by the App Engine documentation for the Go standard environment, Deploying a Go App. At the time when gcloud preview app deploy
was available, goapp was recommended precisely for handling go's specific environment and dependency requirements.
Alternatively, if you're looking to use gcloud, you would need to use gcloud app deploy
now. gcloud preview app deploy
has been deprecated and/or removed as of June 29, 2016.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With