Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Some Bamboo Branch Plan Triggers are ignoring excluded files

Andrew Forkes June 10, 2014

I have a Bamboo Build Plan, that contains 3 Plan Branches, each identical except for the git branch they monitor and each with the same 'exclude file' regex pattern ".*/.txt" (exlude all *.txt files).

Each Plan Branch has it's own repository defined, overriding the master Plan's repository. Each plan monitors it's repository for file changes ('Polling the repository for changes' option).

But for some reason, one of the Plan Branches will not stop building whenever a change to excluded files is detected, and yet the other 2 Plan Branches behave exactly as expected, ignoring the changed file(s).

I have checked, compared, and rebuilt each Plan Branch to establish all 3 are exactly the same. I have copy-and-pasted the same regex expression between all 3 Plan Branches and checked and re-checked all the options are the same on every Plan Branch. Lastly I'm using the exact same file to test the trigger (and that it is excluded) on each Plan Branch.

Could anyone shed any light on why this might be occuring, or what else to check/change ?

Environment: Bamboo v5.4.2, build 4208

2 answers

1 accepted

0 votes
Answer accepted
Andrew Forkes June 12, 2014

Where a Build Plan makes use of Plan Branches, and those Plan Branches define exclusion triggers, make sure the 'Clean working directory after each build' field is checked, under {Plan Configuration > Default Stage > Miscellaneous}

0 votes
rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2014

Hi Andrew,

Thank you for your question.

I would kindly ask you to update your regex from (.*/.txt) to (.*/*.txt) and give it a try.

Kind regards,
Rafael

Andrew Forkes June 10, 2014

That you Rafael. I tried that, but the rogue Plan Branch still triggers. Infact that was the first regex I tried, but another member on these forums suggested the one above.

Is there anywhere I can compare branch configuration files on the server to establish that what the web UI is presenting, it what it's working from? Or perhaps a log I could access? I have full access to the server hosting Bamboo.

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2014

Hello Andrew,

You could have a look at the log files under:

Logs to an specific build
<bamboo-home>/xml-data/builds/<project>/download-data/build_logs/

Bamboo logs
<bamboo-home>/logs/atlassian-bamboo.log
<bamboo-install>/logs/catalina.out

Kind regards,
Rafael

Andrew Forkes June 10, 2014

Having looked at the build log files from <bamboo-home>/xml-data/builds/<project>/download-data/build_logs/ for the last 6 builds (2 of which were correctly triggered), it confirms the others were triggering (perhaps obvious) .. but not exactly what triggered them:

$ cat MXS-MBP11-34.log
simple  11-Jun-2014 02:43:46    Change detection found 1 change, starting build MXS-MBP11-34

$ cat MXS-MBP11-33.log
simple  11-Jun-2014 02:35:41    Change detection found 1 change, starting build MXS-MBP11-33

$ cat MXS-MBP11-32.log
simple  10-Jun-2014 23:36:46    Change detection found 2 changes, starting build MXS-MBP11-32

$ cat MXS-MBP11-31.log
simple  10-Jun-2014 00:58:55    Change detection found 1 change, starting build MXS-MBP11-31

$ cat MXS-MBP11-30.log
simple  10-Jun-2014 00:50:41    Change detection found 74 changes, starting build MXS-MBP11-30

$ cat MXS-MBP11-29.log
simple  26-May-2014 22:21:07    Change detection found 1 change, starting build MXS-MBP11-29

Each of the single '1 change' triggers, should NOT have triggered in this instance.

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 10, 2014

Hi Andrew,

You can have a look at:

<bamboo-home>/xml-data/builds/<project>/results/buildresults[n].xml

You should find the following entry:

&lt;myReasonForBuild&gt;
  &lt;myReason&gt;Manual build&lt;/myReason&gt;
&lt;/myReasonForBuild&gt;

Kind regards,
Rafael

Andrew Forkes June 10, 2014

Yes, each corrisponding buildresults.xml file lists:

&lt;myReasonForBuild&gt;
    &lt;myReason&gt;Code has changed&lt;/myReason&gt;
  &lt;/myReasonForBuild&gt;

rsperafico
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 11, 2014

Could you verify in Bamboo if you have the option "Clean working directory after each build" checked under {Plan Configuration >> Default Stage >> Miscellaneuos} tab, please.

Andrew Forkes June 11, 2014

No it isn't checked.

Andrew Forkes June 11, 2014

Having checked the 'Clean working directory after each build', and tested it 3 times, I can confirm it works now as expected as all Plan Branches.

This appears to be a Defect with this version of Bamboo. Unsure if it has been tackled in future versions, but should probably be raised as a bug.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events