简体   繁体   English

竹无限循环

[英]Bamboo infinite loop

Having some major issues with Bamboo. 与Bamboo有一些重大问题。

I run a rails project, that runs on Engine Yard. 我运行一个在Engine Yard上运行的rails项目。

My build strategy is as follows 我的构建策略如下

  1. Checkout from Source Code 从源代码结账
  2. bundle install 捆绑安装
  3. rspec (run tests) rspec(运行测试)
  4. Tag my build 标记我的构建

(code to create tag causes new commit, tag used in deploy) (创建标记的代码会导致新的提交,部署中使用的标记)

git remote remove origin 
git remote add origin <my repo> 
git tag Bamboo-${bamboo.buildNumber}
git push origin Bamboo-${bamboo.buildNumber}

In my deploy the way engine yard works is you deploy based on branches or tags ( there is no build artifacts) 在我的部署中,引擎码的工作方式是基于分支或标签进行部署(没有构建工件)

So in my Deploy it's a single script that uses a gem https://github.com/engineyard/engineyard 所以在我的部署中,它是一个使用gem https://github.com/engineyard/engineyard的脚本

and runs 并运行

ey deploy --environment <staging> --tag=Bamboo- ${bamboo.buildNumber} --app <my app>

Engine yard does all the rails 'stuff' to prep the build and deploy it. 发动机堆场完成所有导轨的“东西”以准备构建并部署它。 Really just need Bamboo to run test and if it works tag build. 真的只需要Bamboo来运行测试,如果它工作标签构建。

PROBLEM 问题

I am using bitbucket source control and have configured a hook to trigger a bamboo build on any commit to master. 我正在使用bitbucket源代码控制并配置了一个钩子来触发任何提交到master的构建。

The issue step 4) is pushing a tag which causes bitbucket to execute another build 问题步骤4)是推送一个标签,导致bitbucket执行另一个构建

Resulting in infinitely building bamboo. 导致无限建筑竹子。

Looking into how to solve this. 看看如何解决这个问题。 Figured I could use Bamboo 'Exclude Changesets' and filter out a particular commit message 想象我可以使用Bamboo'排除变更集'并过滤掉特定的提交消息

https://confluence.atlassian.com/display/BAMBOO/Bitbucket?focusedCommentId=610435557&#comment-610435557 https://confluence.atlassian.com/display/BAMBOO/Bitbucket?focusedCommentId=610435557&#comment-610435557

so my 4) would now look like 所以我现在看起来像

git remote remove origin
git remote add origin <my repo>

#create tag
git tag -a Bamboo-${bamboo.buildNumber} - m 'bamboo build'
#push tag
git push origin Bamboo-${bamboo.buildNumber}

However as per the comments on that confluence page. 但是根据该汇合页面上的评论。 Exclude Changsets isn't a visible option anymore? 排除Changsets不再是一个可见的选项?

I don't understand how I can stop this infinite building loop. 我不明白如何阻止这个无限的建筑循环。

We use Bamboo and a tag doesn't kick off the build for us. 我们使用Bamboo并且标签不会为我们启动构建。

Our tag process is: 我们的标签流程是:

git tag -a v1.4.2 -m 'Production Release: [date]
git push origin --tags

Try using the --tags option when pushing. --tags时尝试使用--tags选项。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM