Reputation: 1493
I have a custom config file, which contains parameters to replace at release time with Release Pipeline variables. The replacement of the value in the config file works. If the setParams.xml is bound then the file contains this value, if not then the default value from the parameters definition. My problem now is that I get only the raw value and not the resolved value from configured value in the pipeline.
parameters.xml
<parameters>
<parameter name="ParameterName" defaultValue="default" description="desc">
<parameterEntry kind="XmlFile" scope="file.config" match="/xpath/@expression" />
</parameter>
</parameters>
setParams.xml
(both notations don't work)
<parameters>
<setParameter name="ParameterName" value="$(Pipeline_Variable)" />
</parameters>
<parameters>
<setParameter name="ParameterName" value="__Pipeline_Variable__" />
</parameters>
What can I do to replace the parameter of Pipeline_Variable
with the configured value using parameters.xml and setParams.xml? I want to avoid to set each parameter in the Azure Tasks as additional console parameters.
Upvotes: 2
Views: 3691
Reputation: 40653
If you want to replace Pipeline_Variable
in file you should check token replace extension. You just need correctly format tokens in your file based on this what you set in task.
Upvotes: 3