Bamboo: Deploy only if a new build exists

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

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.

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

1. Set your build to be triggered by SVN commits

2. Then, set your trigger for the deployment project

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

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.

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.

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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
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,575 views 0 6
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