Saturday, February 6, 2021

Sitecore 10 - (Sitecore + Octopus ) - How to configure the environment variable, site group setting.




I think this is very common requirement to configure the enviroment variable driven from the octopus, example below


We can configure this in the site gropu and based on sitecore serialization folder structure we will have the .yml file for the above settings as example below

the configuration (yml file) will look like this 


Now, Create a new step in octopus and replace this yml file (Substitute variable in Files) - You can define the wild card syntex like 

#{Path}\src\Project\abc\**\*.yml

Define the variable and value in octopus, in this example for "#{abc.hostname}" and that's it during the deploymnet based on target environment and variable value, Octopus will replace the file and upload into the sitecore, we can use the similar feature for other site settings like analytics key or any sft/ftp configuration etc.

No comments:

Post a Comment