我使用以下命令部署了一个名为athenticationProcessing()的谷歌云函数(Node ):
gcloud functions deploy athenticationProcessing --runtime nodejs8 --trigger-topic Authentication到目前为止,它运行得很好。
现在我已经启动了cloudbuild,我使用了下面的脚本,它也工作得很好:
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args:
- functions
- deploy
- athenticationProcessing
- '--trigger-topic'
- Authentication
- '--runtime'
- nodejs8
- '--timeout=540'现在我需要创建多个文件夹,每个文件夹都有一个index.js和云构建文件(所有文件夹都在一个github repo中)。但是cloudbuild.yaml期望index.js位于存储库的根文件夹中。
有没有什么属性可以让cloudbuild.yaml知道我的索引文件的确切位置,而不是猜测默认的位置?
发布于 2019-09-18 23:57:07
可以在每个步骤中使用dir字段来指定要在其中执行部署命令的特定文件夹,例如:
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args:
- functions
- deploy
- athenticationProcessing
...
dir: folder/foo
- name: 'gcr.io/cloud-builders/gcloud'
args:
- functions
- deploy
- OTHER_FUNCTION_NAME
...
dir: folder/bar你会发现更多的信息here。
https://stackoverflow.com/questions/57994924
复制相似问题