'Dry Run' Deployment
Sometimes deployments are bad due to bad configuration variables that are un-testable before releasing to production.
Having the ability to 'dry run' a deployment and see all the task outputs with specific highlighting for variables and evaluated variables would allow the identification of changes that need to be made before actually deploying to an environment.
At the moment we are not planning to add a full fledged dry run feature. However we are planning to add:
- Ability to preview the evaluated variables for an environment/step/machine/tenant combo
- Ability to see which steps will run for a particular environment/machine/tenant combo
For the config transforms side of things, we are thinking of either creating a tool, extending Calamari or proving a UI that performs transforms and variable substitution on a package or set of files.
We hope this covers a large portion of the motivation for this ticket.
At the moment these features are planned for mid year.
— Robert W
Is this still happening?
Stanislav Hordiyenko commented
This would be really helpful if I can check that my refactoring didn't brake anything. I am doing it frequently as variables come and go, and I need always to work with them.
any update on this dry run feature.
"- Ability to preview the evaluated variables for an environment/step/machine/tenant combo"
I would love to see this available from the API. That would enable us to speed up our migration considerably. We have scripts to parse our existing configurations by env and add to octo api, but they dont have the ability to check env specific values across library sets.
"we are thinking of either creating a tool,"
I would expect to see this as a new command in octo.exe
Denis Pujdak commented
It will be helpful for me too. I'd like to see Deployment Preview before release within information which instances are included, their old versions and where they are going to be. Thanks.
Nithin Shenoy commented
A Dry Run or Preview mode would be fantastic. Based on this (http://help.octopusdeploy.com/discussions/questions/7680-previewing-transforms-and-substitution) discussion, I created a powershell script that uses the output of a "Drop Target" to make the transformations. See https://repne.wordpress.com/2016/06/10/previewing-octopus-web-config-transforms-via-offline-package-drops/ for the complete steps. It's hacky, but works. Something native in Octopus itself would be much more preferable.
Tim Thompson commented
We have a large percentage of 'first' deploys to an environment fail purely due to the mental tax of trying to project the current variable configuration into it's final deployed state. An ability to 'dry run' and eyeball the resulting config files would almost entirely eliminate the need for our current practice of deploying to an environment _before_ it's required simply to confirm config values are correct.
This is a good idea, since we've had a situation where a deployment failed due to incorrect variable scoping which took us several days to find (needing Octupus Support). The fact that one of the key variables was undefined was not clear in the deployment log (even with octopus debug variables set).
Tim Gebhardt commented
Yeah or if there was a view that allowed you to see that variables in use by other environments are "missing" from this environment and have been used, or something like that.
David Keaveny commented
This suggestion definitely gets my vote. Especially when deploying to a new machine for the first time, there's too much an element of crossing fingers and hoping that you didn't forget one variable setting out of several hundred.
Just being able to say something like "Do a dry run of project X deployed to environment Y", and having Octopus then describe each step, and particular what the variables will be, would save so many fails-so-update-variables-and-try-again scenarios.
Really, really need this feature. Have been bitten a few times on releases to production because that is the first time you actually see what variables are replaced on each machine. No number of beta deployments can give you confidence that your Production variables are correct! I actually need to see variable setting by Environment, Machine Role, and Machine. Or at least the option to choose that level of detail and review variables that apply for that scope.
David Peden commented
I came here from http://help.octopusdeploy.com/discussions/questions/3312-test-variable-substitution-in-config-files and am following Vanessa's suggestion to comment here. Technically, I think these should be two different requests as one seems way simpler than the other.
What I really want is "Preview Transforms and Substitutions" more so than a dry run. Having to go through the whole build process to view the output is painful. Thanks!
Robin M commented
I get a lot of value from the whatif feature in msdeploy which gives information about where the deployment is going and what's being changed in IIS and on the filesystem. Looking to switch to Octopus so a 'dry run' feature would be welcome.
Anders Truelsen commented
Show variables in the Release dialog does not evaluate the variables to their actual values.
Eg. if one variable uses one or more variables to produce its value the final value is not shown.
This would make up for not having "dry run".
Adam Bezverkov commented
If all this feature did was show the evaluated variables, transforms, and variable substitutions it would still be immensely helpful!
This would be an extremely valuable functionality as a growing number of variables and incresed complexity due to transformations and combinations of input, results in a lot of calculated variables.
It will take hours to find out if we have configured correctly for all environments, but Octopus will be able to evaluate them in seconds.