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

This widget could not be displayed.

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.

This widget could not be displayed.

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.

This widget could not be displayed.

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
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Published yesterday in Marketplace Apps

The 7 hacks of highly successful automation

...there's anything I've learnt from working, it's that people are lazy! No offense to anyone reading this, but it's true and we can all admit it. The easier you make something for someone, the more...

97 views 0 8
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