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?
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ken, please advise if you have found a way to run PRE/POST stage commands. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.