Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Michaël Vanbrabandt 849 posts 3292 karma points c-trib
    Oct 25, 2018 @ 12:03
    Michaël Vanbrabandt
    0

    usyncbackoffice config transform during release pipeline

    Hi Kevin,

    working with usync for the first time here with the following setup:

    1. Laptop development environment
    2. VPS staging enviroment
    3. VPS production environment

    Each environment has its own database so first installed Umbraco nuget package in VS without running the installation process and deployed it to staging and production.

    Then we have run the installer local on laptop, on staging server and on production server.

    So each environment is completely seperated.

    I have installed uSync local and disabled import but in the release pipeline to staging and production this should be set to true.

    I am using VSTS Devops for CI/CD so was wondering if we can transform the usyncbackoffice.config just like a web config using:

    https://docs.microsoft.com/en-us/azure/devops/pipelines/tasks/transforms-variable-substitution?view=vsts

    or will this fail and should we do it in another way or do we have to set this to false always and run the import manual on each environment?

    /Michaël

  • Dave Woestenborghs 3198 posts 10621 karma points MVP 4x admin c-trib
    Oct 25, 2018 @ 12:08
    Dave Woestenborghs
    100

    We use SlowCheetah plugin file for having config transforms on other files than web.config

    Dave

  • Michaël Vanbrabandt 849 posts 3292 karma points c-trib
    Oct 25, 2018 @ 12:22
    Michaël Vanbrabandt
    0

    Dave,

    thanks will have a look at it!

    /Michaël

  • Michaël Vanbrabandt 849 posts 3292 karma points c-trib
    Oct 28, 2018 @ 09:47
    Michaël Vanbrabandt
    0

    Worked perfectly Dave! Thx!

    /Michaël

  • Kevin Jump 1423 posts 9135 karma points MVP 3x c-trib
    Oct 25, 2018 @ 12:48
    Kevin Jump
    3

    there are a couple of things you can transform directly in the web.conifg (and they over take the settings in the file)

    <add key="uSync.Import" value="true|false" />
    <add key="uSync.ExportAtStartup" value="true|false" />
    <add key="uSync.ExportOnSave" value="true|false" />
    <add key="uSync.HandlerGroup" value="[groupname]" />
    

    will override the settings in the uSyncBackoffice.config file.

    but personally on VSTS i use parameters.xml

    https://docs.microsoft.com/en-us/aspnet/web-forms/overview/deployment/web-deployment-in-the-enterprise/configuring-parameters-for-web-package-deployment

    which looks something like this :

      <parameter name="uSync.HandlerGroup"
                 description="Handler Group for uSync"
                 defaultValue="#{uSync.HandlerGroup}#"
                 tags ="">
    
        <parameterEntry
            kind="XmlFile"
            scope="uSyncBackOffice\.config$"
            match="/uSyncBackOfficeSettings/HandlerGroup/text()" />   
      </parameter>
    

    and when setup will replace the value from the VSTS Variables (in this case uSync.HandlerGroup)

Please Sign in or register to post replies

Write your reply to:

Draft