Franco Piccolo
Franco Piccolo

Reputation: 7410

My build trigger is not recognizing the glob pattern

I have two folders in my main directory, cloud_functions and cloudbuild:

├── cloud_functions
│   ├── batch_predict
│   │   ├── config.py
│       ├── main.py
│       ├── requirements.txt
│       └── utils.py
├── cloudbuild
│   ├── batch_predict_cloud_function
│   │   ├── config.yaml
│   │   ├── create_triggers.sh

In the Cloud build trigger I specified the glob patterns as:

This is accomplished with the following flag in the gcloud command that creates the trigger:

--included-files="cloud_functions/batch_predict/**, cloudbuild/batch_predict_cloud_function/**" \

I validated the globs are registered in the UI but changes in the cloudbuild folder don't trigger the build, any ideas why this might be happening?

Upvotes: 0

Views: 337

Answers (1)

JMA
JMA

Reputation: 813

To specify multiple glob patterns in the gcloud command you have to pass multiple arguments to the --included-files option using the following syntax:

--included-files "cloud_functions/batch_predict/**","cloudbuild/batch_predict_cloud_function/**"

Upvotes: 1

Related Questions