Skip to content
This repository has been archived by the owner on Jun 11, 2020. It is now read-only.

Why vendor folder is ignored (go project) #47

Open
korjavin opened this issue Feb 19, 2019 · 1 comment
Open

Why vendor folder is ignored (go project) #47

korjavin opened this issue Feb 19, 2019 · 1 comment

Comments

@korjavin
Copy link

I am trying to deploy my go/http project as a function with a command like

gcloud functions deploy table-viewer --verbosity=debug --entry-point LambdaX --runtime go111 --trigger-http --set-env-vars AUTH_LOGIN=login,...

.gcloudignore contains both

go.sum
go.mod

From the output :

INFO: Using .gcloudignore file at [.../table-viewer/.gcloudignore].
DEBUG: Skipping file [go.mod]
DEBUG: Skipping file [go.sum]
DEBUG: Skipping file [.gitignore]
DEBUG: Skipping file [vendor]
DEBUG: Skipping file [vendor/golang.org]
DEBUG: Skipping file [vendor/golang.org/x]
DEBUG: Skipping file [vendor/golang.org/x/sys]
...

Why it ignores vendor folder?

@sydneypemberton1986
Copy link

sydneypemberton1986 commented Feb 3, 2020

The issue is caused by the fact that .gcloudignore gets automatically generated with .gitignore in it which causes it to also ignore those files. However some of those files are necessary to the deployment in my case. This is strange implicit behavior. Adding something to .gitignore should not change the cloud tooling implicitly.

The fix is to either remove that line from the .gcloudignore or to turn off the feature entirely:

gcloud config set gcloudignore/enabled false

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants