Rewriting YAML file configuration during runtime in build pipeline using Powershell

346 views Asked by At

I have a task where in I need update the configuration in the YAML file's during build pipeline. I noticed that there is a task which does this, but cant be added in the organization and also I need to update the configuration for at-least 10 yaml files.

https://marketplace.visualstudio.com/items?itemName=jakkaj.vsts-yaml-writer&targetId=7e7d63c7-ba47-433d-affd-94b30e159ada

Can anyone guide me on this on how to achieve this ?

1

There are 1 answers

0
Jane Ma-MSFT On

Here are two alternative methods:

  1. Use the Command Line task to run git command to update your yaml files.

  2. Use the Manual Validation task to pause the run and pop up an option box with "Resume" and "Reject", then you will recieve a notification(optional). You can update your YAML files during this time. When your work is done, click the button to resume the run.

    enter image description here

    enter image description here