We have a project that can use two different versions of the certain DLL. We need this deployed in two different environments. Which version of the DLL is being used should depend on the environment.
One suggested solution is to copy the entire code-base and to create octopus deployment configurations based on those two code-bases.
I am strongly against this, but still don't have the solution to the problem.
I think that binary redirection won't work because I cannot specify the dll path in the config, and of course, I can't have those two files in the same directory.
Any ideas ?
To create an environment, in the Octopus Web Portal, navigate to Infrastructure ➜ Environments and click ADD ENVIRONMENT. Give your new environment a meaningful name, for instance, Test, and click SAVE.
Environments are how you organize your deployment targets (whether on-premises servers or cloud services) into groups that represent the different stages of your deployment pipeline, for instance, development, test, and production.
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.
It could be easily solved by powershell script, as an Octopus deploy step. For example, your project could have two files:
YourFile.dll
YourFile.v2.dll
Then your powershell script, post-step, (pseudocode) will look something similiar:
if($OctopusParameters["environment"] == "Dev") {
File.Delete("YourFile.dll");
File.Rename("YourFile.v2.dll", "YourFile.dll");
}
I agree though that this is quite unusual problem, and might indicate code smell.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With