I am trying to build the Terraform cloud builder. Following the example in the gcloud builds submit
doc, I run:
<code>gcloud builds submit https://github.com/GoogleCloudPlatform/cloud-builders-community
--region="$REGION"
--git-source-revision=master
--git-source-dir=terraform
--config=cloudbuild.yaml
</code>
<code>gcloud builds submit https://github.com/GoogleCloudPlatform/cloud-builders-community
--region="$REGION"
--git-source-revision=master
--git-source-dir=terraform
--config=cloudbuild.yaml
</code>
gcloud builds submit https://github.com/GoogleCloudPlatform/cloud-builders-community
--region="$REGION"
--git-source-revision=master
--git-source-dir=terraform
--config=cloudbuild.yaml
but it gives me an error
<code>ERROR: (gcloud.builds.submit) Unable to read file [cloudbuild.yaml]: [Errno 2] No such file or directory: 'cloudbuild.yaml'
</code>
<code>ERROR: (gcloud.builds.submit) Unable to read file [cloudbuild.yaml]: [Errno 2] No such file or directory: 'cloudbuild.yaml'
</code>
ERROR: (gcloud.builds.submit) Unable to read file [cloudbuild.yaml]: [Errno 2] No such file or directory: 'cloudbuild.yaml'
The cloudbuild.yaml
file is not in the repo root directory, but I would expect that --git-source-dir
would tell it where to look. Anyway, even if I specify --config=terraform/cloudbuild.yaml
, it gives me the same error.
I know I can clone the repo myself and run the build from my local directory, but from the documentation it seems like these options should do what I want. Am I missing something, or does it just not work?