I'm currently building pipeline with Google Cloud Build that has this step
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'dataflow'
- 'jobs'
- 'cancel'
- '$(gcloud dataflow jobs list --filter="name=iot" --status=active --limit=1 --format="value(JOB_ID)")'
- '--region'
- 'asia-southeast2'
The problem with this configuration is that it treats this '$(gcloud dataflow jobs list --filter="name=iot" --status=active --limit=1 --format="value(JOB_ID)")'
as string instead of executing the command inside it.
So, my question is, it is possible to have $()
operator in Google Cloud Build YAML file? and how?
Thanks!