@Bright Ran
I hope you're still around, cus I cannot for the life of me get variable replacement to work with my .json file:
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"MailerLogging": {
"Verbose": false
},
"MailerSettings": {
"Name": "",
"Port": "",
"KeyVaultName": "",
"AppID": "",
"TenantID": "",
"ClientSecret": ""
},
"AllowedHosts": "*"
}
My variables:
variables:
MailerSettings.0.Name: '${{ parameters.customer }}'
MailerSettings.0.Port: '3525'
MailerSettings.0.KeyVaultName: 'KV-Mailer'
MailerSettings.0.AppID: '${{ parameters.customer }}-AppID'
MailerSettings.0.TenantID: '${{ parameters.customer }}-TenantID'
MailerSettings.0.ClientSecret: '${{ parameters.customer }}-ClientSecret'
My filetransform@2 task:
- task: FileTransform@2
displayName: 'File Transform for Mailer'
inputs:
folderPath: '$(Pipeline.Workspace)/${{ parameters.repo }}_${{ parameters.customer }}_preConfig'
fileType: 'json'
targetFiles: '**/appsettings.json'
enableJsonFileTransformation: true
I've tried (i feel like) all the different formats of variables I could find online and by asking copilot in vscode. Nothing works, all I get is "##[warning]Unable to apply transformation for the given package - Changes are already present in the package."
I have confirmed that the paths are right and that the .json is present. I hope someone sees this and can assist me with what I' am doing wrong.