Bamboo 5.1.1 pre-build action issue

We are having two Build projects which has some build plans and we are always running a clean checkout for all plans.

We are using Build Number stamper plugin to generate "build-number.txt". This plugin runs as a pre-build action.

In Project 1 pre-build action runs after "Checkout Default Repository" task and hence our generated build-number.txt is retained


In Project 2 pre-build action runs at the start i.e. before "Checkout Default Repository" and since we always do a clean build. The task 'Checkout Default Repository" removes build-number.txt.

I have looked in every tab and in miscellaneous tab in the corresponding Job and I cannot find were this behavious is defined.

Appreciate if someone please shed some light on this

2 answers

1 accepted

This widget could not be displayed.

The pre-build action are deferred after Checkout Task if this is the first task in the Job.(more precisely it is executed before the first task which is not 'initialising task', so if you have 2 checkout tasks at the beginning the pre-build action would be executed after both of them. But if you put script task at the top it is executed before it)

In your case the solution would be to move disabled task down the pipeline (since you don't use it anyway).

This widget could not be displayed.

Thanks for the answer Marcin.

Is it the default behaviour or is there way to run pre-build action before/after any tasks?

That sequence is hard coded.

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted yesterday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

50 views 1 0
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you