xmlazure-devopssitecoreconfigtds

Global TDS config change


We have a Sitecore based C# project setup in Azure DevOps. In the project there is a TdsGlobal.config file that date how far back to get the TDS changes. This should be dynamically changed during the deployment only to get the previous 3 weeks of TDS packages.

<IncludeItemsChangedAfter>2019-04-01</IncludeItemsChangedAfter>   

The above field in TdsGlobal.Config needs to be changed after each Production deployment. Any suggestions how to achieve to this!


Solution

  • Global TDS config change

    If you only update IncludeItemsChangedAfter field in TdsGlobal.Config during the Production deployment instead of updating this field in the repo, you could use the task Replace Tokens to update the key's values:

    <IncludeItemsChangedAfter>#{TDSChangesDate}#</IncludeItemsChangedAfter>   
    

    If you need to update the change in the repo, there are two ways to achieve this.

    One is using the REST API Pushes - Create to update the TdsGlobal.Config file:

    Check this thread for some more detailed steps.

    Another is use powershell scripts to update the file and git command line to submit the the change into the repo:

    Check this thread for some more details.

    Hope this helps.