Val
Val

Reputation: 123

How can I output the replacetokens in a YAML pipeline with Azure DevOps?

I'm using the task 'replacetokens@4' and it says 'replaced 6 tokens out of 6 tokens in 1 file', but I want to view the output of the replacetokens. How can I do this?

Upvotes: 1

Views: 715

Answers (1)

Kevin Lu-MSFT
Kevin Lu-MSFT

Reputation: 35504

I want to view the output of the replacetokens. How can I do this?

Agree with Daniel. You can run the script to output the file content to pipeline log.

Here is a PowerShell script example:

steps:
- powershell: 'Get-Content -Path filepath/filename'
  displayName: 'PowerShell Script'

In addition, you can use Publish Pipeline Artifacts task to publish the target file to Pipeline artifacts.

Then you can download the file in Pipeline artifacts and check the content.

enter image description here

Upvotes: 2

Related Questions