简体   繁体   English

Bamboo CICD管道在Maven版本中循环触发

[英]Bamboo CICD pipeline getting triggered in a loop with maven release

I have a Bamboo CICD pipeline using maven build and release. 我有一个使用maven构建和发布的Bamboo CICD管道。 Have created a trigger of type " Repository triggers the build when changes are committed " and my repository is BitBucket. 已经创建了类型为“ Repository triggers the build when changes are committed ”的Repository triggers the build when changes are committed并且我的存储库为BitBucket。

Whenever code is checked in or if there is a change in my repository, build pipeline is getting triggered. 每当检入代码或我的存储库中有更改时,都会触发构建管道。 Last step of my build pipeline is maven release which updates and checks in the pom file. 我构建流程的最后一步是Maven版本,它将更新并签入pom文件。 This check-in is in turn invoking the pipeline resulting in a loop. 该签入依次调用管道,从而导致循环。 Is there any way this loop can be stopped by not invoking the pipeline for pom file changes checked in by bamboo?. 是否可以通过不调用管道来检查Bamboo检查的pom文件更改来停止此循环?

Configure the plan, goto the Repositories tab and select your repository (or linked repository). 配置计划,转到“存储库”选项卡,然后选择您的存储库(或链接的存储库)。

Scroll down to the bottom and expand Advanced Options. 向下滚动到底部,然后展开“高级选项”。

There is a dropdown for "Include / exclude files", select "Exclude all changes that matches to the following pattern" then a textbox will appear underneath "File pattern" where you can specify a regular expression to express your pom file. 有一个“包含/排除文件”下拉列表,选择“排除与以下模式匹配的所有更改”,然后在“文件模式”下面将显示一个文本框,您可以在其中指定一个正则表达式来表示pom文件。

Link to pattern examples 链接到模式示例

Maven release checks in the files with commit message "[maven-release-plugin]" and Bamboo plan ignores commits starting with the specified pattern. Maven发布会使用提交消息“ [maven-release-plugin]”检入文件,而Bamboo计划会忽略以指定模式开头的提交。 I had earlier updated the maven release commit message to satisfy my commit hooks hence Bamboo plan was always getting triggered. 我之前已经更新了maven版本提交消息,以满足我的提交钩子,因此Bamboo计划总是被触发。 Have now updated the commit hook to accept the maven commits. 现在已经更新了提交挂钩以接受Maven提交。

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

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