<p>Not sure if this helps you? but if you edit it from the portal you can select the branch you are working on and there is a validate option
<a href="https://i.sstatic.net/ptJwL.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/ptJwL.png" alt="enter image description here" /></a></p>
<p>I also add a parameter to my pipelines,</p>
<pre><code> parameters:
  - name: DebugMode
    displayName: Skip Deployments and run in DebugMode
    type: string
    default: false
    values:
    - false
    - true
</code></pre>
<p>Which adds a radio button when you run the Pipeline
<a href="https://i.sstatic.net/TnAxV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/TnAxV.png" alt="enter image description here" /></a></p>
<p>and then I have a condition to skip the actual deployment task for the debug mode so I can test the logic of my pipelines running them from teh branch I am working on before PR the change in to main.</p>
<pre><code>         steps:
      - ${{ if eq(parameters.DebugMode, false) }}:
        - task: Deploy
          inputs:
            ....
      - ${{ if eq(parameters.DebugMode, true) }}:
        - task: PowerShell@2
          name: DummyDeployment
          displayName: 'Dummy Do Nothing'
          continueOnError: false
          inputs:
            targetType: Inline
            script: |
              echo &quot;In Debug mode running Dummy Deployment&quot;
              echo $buildNumber
</code></pre>

CC BY-SA 4.0
2022-09-20T15:08:08.433Z
2022-09-20T15:08:08.433Z
qBasicBoy
<p>I currently have a pipeline in Azure which consists of a bunch of YAML which eventually calls some terraform script to handle the deployment side.</p>
<p>What is the best way to handle dev testing of changes to the pipeline?</p>
<p>For example, i want to add a new task in the YAML. There doesnt seem to be a way to test this without actually performing and completing a pull request.
I the cases where i do something wrong and the pipeline (say an invalid parameter value) fails i need to do a whole new checkin, push, pull request, merge and then wait for the pipeline to complete or fail.</p>
<p>There has to be a better way?</p>

<terraform><git><azure><yaml><pipeline>
How to test pipeline changes in Azure?
CathalMF
# How to test pipeline changes in Azure?

(Asked by: username_0 on 2021-02-03)

I currently have a pipeline in Azure which consists of a bunch of YAML which eventually calls some terraform script to handle the deployment side.

What is the best way to handle dev testing of changes to the pipeline?

For example, i want to add a new task in the YAML. There doesnt seem to be a way to test this without actually performing and completing a pull request.
I the cases where i do something wrong and the pipeline (say an invalid parameter value) fails i need to do a whole new checkin, push, pull request, merge and then wait for the pipeline to complete or fail.

There has to be a better way?

**Tags:** terraform, git, azure, yaml, pipeline


---

## 1 answers

### Answer by username_1 on 2022-09-20. Score: 1

Not sure if this helps you? but if you edit it from the portal you can select the branch you are working on and there is a validate option

I also add a parameter to my pipelines,
 parameters:
  - name: DebugMode
    displayName: Skip Deployments and run in DebugMode
    type: string
    default: false
    values:
    - false
    - true

Which adds a radio button when you run the Pipeline

and then I have a condition to skip the actual deployment task for the debug mode so I can test the logic of my pipelines running them from teh branch I am working on before PR the change in to main.
         steps:
      - ${{ if eq(parameters.DebugMode, false) }}:
        - task: Deploy
          inputs:
            ....
      - ${{ if eq(parameters.DebugMode, true) }}:
        - task: PowerShell@2
          name: DummyDeployment
          displayName: 'Dummy Do Nothing'
          continueOnError: false
          inputs:
            targetType: Inline
            script: |
              echo "In Debug mode running Dummy Deployment"
              echo $buildNumber


---

