0

I am using the AzureRMWebAppDeployment@4 task to deploy a logic app using an Azure Devops yaml pipeline. I want to update values in both the host.json and appsettings.json files using json variable substitution.

According to the documentation, the JSONFiles parameter can accept "a newline-separated list of json files to substitute the variable values". How can I specify that?

I have tried the following:

            - task: AzureRMWebAppDeployment@4
              inputs:
                ...
                JSONFiles: '**/parameters.json
                  **/host.json'

and also the following:

                JSONFiles: '**/parameters.json|**/host.json'

There must be something simple I'm missing. How do I specify a pattern which matches two or more files by name?

Batperson
  • 145
  • 2
  • 7

1 Answers1

1

Using | should work. From this answer:

The pipe symbol at the end of a line in YAML signifies that any indented text that follows should be interpreted as a multi-line scalar value. See the YAML spec.

So in you case it should be something like that:

- task: AzureRmWebAppDeployment@4
  inputs:
    ...
    JSONFiles: |
     **/parameters.json
     **/host.json
Thomas
  • 24,234
  • 6
  • 81
  • 125