File transform task in azure devops release pipeline

Dinesh Prajapati 126 Reputation points
2024-07-11T04:16:36.4033333+00:00

Hi team,

I am trying to use file transform task in azure devops pipeline to replace the values in json file from the variable values defined in release pipeline (pipeline variable and variable sets). While using the task I am getting error as

2024-07-11T04:06:22.0643755Z ##[warning]Can't find loc string for key: Invalidwebapppackageorfolderpathprovided
2024-07-11T04:06:22.0657882Z ##[error]Error: Invalidwebapppackageorfolderpathprovided C:\agent\_work\r1\a\helm-chart\applicationservice\applicationservice\appsettings.config.json

The location is correct on the server. But still I am getting this error. There is no CI happening from azure, neither there is any artifact in azure. My location is

I am passing package/folder as "$(System.DefaultWorkingDirectory)/helm-chart/applicationservice/applicationservice/appsettings.config.json"

below is the yaml of the file transform task:

steps: - task: FileTransform@1 displayName: 'File Transform to replace variables'

inputs: folderPath: '"$(System.DefaultWorkingDirectory)/helm-chart/applicationservice/applicationservice/appsettings.config.json"'

fileType: json

targetFiles: '"$(System.DefaultWorkingDirectory)/helm-chart/applicationservice/applicationservice/appsettings.config.json"'

Not Monitored
Not Monitored
Tag not monitored by Microsoft.
39,861 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.