I have my current Cloud Build working, I connect my github repo to trigger the Cloud Build when I push to the main
branch which then creates my Cloud Function, but I am confused about the the --source
flag. I have read the google cloud function docs. They state that the
minimal source repository URL is: https://source.developers.google.com/projects/${PROJECT}/repos/${REPO}
. If I were to input this into my cloudbuild.yaml
file, does this mean that I am mimicking the complete path of my github url? I am currently just using .
which I believe is just the entire root directory.
my cloudbuild.yaml file:
steps:
- name: "gcr.io/cloud-builders/gcloud"
id: "deploypokedex"
args:
- functions
- deploy
- my_pokedex_function
- --source=.
- --entry-point=get_pokemon
- --trigger-topic=pokedex
- --timeout=540s
- --runtime=python39
- --region=us-central1
Yes you are mimicking the complete path of the Github URL.
--source=.
means that you are calling the source code in your current working directory. You can check this link on how to configure the Cloud Build deployment.Also based on the documentation you provided,
Let me know if you have questions or clarifications.