I am trying to implement a Google Cloud function that is based on code in a Git style repository. I have the code linked to Google Cloud Platform\'s \"Source Repositories\"
If you're trying to upload your code zip using a GCS bucket or the file upload function, make sure that you don't zip the folder that contains your code but just the code files.
CodeFolder
├── package
| ├──script1.py
| └──script2.py
├── package2
├── ...
├── main.py
└── requirements.txt
Do NOT create a Zip file from the CodeFolder
.
Instead, create a zip file from main.py
and requirement.txt
and package
.
Source