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?

Thanks!

1 answer

0 vote

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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Renan Battaglin
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,318 views 0 5
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