我的问题是,给定下面的 yaml 文件,如果我在“dir: process/cbd-bu-data”的任何文件中进行更改,Cloud Build 会在触发时串行运行所有步骤。这会导致时间的浪费。
我希望只有该步骤在 cloudbuild 中运行,并在该目录的文件中进行了更改。我应该怎么做才能实现这个目标?
这是我的cloudbuild.yaml文件:
steps:
- args:
- beta
- functions
- deploy
- "--runtime=python37"
- "--trigger-http"
- "--entry-point=process_cbd_group_data"
- process_cbd_group_data
- "--region=us-central1"
dir: process/cbd-group-data
name: gcr.io/cloud-builders/gcloud
- args:
- beta
- functions
- deploy
- "--runtime=python37"
- "--trigger-http"
- "--entry-point=process_cbd_bu_data"
- process_cbd_bu_data
- "--region=us-central1"
dir: process/cbd-bu-data
name: gcr.io/cloud-builders/gcloud
- args:
- beta
- functions
- deploy
- "--runtime=python37"
- "--trigger-http"
- "--entry-point=process_cbd_structure_data"
- process_cbd_structure_data
- "--region=us-central1"
dir: process/cbd-structure-data
name: gcr.io/cloud-builders/gcloud
Run Code Online (Sandbox Code Playgroud) google-cloud-platform google-cloud-functions google-cloud-build