Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion Python/cloud_functions/Compute_Func/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1 +1,29 @@
# Placeholder
# Placeholdersubstitutions:
_BUILD_NAME: compute-func-build
_FUNCTION_NAME: compute-func
_REGION: us-central1


steps:

- name: 'gcr.io/cloud-builders/gcloud'
args:
- functions
- deploy
- ${_FUNCTION_NAME}
- --gen2
- --runtime=python39
- --region=${_REGION}
- --source=./src
- --entry-point=main
- --timeout=3600
- --memory=1GiB
- --set-env-vars
- SECRET_MANAGER_URL_ID=${_SECRET_MANAGER_URL_ID}
- --trigger-http
dir: Python/cloud_functions/Compute_Func

options:
logging: CLOUD_LOGGING_ONLY

timeout: 1800s
8 changes: 6 additions & 2 deletions Python/cloud_functions/Compute_Func/src/main.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# from google.cloud import bigquery

# bq_client = bigquery.Client(credentials=credentials)

def main(request):

text = "Compute Function is called!"

return text