My (simplified) build plan stages look like this:
- Build & Test
- Promote (Manual)
I have this plan linked to a Deployment Project with a couple of test environments, let's say:
I would like that, once the Test stage has been successful, my binaries are deployed automatically to ENV: Test. The trigger After successful build plan would be a good candidate, but it doesn't trigger the deploy due to a build stage (Promote) pending to be completed.
Any ideas on how to achieve this?
_______________________________________
EDIT 1: I'm still a bit confused with this. I'll explain a simplified version of what I want to achieve:
- Build and, on successful build, automatically deploy to (say) ENV: Test.
- As a manual step, I want to run Promote and deploy to Prod.
As far as I can see, you can not create tags from deployment tasks (and not sure if you should be able to do so), hence I assume this has to be done in a manual Promotion stage in the build plan. If I do that (manual stage), then I can not have an automatic deployment to UAT. If I do Promotion in a deployment plan, I can not create a tag.
I'm flexible with my build plan/deployment project configuration, so: what's the suggestion to achieve the 2 requisites mentioned above? That is, automated deployment to UAT and tag creation on promotion to Prod
--------------------------------------------------------------------------
EDIT 2: Still haven't found a proper solution for this. Keep on thinking the best option would be to have deployment triggers linked to build plan stages completion
Build and Deploy.PNG
I can see a few reasons for this:
- You want to isolate the 'deployment' tasks from the 'build' tasks. If my deployment to prod fails due to, say, a connectivity issue, that doesn't mean I need to rebuild my binary. Just re-running a deployment should be fine.
- Tag creation and artifact promotion (to name 2) do not belong to deployment. I want to be able to re-run my deployments, roll them back, etc. How should I address the tag creation if I put this task in a deployment environment? Think of re-running deployments, roll-backs, etc.
- I still want to have as much as possible automated, hence I want to deploy to my ENV: Test as soon as I have a green build. I do not want my developers to have to manually create and deploy a release.
Found the following related tickets:
https://jira.atlassian.com/browse/BAM-13347
https://jira.atlassian.com/browse/BAM-13501