title: Passing variable to non-dependent jobs in Azure DevOps Yaml Pipelines
body: <p>I am trying to pass a variable from one job to multiple non-dependent jobs. It works for dependent jobs. However it is not working for non-dependent jobs. I have yaml pipeline defined like this.</p>
  <pre><code>jobs:
      - job: JobA
        steps: 
        - task: Bash@3
          name: var_test       
          inputs:
            targetType: 'inline'
            script: |           
              myVar=demo-value    
              echo &quot;##vso[task.setvariable variable=myVarNew;isOutput=true]$myVar&quot;              
      - job: JobB          
        dependsOn: JobA          
        variables:
          - name: newVar2
            value: $[ dependencies.JobA.outputs['var_test.myVarNew'] ]
        steps:   
      - task: Bash@3         
          inputs:
            targetType: 'inline'
            script: |            
              echo &quot;$(newVar2)&quot;
      - job: JobC          
        dependsOn: JobB
        variables:
          - name: newVar2
            value: $[ dependencies.JobA.outputs['var_test.myVarNew'] ]
        steps:     
        - task: Bash@3         
          inputs:
            targetType: 'inline'
            script: |
              echo &quot;$(newVar2)&quot;
  </code></pre>
  <p>It works fine in JobB. But when I tried it in different downstream job like jobC it doesn't work. Also I can't set the variable in every job as manual validation agentless job is also there in between. I want to use same variable in different non dependent jobs within same stage. Please help. Thanks.</p>