Google cloud container builder not always triggering from bitbucket

感情迁移 提交于 2021-01-27 05:45:42

问题


I have build triggers set up in the Google Cloud Container Builder that are set to trigger on specific branches and use the cloudbuild.yml config in the repo. For about the first day that I pushed commits to any of these branches, it triggered a container build and completed successfully. Since then, the triggers have only worked intermittently.

Sometimes Google Cloud Container Builder doesn't detect the commit at all (I have checked the commit is in bitbucket and the commit is on the right branch). At that point, I've tried manually triggering a build through the google console, but it uses the older commit that it last built on, not the latest commit. So then I will try to push small changes from the repo or do an empty commit.

Sometimes that triggers the build, sometimes not. The interesting thing is that when the build finally triggers on a branch after a while, it will trigger builds on the other branches if they have a recent commit that hasn't been built.

I have no idea how to resolve this. Has anyone experienced a similar problem?

UPDATE:

I solved my problem. I originally added each bitbucket repository to the Source Repositories in Google Cloud. After that, I added the build triggers for each of those repos in the Container Registry. When adding the trigger, I had to go through the same process of connecting to the repositories in Bitbucket as I was taken through with adding the source repositories. I later realized that it had created a separate connection in the Source Repositories section for each of these repos automatically. So I had two connections to each repo in bitbucket listed in the Source Repositories. Once I deleted the duplicates, the triggers started working consistently.

In summary, make sure you don't have any duplicate connections in the Source Repository.


回答1:


There were created a separate connection in the Source Repositories section for each of these repos automatically. So there were two connections to each repo in bitbucket listed in the Source Repositories. Once deleted the duplicates, the triggers started working consistently.

In summary, make sure you don't have any duplicate connections in the Source Repository.



来源:https://stackoverflow.com/questions/50575102/google-cloud-container-builder-not-always-triggering-from-bitbucket

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!