---
title: "Comment by Maikel on \"Passing variables between jobs for Azure DevOps pipelines\" | Hashnode"
description: "Like lavoizer mentioned, the example does not work. Fixed it for you: variables: someName: someValue stages: - stage: stage_deploy displayName: Production jobs:"
url: "https://hashnode.com/posts/passing-variables-between-jobs-for-azure-devops-pipelines/619d36f406cdc0324d91504b/comment/61b221c01907c16be2ee094f"
---

[Discussion](https://hashnode.com/posts/passing-variables-between-jobs-for-azure-devops-pipelines/619d36f406cdc0324d91504b)

Comment [Passing variables between jobs for Azure DevOps pipelines](https://hashnode.com/posts/passing-variables-between-jobs-for-azure-devops-pipelines/619d36f406cdc0324d91504b)

[Maikel](https://hashnode.com/@maikel2)

[Dec 9, 2021](https://hashnode.com/posts/passing-variables-between-jobs-for-azure-devops-pipelines/619d36f406cdc0324d91504b/comment/61b221c01907c16be2ee094f)

Like [lavoizer](https://hashnode.com/@lavoizer) mentioned, the example does not work.

Fixed it for you:

```
variables:
  someName: someValue

stages:
- stage: stage_deploy
  displayName: Production
  jobs:
  - job: job_deploy_infrastructure
    displayName: Deploy Some Infrastructure
    steps:
    - bash: |
        SOMEVALUE="bleh"
        echo "##vso[task.setvariable variable=someName;isOutput=true;]$SOMEVALUE"
        echo "variable value is $(someName)"
      name: setVariable
  - job: job_deploy_code
    displayName: Deploy Some Code
    dependsOn: ['job_deploy_infrastructure']
    variables:
      someName: $[ dependencies.job_deploy_infrastructure.outputs['setVariable.someName'] ]
    steps:
    - bash: |
        echo "the variable value is $(someName)"
```

[Facundo Gauna](https://hashnode.com/@gaunacode)

[Dec 14, 2021](https://hashnode.com/posts/passing-variables-between-jobs-for-azure-devops-pipelines/619d36f406cdc0324d91504b/comment/61b221c01907c16be2ee094f#reply-61b7fd76d2a5c9036e6f012d)

Thanks for putting the time into this!

[Facundo Gauna](https://hashnode.com/@gaunacode)

[Dec 22, 2021](https://hashnode.com/posts/passing-variables-between-jobs-for-azure-devops-pipelines/619d36f406cdc0324d91504b/comment/61b221c01907c16be2ee094f#reply-61c3a1dfc0206b3f41f54c69)

Updated the blog post.

[Alessandro Surace](https://hashnode.com/@zioalex)

[Jun 9, 2022](https://hashnode.com/posts/passing-variables-between-jobs-for-azure-devops-pipelines/619d36f406cdc0324d91504b/comment/61b221c01907c16be2ee094f#reply-62a218706cc4647a1b005043)

[Facundo Gauna](https://hashnode.com/@gaunacode) nope! I do not see the update.
