CloudBuild with GITLAB at module level

163 views
Skip to first unread message

Sunitha M

unread,
Jul 18, 2022, 4:44:12 AM7/18/22
to Google Cloud Developers

I was working on GITHUB and GCP(Cloud Build for deployments) and working good. Below are the steps:

  • Created multiple Cloud Functions and used same GIT HUB repository.
  • Created separate Cloud Build Trigger for each Cloud Function where separate cloudbuild.yml in each Cloud Function folder in repository.
  • Trigger gets run when there are changes in respective cloud function scripts.

Now i need to integrate Cloud Build with GITLAB. I have gone through the documentation but found that only webhook is the option and the trigger will be based on whole repository changes. It will require separate repository for each cloud function or Cloud Run. There is no option to select the repository itself.

Can experts guide me on this how I can do this integration because, we are planning to have one repo and multiple service/applications stored in that repository. And we want CI to run on GCP environment itself.

Andrés Márquez

unread,
Jul 25, 2022, 1:56:23 PM7/25/22
to Google Cloud Developers

The suggestion on these kinds of scenarios is to have only one Cloud Function per Event Trigger and perform any task on there (even launching other Cloud Functions) instead of having multiple Cloud Functions listening to the same event on the same bucket.


Additionally, do you think you could re-word your goal? So that what you are trying to achieve is clearer for the community.

Reply all
Reply to author
Forward
0 new messages