0

I would like to compress and upload a cloud function to a bucket. But not deploy the function.

I am going to deploy it with a Deployment Manager template: type: 'gcp-types/cloudfunctions-v1:projects.locations.functions'.

I can't find an option in gcloud cli to zip a folder and ignore files in .gcloudignore if I create the zip manually, something like git archive.

I read google cloud functions command to package without deploying but I don't know how to ignore the files if I create the zip manually.

Thanks in advance.

Jorge Yero
  • 11
  • 1
  • 2
  • Are you still having this issue? Also, you can directly upload the zip to the bucket with `gcloud cp` if you already have it, have you tried doing so? – rsalinas Mar 15 '21 at 12:07
  • I am uploading the zip with `gsutil cp` but the main problem is create the zip and ignore files in `.gcloudignore`, for now I am ignoring files manual with `-x` modifier, but it isn't sync with `.gcloudignore` so I need to update both places when need to change ignored files. – Jorge Yero Mar 15 '21 at 23:43

0 Answers0