Google Cloud Build - can you store cloudbuild.yaml in external repository?

818 views
Skip to first unread message

Pat Needham

unread,
Aug 5, 2019, 3:53:57 PM8/5/19
to Google Cloud Developers
Hi,

I'm wondering if there is a way one can use Google Cloud Build with multiple repositories, without having to keep the `cloudbuild.yaml` file inside each one (suppose it would be the same configuration for each of those repositories). On the "Edit trigger" page (https://console.cloud.google.com/cloud-build/triggers/<random-guid>?project=<projectID>), the Build configuration section has two options, one for Dockerfile and one for Cloud Build configuration file (yaml or json). The Learn more link under that second option states that "You must create the build config file in your project's root directory and Cloud Build will read it each time it starts a build."

Given that restriction, I thought a workaround would be to have a separate repository, specifically for that config file (and any other related dependencies), and have that one for the Cloud Build trigger. But in that case, that trigger would not be run whenever changes are made to the original repos since they are separate.

I'm asking about because I work at a place which relies on Cloudbees Jenkins for CI/CD, and separate repos for each of the React UI "modules" which make up our applications. This type of "external config" in question would be a requirement to even consider switching to Cloud Build (which I hope happens).

-Pat

Nicolas (Google Cloud Platform Support)

unread,
Aug 5, 2019, 7:46:38 PM8/5/19
to Google Cloud Developers
Hi Pat,

Thank you for opening this thread, if I understand correctly you would like to be able to reference the cloudbuild.yaml from an external repository.

I was able to find a feature request that is currently being worked on however instead of using a repository the yaml file would be inside of a Google Storage bucket instead which I think would serve the same purpose.

Though we can't provide an ETA on feature requests nor guarantee their implementation, rest assured that your feedback is always taken very seriously, as it allows us to improve our products.

Pat Needham

unread,
Aug 5, 2019, 7:57:50 PM8/5/19
to Google Cloud Developers
Thank you for the info Nicolas. Yes, the alternative described does seem to serve the same purpose. Can you provide a link to that feature request if it is public?

Nicolas (Google Cloud Platform Support)

unread,
Aug 6, 2019, 12:41:01 PM8/6/19
to google-c...@googlegroups.com

Hi Pat,

For tracking purposes I opened the issue tracker here and it should be updated once/if the feature is implemented.

Once again, thanks for the feedback!
Reply all
Reply to author
Forward
0 new messages