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

Bamboo: Deploy only if a new build exists

Mike Barber March 16, 2014

I'm implementing continuous integration using Bamboo. So I have bamboo poll our SVN repository and build as needed. Then on a certain time interval (e.g. an hour) I have the latest build deployed to a dev environment using a schedule trigger. The problem is that even if there is only one actual build per day, Bamboo creates a new release each time it deploys. By the time I run a build from dev to stage to production there is really no way to match the release numbers. Is there a way to prevent it from creating a new release unless there has been a new build?

3 answers

1 accepted

0 votes
Answer accepted
Jason Monsorno
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2014

We do something similar for nightly tests. What I did is setup the tests as a manual stage and have another plan with a scheduled trigger fired them off with API calls.

I explain here, and thanks to @Eric Fusciardifor the update, how to use the api to retrive deployment information and how to fire off a deployment. With that you can write your own logic and control them however you want and trigger your logic from another Bamboo plan or any scheduler.

Mike Barber March 16, 2014

This has promise. I'll give it a try. Thank you for answering.

0 votes
Andy Liu April 28, 2016

Hello Mike, I'm facing the same issue, just curious, which direction did you end up going with in order to work around this issue? Thanks, I'd appreciate your comment.

Andy

0 votes
Ron Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2014

1. Set your build to be triggered by SVN commits

2. Then, set your trigger for the deployment project

Mike Barber March 16, 2014

This would cause a deployment whenever the build happened, which is not what I want.

Ron Chan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 16, 2014

I guess I misunderstood your predicament.

Can you explain why you need to do this "I have the latest build deployed to a dev environment using a schedule trigger"? Seems unnecessary to deploy when there is no change.

As far as deployment automation, it would only make sense to auto deploy to dev and staging, never to uat or production.

Mike Barber March 16, 2014

It is unnecessary to deploy when there is no change. That's the problem. I want to deploy on a schedule, provided that there have been changes. But in bamboo if I set a schedule trigger for deployment it creates a new release and deploys - even when there were not any changes.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events