I want to write a script where I will pass the values and the script will update all the substitutions values automically. In cloud build trigger, I am passing values like _DOCKER_IMAGE, _IMAGE_TAG, _BUCKET_NAME etc. to the substitutions values of the cloud build trigger. I was looking into the documentation Gcloud command options for triggers but did not find any reference to update the substitutions values using gcloud command. I tried these commands but it was failed to execute.
gcloud beta builds triggers update <TRIGGER_NAME> --project=$PROJECT_ID --substitutions=_BUCKET_NAME=demo-bucket-name
gcloud alpha builds triggers update <TRIGGER_NAME> --project=$PROJECT_ID --substitutions=_BUCKET_NAME=demo-bucket-name
The error message I got:
ERROR: (gcloud.beta.builds.triggers) Invalid choice: 'update'. Maybe you meant:
gcloud beta builds triggers export
gcloud beta builds connections update github
gcloud beta builds connections update github-enterprise
gcloud builds cancel
gcloud builds describe
gcloud builds list
gcloud builds log
gcloud builds submit