Google云容器构建器并非总是从bitbucket触发 [英] Google cloud container builder not always triggering from bitbucket

查看:47
本文介绍了Google云容器构建器并非总是从bitbucket触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Google Cloud Container Builder中设置了构建触发器,这些触发器设置为在特定分支上触发,并在存储库中使用cloudbuild.yml配置.在我将提交推送到这些分支中的任何一个分支的第一天,它触发了容器构建并成功完成.从那时起,触发器只是断断续续地起作用.

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.

有时,Google Cloud Container Builder根本无法检测到提交(我已经检查了该提交位于bitbucket中,并且该提交位于右侧分支上).那时,我尝试通过Google控制台手动触发构建,但是它使用了上次构建的较早的提交,而不是最新的提交.因此,我将尝试从存储库中推送少量更改或执行空提交.

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?

更新:

我解决了我的问题.我最初将每个位桶存储库添加到Google Cloud中的源存储库.之后,我在Container Registry中为每个存储库添加了构建触发器.添加触发器时,我必须经历与添加源存储库的过程相同的连接到Bitbucket中的存储库的过程.后来我意识到,它已经在源存储库"部分为每个存储库自动创建了一个单独的连接.所以我有两个连接到源存储库中列出的bitbucket中的每个存储库.一旦我删除了重复项,触发器便开始一致地工作.

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.

推荐答案

在源存储库"部分中自动为每个存储库创建了一个单独的连接.因此,到源存储库中列出的bitbucket中的每个存储库都有两个连接.删除重复项后,触发器将开始一致地工作.

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.

这篇关于Google云容器构建器并非总是从bitbucket触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆