Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Octopus Deploy uses a snapshot of deployment until I create a new release

I'm trying to set up a deployment in Octopus Deploy. As many other devs, I do that through iterations: tweak steps/scripts/packages -> click "Deploy" -> inspect the outcome -> start again if not satisfied. In case of Octopus Deploy, it uses a snapshot of the deployment process if any steps/scripts were changed since last release. Basically, when it comes to deploy, I get this warning:

Warning: for consistency, this deployment will use a snapshot of the variables and deployment process, which do not include the latest changes that have been made to the project. A changed process can only be incorporated by creating a new release (this one may be renamed if desired). Variables can be updated via the release page.

This means that I need to add a new release just to check if my deployment scripts change has taken effect or not. To add a release, I need to update the version and so on.

My question would be: how can I redeploy the same release with all the step changes introduced since the previous release? Is there a way to not create a new release to do that?

like image 319
Alex Maslov Avatar asked Nov 11 '14 01:11

Alex Maslov


People also ask

How does Octopus deployment work?

A release in Octopus, is a snapshot of the packaged software, variables, and the deployment process. A release is deployed to the environments defined in the deployment process. Typically, releases are deployed to one environment and then promoted to the next environment when they are successful.

What is an octopus deployment target?

Deployment targets are what Octopus Deploy deploys to. They can be Windows servers, Linux servers, Kubernetes (K8s) clusters, Azure Web Apps, and more. Environments are how you organize your deployment targets into groups that represent different stages of your deployment pipeline.

How do you update a variable snapshot in Octopus?

Check the variable snapshot for the releaseUpdate the Variable in the Variables section of the project, and then. Click the Update variables button - beware this will update all variables in the Snapshot to the latest values.


2 Answers

I asked this question of Paul Stovall several months ago when I started working with Octopus. His answer was "no".

I'm afraid there is not a way to do this without creating a new release. When you create a release, Octopus deploy stores an object in its internal database which is a snapshot in time containing everything needed to deploy. It doesn't have a mechanism to update these stored objects, and so it is required for you to create a new release each time.

like image 173
Bruce Van Horn Avatar answered Sep 23 '22 00:09

Bruce Van Horn


Please note that even though a snapshot of the process is taken, the variables can be updated if you're redeploying a previous release. If you're just changing variable values, then yes, you can reuse the same release over and over. If you're changing any of the process steps, then no - you have to create a new release.

If anything the version number just helps keep things segregated. The only time this becomes a problem is if you're using NuGet versioning, but if you're using the standard variable template versioning in Octopus deploy, it's incrementing the last digit in the version number.

like image 24
osij2is Avatar answered Sep 23 '22 00:09

osij2is