It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Is there a way to get a Deployment Project to kick off the build it's dependent on when running on a schedule?

I want to have a scheduled daily build that builds and deploys to our dev environment and I'd like to be able to reuse the build for things other than just the daily build. Because of this I'd like to be able to have the deployment job kicked off from a scheduled trigger and have it automatically run the dependent build plan. I've tried doing this and it looks like the deployment project grabs the last sucessful build plan's artifacts which is not the desired behavior.

1 answer

1 accepted

0 votes
Answer accepted

You could trigger it with the API but you'd also need to be waiting around for it. I can't think of a straight forward way to handle what you seem to be asking for so I'll list off a few ways to get it done which you can probably mix and match a bit.

Two plans - Same configuration except different time triggers each with their own deployment project that is triggered off the build.

Two triggers on the same build, if you could redeploy the last successful build if the last build(s) failed and have a known time limitation of the build then you could have two build triggers and each with their own accompaning deployment triggers that are (build time) apart from the build triggers. You could also build in checks to prevent needless redeploys.

And a complicated way mainly by excess logs, setup two triggers on the build and have each deployment project trigger off the build. The first job of the deployment project would check some parameter; bamboo variable, artifact, timestamp, time, etc.; and either do the work or not. Not doing the work can't cancel the deploy though, you'd either have to report successfully doing nothing or report a failure which won't go to the next steps.

More complicated, less logs. Build has two triggers, deployments have none. Last stage of the plan will use same/similar check parameter as previous example and manually trigger the deployment(s) of its choosing. The call would need to be async to an external script/process and have a short delay to ensure the build is complete before the deployment is fired off. This is the most complicated but will write/leave the cleanest results to view, the UI will show which deployment(s) was called from each build and you only have a single plan to configure.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted yesterday in Jira

Upcoming Enterprise releases targeting Q3 2019: Jira Software 8.5 & Jira Service Desk 4.5

Since launching the Jira Software 8.0 and Jira Service Desk 4.0 platform releases in February, many of you have been asking when the next Enterprise release will be so you can take advantage of the m...

270 views 3 6
Join discussion

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