I just used Octo.exe to more quickly script the promotion of a couple of projects. I’m trying to understand if I’m missing something obvious (one of them is deprecated or something) between deploy and release. The one appears to be set up to more mimic the idea of copying code from one environment to the next in the lifecycle*. Whereas deploy appears to be used to describe getting it on the server initially, or again.
However as I was setting this up, and thinking about ways I’d want to use this, I found that with promote, I can’t specify a --version (or --releasenumber). This could be problematic depending on how things are scheduled as I might not want to promote the most recent version of something, but rather one that was approved to be promoted.
So DeployVersion seems to make more sense since you can do basically the same thing as promote, but also specify a version. And it may not matter, but just want to make sure I’m not missing something or that one of these isn’t going away in the near future.
- Yes I know the code actually comes from the Octopus server regardless.
Thanks for reaching out. The fact that promote-release promotes the latest of that environment is actually as design. My good fiend Henrik explains why on this post
If you want to “promote” a release from an older version, you’re gonna have to go with deploy-release
Hope that helps
I’m getting the message that the post is private or deleted.
I actually had started with the idea that they made sense as different things, however as I worked through how Octopus actually works, the deploy and promote vernacular made less sense. You can deploy to an environment instead of promoting which is where I have some confusion.
I’m also not clear as to why there isn’t an option to promote a particular release (but that also muddies up the waters).
We’ll see if it makes sense after I can read the post (or it can be summarized)
IT Deployment Engineer
Preventice Solutions is a strategic combination of eCardio and Preventice
2765 Commerce Dr NW, Ste 220
Rochester, MN 55901
This message contains confidential information and is intended only for email@example.com. If you are not one of these recipients you should not disseminate, distribute or copy this e-mail. Please notify the designated recipients immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mail transmissions cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. Mike Peterson therefore does not accept liability for any errors or omissions in the contents of this message, which arise as a result of e-mail transmission. If verification is required please request a hard-copy version.
Sorry about that, i didnt notice the conversation was private. From a technical perspective, Promote and Deploy are basically the same as they both lead to a deployment. Promote saves you the trouble of selecting the environment, as it’ll automatically try to deploy to the next environment on the Lifecycle. From Octo.exe it’ll also grab the latest release automatically. Here’s Henrik’s explanation for this behavior:
when octo.exe attempts to promote a release it looks at the latest version of a release in an environment that is on the dashboard, the dashboard is driven by a RavenDB index, and these indexes can become stale at times and take a while to update themselves, so when you deployed the release to your staging environment and then 5 minutes later wanted to promote that release from staging to production, the dashboard index hadn't yet updated and as such the release that got selected was the incorrect version.
Unfortunately, there's not much we can do about this issue with stale indexes, but the workaround would be to wait a bit longer before promoting a release from one environment to another.
Deploy forces you to choose the target environment first. From Octo.exe it also gives you the chance of selecting the release number as well.
On your case the best would be to use
Deploy-release and manually pass the version and environment you want to deploy.