Azure Dev ops replace tokens per environment in release pipeline

后端 未结 1 1370
难免孤独
难免孤独 2021-01-13 08:13

i am using the Replace token extension https://marketplace.visualstudio.com/items?itemName=qetza.replacetokens to replace variable in **/*.config files

Our build pi

1条回答
  •  迷失自我
    2021-01-13 08:25

    Release activities run on the release agent. You're running token replacement after the application is deployed to the app service, so the token replacement isn't getting deployed.

    That's one issue.

    Another issue is that web deploy packages are zip archives, so token replacement isn't going to affect the files contained in the zip file. You shouldn't use token replacement in conjunction with web deploy. You should use web deploy transforms (parameters.xml and SetParameters.xml), which are supported by the web deploy task that you're using. parameters.xml allows you to define xpath expressions for locating elements to transform, and the setparameters.xml files contain the values to use in the transformation.

    0 讨论(0)
提交回复
热议问题