Pre/Post Build Command Plugin isn't Pre/Post Build - or am I missing something?

I added the Pre/Post Build Command Plugin to my testbed instance of Bamboo 3.4.3

What I found is that the pre and post build command is available IN A JOB.

I want an action that is before the first stage of the build plan and after the last stage of the build plan, not something before and after a job. I.e. something that is pre-the-build and post-the-build, not pre-job and post-job...

Is there a configuration option I missed somewhere?

2 answers

1 accepted

This widget could not be displayed.

Hi Kenneth, it only works for Jobs not Plans. I've opened up a feature request for you to add support for this. Please watch and vote for it :)

I voted for it, and I added a use case in the comments:

Here is my use case: I have a resource shared across several build plans. Each build plan needs exclusive access to the resource. I cannot use agent capabilities and job requirements 'trick' to control access to the resource because, across the different stages of the build plan, a number of different remote agents need to be used.

I could use a semaphore file approach to lock access to the resource via a script at the beginning of the build, and unlock it at the end of the build. But, if the build fails somewhere in between or if the build is stopped, the resource would never be unlocked. I could add 'final task' to every job to release the resource, but then in the next stage I would need to re-acquire the resource. That leaves open the possibility that, between the task that released the resource and the task the re-acquires it, another build plan that was waiting on the resource could acquire it instead, disrupting this build plan.

Thus, I really need an action PRE the first stage of the build that can acquire lock on the resource, and a POST last stage (regardless of build success or failure) that can release the resource.

This widget could not be displayed.

Hi Ken, please advise if you have found a way to run PRE/POST stage commands. Thanks!

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
Published yesterday in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

95 views 0 8
Read article

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