Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Atlassian Bamboo: don't trigger build if changes were made to a specific file

Tags:

bamboo

I have a plan in Bamboo that starts whenever changes are made to the attached repositories (via polling).

Now, on each build, if successful, a CHANGELOG file is updated in the repo, which in turn, triggers another build. How can I omit certain files from Bamboo's polling, so that a build isn't started if changes are found for those files? Because otherwise, I enter in infinite loop, with a change to CHANGELOG triggering another build which in turn updated CHANGELOG and so on.

If this is not possible, what other viable solutions are there? Is it possible to attach a shell script somewhere before the build starts to check whether it's desired to start a new build?

like image 304
linkyndy Avatar asked Apr 08 '14 08:04

linkyndy


People also ask

Which trigger will cause a build to be triggered when new changes in the source code are detected?

Repository triggers the build when changes are committed.

How do you trigger a Bamboo build?

Steps: Create a new Automation for Jira rule and choose the Genius Commit created trigger from the DevOps category. Choose the command "Build (@build)" from the list of built-in commands. Replace the placeholders with your actual Bamboo base URL, the Bamboo project key, a hyphen character ("-") and the plan key.


1 Answers

It turned out that this was simpler than I've thought. In Plan Configuration, in the Repositories tab, on each repository, under Advanced, there is an Include / exclude files input where you can Customise what files Bamboo uses to detect changes. By adding a regular expression there, I got everything solved and working as expected.

Bamboo pattern matching reference: https://confluence.atlassian.com/display/BAMBOO/Pattern+matching+reference

like image 52
linkyndy Avatar answered Sep 22 '22 09:09

linkyndy