qetza / vsts-replacetokens-task

[ARCHIVED] Visual Studio Team Services Build and Release extension that replace tokens in files with variable values.. Project moved to https://github.com/qetza/replacetokens-task
MIT License
164 stars 56 forks source link

`noescape` not working with inline variables? #276

Closed celluj34 closed 2 years ago

celluj34 commented 2 years ago

Hello! I'm having an issue populating a file and I'm not sure where the disconnect is. Here's what I'm trying to do:

  1. Provide inlineVariables that are provided as template parameters
  2. Use noescape to avoid converting the JSON to string in the file.
  3. Replace a token with a JSON object to be used in a different process

However, in the final JSON output, the values are empty, like so:

    "addinAppSettings": {
      "value": 
    },

Here's my template:

  - task: replacetokens@5
    displayName: 'Transform *.parameters.json'
    inputs:
      rootDirectory: '$(unzippedAssetPath)'
      targetFiles: '*.parameters.json'
      encoding: 'auto'
      tokenPattern: 'custom'
      tokenPrefix: '['
      tokenSuffix: ']'
      writeBOM: false
      escapeType: 'json'
      actionOnMissing: 'continue'
      keepToken: false
      actionOnNoFiles: 'fail'
      enableTransforms: true
      transformPrefix: '('
      transformSuffix: ')'
      inlineVariables: |
        api_app_settings: ${{ convertToJson(parameters.apiAppSettings) }}
        addin_app_settings: ${{ convertToJson(parameters.addinAppSettings) }}
        azure_locations: ${{ convertToJson(parameters.azureLocations) }}
      enableRecursion: false
      useLegacyPattern: false
      useLegacyEmptyFeature: false
      enableTelemetry: true

And my JSON file:

{
  "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "appShortName": {
      "value": "[app_short_name]"
    },
    "environment": {
      "value": "[environment_lowercase]"
    },
    "appServicePlanSkuName": {
      "value": "[azure_app_service_plan_sku_name]"
    },
    "containerRegistryResourceGroup": {
      "value": "[azure_container_registry_resource_group]"
    },
    "containerRegistryName": {
      "value": "[azure_container_registry_name]"
    },
    "apiAppSettings": {
      "value": [noescape(api_app_settings)]
    },
    "addinAppSettings": {
      "value": [noescape(addin_app_settings)]
    },
    "buildNumber": {
      "value": "[BUILD_BUILDNUMBER]"
    }
  }
}

Logs (actual values removed for security):

2022-08-17T18:14:52.3320025Z ##[debug]Evaluating condition for step: 'Transform *.parameters.json'
2022-08-17T18:14:52.3321561Z ##[debug]Evaluating: SucceededNode()
2022-08-17T18:14:52.3321883Z ##[debug]Evaluating SucceededNode:
2022-08-17T18:14:52.3322431Z ##[debug]=> True
2022-08-17T18:14:52.3322895Z ##[debug]Result: True
2022-08-17T18:14:52.3323338Z ##[section]Starting: Transform *.parameters.json
2022-08-17T18:14:52.3513890Z ==============================================================================
2022-08-17T18:14:52.3514166Z Task         : Replace Tokens
2022-08-17T18:14:52.3514336Z Description  : Replace tokens in files
2022-08-17T18:14:52.3514530Z Version      : 5.1.0
2022-08-17T18:14:52.3514676Z Author       : Guillaume Rouchon
2022-08-17T18:14:52.3516042Z Help         : [Learn more about this task](https://github.com/qetza/vsts-replacetokens-task/blob/master/ReplaceTokens/ReplaceTokensV4/README.md) (v5.1.0)
2022-08-17T18:14:52.3516619Z ==============================================================================
2022-08-17T18:14:52.3634865Z ##[debug]Using node path: E:\agent_devops-2\externals\node10\bin\node.exe
2022-08-17T18:14:52.5748887Z ##[debug]agent.TempDirectory=E:\agent_devops-2\_work\_temp
2022-08-17T18:14:52.5765427Z ##[debug]loading inputs and endpoints
2022-08-17T18:14:52.5786193Z ##[debug]loading ENDPOINT_AUTH_PARAMETER_SYSTEMVSSCONNECTION_ACCESSTOKEN
2022-08-17T18:14:52.5801186Z ##[debug]loading ENDPOINT_AUTH_SCHEME_SYSTEMVSSCONNECTION
2022-08-17T18:14:52.5804594Z ##[debug]loading ENDPOINT_AUTH_SYSTEMVSSCONNECTION
2022-08-17T18:14:52.5807614Z ##[debug]loading INPUT_ACTIONONMISSING
2022-08-17T18:14:52.5809946Z ##[debug]loading INPUT_ACTIONONNOFILES
2022-08-17T18:14:52.5812332Z ##[debug]loading INPUT_EMPTYVALUE
2022-08-17T18:14:52.5814639Z ##[debug]loading INPUT_ENABLERECURSION
2022-08-17T18:14:52.5817071Z ##[debug]loading INPUT_ENABLETELEMETRY
2022-08-17T18:14:52.5819372Z ##[debug]loading INPUT_ENABLETRANSFORMS
2022-08-17T18:14:52.5821584Z ##[debug]loading INPUT_ENCODING
2022-08-17T18:14:52.5823902Z ##[debug]loading INPUT_ESCAPETYPE
2022-08-17T18:14:52.5826344Z ##[debug]loading INPUT_INLINEVARIABLES
2022-08-17T18:14:52.5828758Z ##[debug]loading INPUT_KEEPTOKEN
2022-08-17T18:14:52.5831013Z ##[debug]loading INPUT_ROOTDIRECTORY
2022-08-17T18:14:52.5833204Z ##[debug]loading INPUT_TARGETFILES
2022-08-17T18:14:52.5835437Z ##[debug]loading INPUT_TOKENPATTERN
2022-08-17T18:14:52.5837819Z ##[debug]loading INPUT_TOKENPREFIX
2022-08-17T18:14:52.5840092Z ##[debug]loading INPUT_TOKENSUFFIX
2022-08-17T18:14:52.5842247Z ##[debug]loading INPUT_TRANSFORMPREFIX
2022-08-17T18:14:52.5844530Z ##[debug]loading INPUT_TRANSFORMSUFFIX
2022-08-17T18:14:52.5847531Z ##[debug]loading INPUT_USEDEFAULTVALUE
2022-08-17T18:14:52.5849319Z ##[debug]loading INPUT_USELEGACYEMPTYFEATURE
2022-08-17T18:14:52.5851471Z ##[debug]loading INPUT_USELEGACYPATTERN
2022-08-17T18:14:52.5853754Z ##[debug]loading INPUT_VARIABLESEPARATOR
2022-08-17T18:14:52.5855977Z ##[debug]loading INPUT_VERBOSITY
2022-08-17T18:14:52.5858249Z ##[debug]loading INPUT_WRITEBOM
2022-08-17T18:14:52.5863448Z ##[debug]loading SECRET_SYSTEM_ACCESSTOKEN
2022-08-17T18:14:52.5869267Z ##[debug]loaded 27
2022-08-17T18:14:52.5883598Z ##[debug]Agent.ProxyUrl=undefined
2022-08-17T18:14:52.5884197Z ##[debug]Agent.CAInfo=undefined
2022-08-17T18:14:52.5884880Z ##[debug]Agent.ClientCert=undefined
2022-08-17T18:14:52.5885648Z ##[debug]Agent.SkipCertValidation=undefined
2022-08-17T18:14:52.7124541Z ##[debug]Agent.ProxyUrl=undefined
2022-08-17T18:14:52.7126562Z ##[debug]System.ServerType=Hosted
2022-08-17T18:14:52.7152294Z ##[debug]enableTelemetry=true
2022-08-17T18:14:52.7207938Z ##[debug]REPLACETOKENS_DISABLE_TELEMETRY=undefined
2022-08-17T18:14:52.7230243Z ##[debug]system.collectionid=82defea3-5d82-42fb-9c0b-44bdcb7b5123
2022-08-17T18:14:52.7233900Z ##[debug]system.teamprojectid=b2f4d687-bc1d-4ec6-86ce-461aff37bef9
2022-08-17T18:14:52.7234947Z ##[debug]system.definitionid=365
2022-08-17T18:14:52.7235829Z ##[debug]release.releaseid=undefined
2022-08-17T18:14:52.7238547Z ##[debug]rootDirectory=E:\agent_devops-2\_work\159\unzipped
2022-08-17T18:14:52.7239365Z ##[debug]check path : E:\agent_devops-2\_work\159\unzipped
2022-08-17T18:14:52.7240214Z ##[debug]tokenPattern=custom
2022-08-17T18:14:52.7240964Z ##[debug]tokenPrefix=[
2022-08-17T18:14:52.7242079Z ##[debug]tokenSuffix=]
2022-08-17T18:14:52.7242716Z ##[debug]useLegacyPattern=false
2022-08-17T18:14:52.7243392Z ##[debug]encoding=auto
2022-08-17T18:14:52.7244058Z ##[debug]keepToken=false
2022-08-17T18:14:52.7244663Z ##[debug]actionOnMissing=continue
2022-08-17T18:14:52.7245279Z ##[debug]writeBOM=false
2022-08-17T18:14:52.7245994Z ##[debug]emptyValue=(empty)
2022-08-17T18:14:52.7246606Z ##[debug]escapeType=json
2022-08-17T18:14:52.7247222Z ##[debug]escapeChar=undefined
2022-08-17T18:14:52.7247877Z ##[debug]defaultValue=undefined
2022-08-17T18:14:52.7248592Z ##[debug]charsToEscape=undefined
2022-08-17T18:14:52.7249211Z ##[debug]verbosity=normal
2022-08-17T18:14:52.7249813Z ##[debug]enableTransforms=true
2022-08-17T18:14:52.7250485Z ##[debug]enableRecursion=false
2022-08-17T18:14:52.7251243Z ##[debug]useLegacyEmptyFeature=false
2022-08-17T18:14:52.7252238Z ##[debug]useDefaultValue=false
2022-08-17T18:14:52.7253070Z ##[debug]transformPrefix=(
2022-08-17T18:14:52.7254001Z ##[debug]transformSuffix=)
2022-08-17T18:14:52.7254733Z ##[debug]actionOnNoFiles=fail
2022-08-17T18:14:52.7255409Z ##[debug]targetFiles=*.parameters.json
2022-08-17T18:14:52.7256032Z ##[debug]variableSeparator=.
2022-08-17T18:14:52.7257257Z ##[debug]variableFiles=undefined
2022-08-17T18:14:52.7260538Z ##[debug]inlineVariables=api_app_settings: {
  "appSettings": [
    {
      "name": "AzureAd__ClientId",
      "value": "***"
    },
    {
      "name": "AzureAd__Audience",
      "value": "***"
    },
    {
      "name": "ConnectionStrings__GMS",
      "value": "***"
    },
    {
      "name": "ConnectionStrings__MarketData",
      "value": "***"
    },
    {
      "name": "CronSettings__EnabledOverride",
      "value": "***"
    },
    {
      "name": "LoggingSettings__Afs__Url",
      "value": "***"
    },
    {
      "name": "APPINSIGHTS_APPVERSION",
      "value": "***"
    }
  ]
}
addin_app_settings: {
  "appSettings": [
    {
      "name": "MANIFEST_ID",
      "value": "***"
    },
    {
      "name": "MANIFEST_AD_CLIENT_ID",
      "value": "***"
    },
    {
      "name": "MANIFEST_VERSION",
      "value": "***"
    },
    {
      "name": "MANIFEST_ADDIN_DISPLAYNAME",
      "value": "***"
    },
    {
      "name": "MANIFEST_ADDIN_URL",
      "value": "***"
    },
    {
      "name": "MANIFEST_API_URL",
      "value": "***"
    },
    {
      "name": "MANIFEST_NAMESPACE",
      "value": "***"
    }
  ]
}
azure_locations: [
  {
    "name": "centralus",
    "abbreviation": "cus"
  },
  {
    "name": "eastus2",
    "abbreviation": "eus2"
  }
]
2022-08-17T18:14:52.7263575Z ##[group]loading inline variables:
2022-08-17T18:14:52.7264842Z ##[debug]  loaded variable: api_app_settings.appSettings.0.name
2022-08-17T18:14:52.7266505Z ##[debug]  loaded variable: api_app_settings.appSettings.0.value
2022-08-17T18:14:52.7267394Z ##[debug]  loaded variable: api_app_settings.appSettings.1.name
2022-08-17T18:14:52.7268119Z ##[debug]  loaded variable: api_app_settings.appSettings.1.value
2022-08-17T18:14:52.7269018Z ##[debug]  loaded variable: api_app_settings.appSettings.2.name
2022-08-17T18:14:52.7271142Z ##[debug]  loaded variable: api_app_settings.appSettings.2.value
2022-08-17T18:14:52.7272031Z ##[debug]  loaded variable: api_app_settings.appSettings.3.name
2022-08-17T18:14:52.7272947Z ##[debug]  loaded variable: api_app_settings.appSettings.3.value
2022-08-17T18:14:52.7273669Z ##[debug]  loaded variable: api_app_settings.appSettings.4.name
2022-08-17T18:14:52.7274501Z ##[debug]  loaded variable: api_app_settings.appSettings.4.value
2022-08-17T18:14:52.7275262Z ##[debug]  loaded variable: api_app_settings.appSettings.5.name
2022-08-17T18:14:52.7275981Z ##[debug]  loaded variable: api_app_settings.appSettings.5.value
2022-08-17T18:14:52.7276710Z ##[debug]  loaded variable: api_app_settings.appSettings.6.name
2022-08-17T18:14:52.7277549Z ##[debug]  loaded variable: api_app_settings.appSettings.6.value
2022-08-17T18:14:52.7278253Z ##[debug]  loaded variable: addin_app_settings.appSettings.0.name
2022-08-17T18:14:52.7279000Z ##[debug]  loaded variable: addin_app_settings.appSettings.0.value
2022-08-17T18:14:52.7279821Z ##[debug]  loaded variable: addin_app_settings.appSettings.1.name
2022-08-17T18:14:52.7280546Z ##[debug]  loaded variable: addin_app_settings.appSettings.1.value
2022-08-17T18:14:52.7281346Z ##[debug]  loaded variable: addin_app_settings.appSettings.2.name
2022-08-17T18:14:52.7282068Z ##[debug]  loaded variable: addin_app_settings.appSettings.2.value
2022-08-17T18:14:52.7282780Z ##[debug]  loaded variable: addin_app_settings.appSettings.3.name
2022-08-17T18:14:52.7283658Z ##[debug]  loaded variable: addin_app_settings.appSettings.3.value
2022-08-17T18:14:52.7284404Z ##[debug]  loaded variable: addin_app_settings.appSettings.4.name
2022-08-17T18:14:52.7285109Z ##[debug]  loaded variable: addin_app_settings.appSettings.4.value
2022-08-17T18:14:52.7285997Z ##[debug]  loaded variable: addin_app_settings.appSettings.5.name
2022-08-17T18:14:52.7287009Z ##[debug]  loaded variable: addin_app_settings.appSettings.5.value
2022-08-17T18:14:52.7287746Z ##[debug]  loaded variable: addin_app_settings.appSettings.6.name
2022-08-17T18:14:52.7288620Z ##[debug]  loaded variable: addin_app_settings.appSettings.6.value
2022-08-17T18:14:52.7289328Z ##[debug]  loaded variable: azure_locations.0.name
2022-08-17T18:14:52.7290039Z ##[debug]  loaded variable: azure_locations.0.abbreviation
2022-08-17T18:14:52.7290719Z ##[debug]  loaded variable: azure_locations.1.name
2022-08-17T18:14:52.7291441Z ##[debug]  loaded variable: azure_locations.1.abbreviation
2022-08-17T18:14:52.7291958Z   32 variable(s) loaded.
2022-08-17T18:14:52.7292297Z ##[endgroup]
2022-08-17T18:14:52.7292867Z ##[debug]pattern: \[\s*((?:(?!\[)(?!\s*\]).)*)\s*\]
2022-08-17T18:14:52.7293589Z ##[debug]transform pattern: \s*(.*)\(\s*((?:(?!\()(?!\s*\)).)*)\s*\)\s*
2022-08-17T18:14:52.7294333Z ##[debug]defaultRoot: 'E:\agent_devops-2\_work\159\unzipped'
2022-08-17T18:14:52.7295147Z ##[debug]findOptions.allowBrokenSymbolicLinks: 'false'
2022-08-17T18:14:52.7295840Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2022-08-17T18:14:52.7296598Z ##[debug]findOptions.followSymbolicLinks: 'true'
2022-08-17T18:14:52.7297260Z ##[debug]findOptions.skipMissingFiles: 'false'
2022-08-17T18:14:52.7297911Z ##[debug]matchOptions.debug: 'false'
2022-08-17T18:14:52.7298601Z ##[debug]matchOptions.nobrace: 'true'
2022-08-17T18:14:52.7299245Z ##[debug]matchOptions.noglobstar: 'false'
2022-08-17T18:14:52.7300098Z ##[debug]matchOptions.dot: 'true'
2022-08-17T18:14:52.7301118Z ##[debug]matchOptions.noext: 'false'
2022-08-17T18:14:52.7301995Z ##[debug]matchOptions.nocase: 'true'
2022-08-17T18:14:52.7302802Z ##[debug]matchOptions.nonull: 'false'
2022-08-17T18:14:52.7304438Z ##[debug]matchOptions.matchBase: 'false'
2022-08-17T18:14:52.7305110Z ##[debug]matchOptions.nocomment: 'false'
2022-08-17T18:14:52.7316390Z ##[debug]matchOptions.nonegate: 'false'
2022-08-17T18:14:52.7318171Z ##[debug]matchOptions.flipNegate: 'false'
2022-08-17T18:14:52.7318847Z ##[debug]pattern: '*.parameters.json'
2022-08-17T18:14:52.7319785Z ##[debug]findPath: 'E:\agent_devops-2\_work\159\unzipped'
2022-08-17T18:14:52.7320850Z ##[debug]statOnly: 'false'
2022-08-17T18:14:52.7321508Z ##[debug]findPath: 'E:\agent_devops-2\_work\159\unzipped'
2022-08-17T18:14:52.7322291Z ##[debug]findOptions.allowBrokenSymbolicLinks: 'false'
2022-08-17T18:14:52.7323030Z ##[debug]findOptions.followSpecifiedSymbolicLink: 'true'
2022-08-17T18:14:52.7323731Z ##[debug]findOptions.followSymbolicLinks: 'true'
2022-08-17T18:14:52.7324393Z ##[debug]findOptions.skipMissingFiles: 'false'
2022-08-17T18:14:52.7325154Z ##[debug]  E:\agent_devops-2\_work\159\unzipped (directory)
2022-08-17T18:14:52.7325876Z ##[debug]  E:\agent_devops-2\_work\159\unzipped\frontdoor.bicep (file)
2022-08-17T18:14:52.7326616Z ##[debug]  E:\agent_devops-2\_work\159\unzipped\frontdoor.parameters.json (file)
2022-08-17T18:14:52.7327380Z ##[debug]  E:\agent_devops-2\_work\159\unzipped\main.bicep (file)
2022-08-17T18:14:52.7328134Z ##[debug]  E:\agent_devops-2\_work\159\unzipped\main.parameters.json (file)
2022-08-17T18:14:52.7329122Z ##[debug]  E:\agent_devops-2\_work\159\unzipped\web-app.bicep (file)
2022-08-17T18:14:52.7329791Z ##[debug]6 results
2022-08-17T18:14:52.7330400Z ##[debug]found 6 paths
2022-08-17T18:14:52.7331249Z ##[debug]applying include pattern
2022-08-17T18:14:52.7332074Z ##[debug]adjustedPattern: 'E:\agent_devops-2\_work\159\unzipped\*.parameters.json'
2022-08-17T18:14:52.7332767Z ##[debug]2 matches
2022-08-17T18:14:52.7333451Z ##[debug]2 final results
2022-08-17T18:14:52.7334031Z ##[group]replacing tokens in: E:\agent_devops-2\_work\159\unzipped\frontdoor.parameters.json
2022-08-17T18:14:52.7334746Z ##[debug]  using encoding: ascii
2022-08-17T18:14:52.7509647Z ##[debug]app_short_name=gmx
2022-08-17T18:14:52.7510953Z ##[debug]  app_short_name: gmx
2022-08-17T18:14:52.7511941Z ##[debug]environment_lowercase=***
2022-08-17T18:14:52.7512687Z ##[debug]  environment_lowercase: ***
2022-08-17T18:14:52.7513314Z ##[debug]azure_locations=undefined
2022-08-17T18:14:52.7514004Z ##[debug]  variable not found: azure_locations
2022-08-17T18:14:52.7514677Z ##[debug]  azure_locations: 
2022-08-17T18:14:52.7521939Z   2 token(s) replaced out of 3 and running 1 transformation(s)
2022-08-17T18:14:52.7522279Z ##[endgroup]
2022-08-17T18:14:52.7523295Z ##[group]replacing tokens in: E:\agent_devops-2\_work\159\unzipped\main.parameters.json
2022-08-17T18:14:52.7526254Z ##[debug]  using encoding: ascii
2022-08-17T18:14:52.7529192Z ##[debug]app_short_name=gmx
2022-08-17T18:14:52.7529709Z ##[debug]  app_short_name: gmx
2022-08-17T18:14:52.7530296Z ##[debug]environment_lowercase=***
2022-08-17T18:14:52.7531273Z ##[debug]  environment_lowercase: ***
2022-08-17T18:14:52.7532172Z ##[debug]azure_app_service_plan_sku_name=S1
2022-08-17T18:14:52.7532929Z ##[debug]  azure_app_service_plan_sku_name: S1
2022-08-17T18:14:52.7533676Z ##[debug]azure_container_registry_resource_group=***
2022-08-17T18:14:52.7534451Z ##[debug]  azure_container_registry_resource_group: ***
2022-08-17T18:14:52.7535184Z ##[debug]azure_container_registry_name=***
2022-08-17T18:14:52.7535927Z ##[debug]  azure_container_registry_name: ***
2022-08-17T18:14:52.7536582Z ##[debug]api_app_settings=undefined
2022-08-17T18:14:52.7537226Z ##[debug]  variable not found: api_app_settings
2022-08-17T18:14:52.7537885Z ##[debug]  api_app_settings: 
2022-08-17T18:14:52.7538720Z ##[debug]addin_app_settings=undefined
2022-08-17T18:14:52.7539495Z ##[debug]  variable not found: addin_app_settings
2022-08-17T18:14:52.7540635Z ##[debug]  addin_app_settings: 
2022-08-17T18:14:52.7542121Z ##[debug]BUILD_BUILDNUMBER=***
2022-08-17T18:14:52.7543027Z ##[debug]  BUILD_BUILDNUMBER: ***
2022-08-17T18:14:52.7543594Z   6 token(s) replaced out of 8 and running 2 transformation(s)
2022-08-17T18:14:52.7543983Z ##[endgroup]
2022-08-17T18:14:52.7544521Z ##[debug]set tokenReplacedCount=8
2022-08-17T18:14:52.7547119Z ##[debug]Processed: ##vso[task.setvariable variable=tokenReplacedCount;isOutput=false;issecret=false;]8
2022-08-17T18:14:52.7549841Z ##[debug]set tokenFoundCount=11
2022-08-17T18:14:52.7551685Z ##[debug]Processed: ##vso[task.setvariable variable=tokenFoundCount;isOutput=false;issecret=false;]11
2022-08-17T18:14:52.7552871Z ##[debug]set fileProcessedCount=2
2022-08-17T18:14:52.7554166Z ##[debug]Processed: ##vso[task.setvariable variable=fileProcessedCount;isOutput=false;issecret=false;]2
2022-08-17T18:14:52.7555001Z ##[debug]set transformExecutedCount=3
2022-08-17T18:14:52.7556138Z ##[debug]Processed: ##vso[task.setvariable variable=transformExecutedCount;isOutput=false;issecret=false;]3
2022-08-17T18:14:52.7556899Z ##[debug]set defaultValueCount=0
2022-08-17T18:14:52.7558028Z ##[debug]Processed: ##vso[task.setvariable variable=defaultValueCount;isOutput=false;issecret=false;]0
2022-08-17T18:14:52.7558704Z replaced 8 tokens out of 11 and running 3 functions in 2 file(s) in 0.042 seconds.
2022-08-17T18:14:52.7800714Z ##[debug]sent usage telemetry: "{\"name\":\"Microsoft.ApplicationInsights.Dev.*****.Event\",\"time\":\"2022-08-17T18:14:52.752Z\",\"iKey\":\"*****\",\"tags\":{\"ai.application.ver\":\"5.1.0\",\"ai.cloud.role\":\"services\",\"ai.internal.sdkVersion\":\"replacetokens:1.0.0\",\"ai.operation.id\":\"758b8841540ae260de0e2ab08b16f788\",\"ai.operation.name\":\"replacetokens\",\"ai.operation.parentId\":\"|758b8841540ae260de0e2ab08b16f788\",\"ai.user.accountId\":\"a81bc939f2bdeb7a1b2f5fa14010d9ba81e20bfd99e4405b0a74dfd3fc2ae125\",\"ai.user.authUserId\":\"65e5d8e3747f913fcf3856580d095f0fd90f41af13e7a5c9bf0caf9140380e0f\"},\"data\":{\"baseType\":\"EventData\",\"baseData\":{\"ver\":\"2\",\"name\":\"token.replaced\",\"properties\":{\"preview\":false,\"pipelineType\":\"build\",\"result\":\"succeeded\",\"tokenPrefix\":\"[\",\"tokenSuffix\":\"]\",\"pattern\":\"\\\\[\\\\s*((?:(?!\\\\[)(?!\\\\s*\\\\]).)*)\\\\s*\\\\]\",\"encoding\":\"auto\",\"keepToken\":false,\"actionOnMissing\":\"continue\",\"writeBOM\":false,\"emptyValue\":\"(empty)\",\"escapeType\":\"json\",\"verbosity\":\"normal\",\"variableFiles\":0,\"variableSeparator\":\".\",\"rules\":1,\"rulesWithInputWildcard\":1,\"rulesWithOutputPattern\":0,\"rulesWithNegativePattern\":0,\"duration\":0.042,\"tokenReplaced\":8,\"tokenFound\":11,\"fileProcessed\":2,\"useLegacyPattern\":false,\"enableTransforms\":true,\"transformPrefix\":\"(\",\"transformSuffix\":\")\",\"transformPattern\":\"\\\\s*(.*)\\\\(\\\\s*((?:(?!\\\\()(?!\\\\s*\\\\)).)*)\\\\s*\\\\)\\\\s*\",\"transformExecuted\":3,\"defaultValue\":\"\",\"defaultValueReplaced\":0,\"tokenPattern\":\"custom\",\"actionOnNoFiles\":\"fail\",\"inlineVariables\":32,\"enableRecursion\":false,\"useLegacyEmptyFeature\":false,\"useDefaultValue\":false}}}}"
2022-08-17T18:14:52.9934846Z ##[section]Finishing: Transform *.parameters.json
celluj34 commented 2 years ago

Turns out I spoke too soon. In order to fix this, you have to put quotes around the parameters in the yaml task. In my case I used single quotes, and fixed the issue.