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.
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.
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...
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!
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