Can I trigger a nightly build when changes have been made in the last 24 hours?

I'm testing about a dozen applications, all written in PHP using Zend Framework, which do their unit testing with PHPUnit. I've recently turned off code coverage for all these builds, as many of them take 30+ minutes to finish a single build with code completion turned on, and 15-60 seconds to do a build with it turned off. I am starting to miss the nice charts which show the code coverage history though.

So, is there a way I can schedule a nightly build which happens when a change has occurred in the last 24 hours? For this build, I will have a custom variable set which will include the code coverage options for PHPUnit. I suppose I could have it do a nightly build whether or not a commit has occurred, but it seems like a waste of build numbers for some of our projects which aren't being actively worked on.

Can anyone think of a way to do this, or a better alternative I'm totally missing?


1 answer

0 votes

How about using repository polling trigger with cron schedule set to once a day?

If there is another trigger set (Stash Repository Triggered, the default one) will it see changes? Or will it know that a build was already done earlier in the day which built off that code change? I also just realized there doesn't seem to be a way to set custom variables to different values within the triggers... Is there a way to trigger a build manually with custom parameters outside of Bamboo's UI? Like maybe a linux cron job?

Sorry for not coming back to you earlier. If you have 2 triggers on a plan, they 'share' the history. So if Stash triggers the build, the polling later on will not trigger it again. You can use /queue REST resource to start build from a script. If you add params in form of "bamboo.variableName" to the query string, bamboo will use those to override respective global/plan variables.

Thanks, I'll take a look at that documentation

Suggest an answer

Log in or Sign up to answer
Community showcase
Asked Thursday in Jira Ops

I'm John Allspaw, Ask Me Anything about incident analysis and postmortems

I'm John Allspaw, co-founder of   Adaptive Capacity Labs, where we help teams use their incidents to learn and improve. We bring research-driven methods and approaches to drive effective inciden...

4,339 views 20 13
View question

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