Skip to content

Commit

Permalink
GCF CI/CD: add cloudbuild.yaml (#3324)
Browse files Browse the repository at this point in the history
* GCF CI/CD: add cloudbuild.yaml

* Use consistent region tags across languages
  • Loading branch information
Ace Nassri authored Apr 10, 2020
1 parent a031120 commit fcad80f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions functions/ci_cd/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# [START functions_ci_cd_cloud_build]
steps:
- name: 'docker.io/library/python:3.7'
entrypoint: /bin/sh
# Run pip install and pytest in the same build step
# (pip packages won't be preserved in future steps!)
args: [-c, 'pip install -r requirements.txt', '&&', 'pytest']
dir: 'functions/autodeploy'
- name: 'gcr.io/cloud-builders/gcloud'
args: ['functions', 'deploy', '[YOUR_DEPLOYED_FUNCTION_NAME]', '[YOUR_FUNCTION_TRIGGER]', '--runtime', '[YOUR_RUNTIME]', '--entry-point', '[YOUR_FUNCTION_NAME_IN_CODE]']
dir: 'functions/autodeploy'
# [END functions_ci_cd_cloud_build]

0 comments on commit fcad80f

Please sign in to comment.