Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

David Paquin February 10, 2015

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 votes
Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 10, 2015

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

David Paquin February 11, 2015

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?

Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2015

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.

Marcin Gardias
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 18, 2015
David Paquin February 19, 2015

Thanks, I'll take a look at that documentation

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events