Output variables in downstream job don't exist
See original GitHub issueAgent Version and Platform
Version of your agent? Hosted VS2017 - Agent version 2.140.0
OS of the machine running the agent? Windows
VSTS Type and Version
VSTS
If VisualStudio.com, what is your account name? https://readify.visualstudio.com
What’s not working?
In the guide Output Variables under Examples it describes using a tasks output variables in a downstream job such as from Job_2 using $(Job_1.TaskA_1.AuthToken)
. In another task of the same job, this works (without using the Job_1 prefix) but doesn’t in a separate job.
Setup:
- JobA - Hosted VS2017
- PowerShell Task
- inline script
Write-Host "##vso[task.setvariable variable=ChangeFilePath2;isOutput=true]C:\Test"
- Output Variables - Reference Name
PS1Output
- inline script
- PowerShell Task
- inline script
Write-Host "This works: $(PS1Output.ChangeFilePath2)"
- inline script
- JobB - Hosted VS2017
- PowerShell Task
- inline script
Write-Host "This doesn't work $(JobA.PS1Output.ChangeFilePath2)"
- inline script
Agent and Worker’s Diagnostic Logs
JobA.PS1Output.ChangeFilePath2 : The term 'JobA.PS1Output.ChangeFilePath2' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
Issue Analytics
- State:
- Created 5 years ago
- Comments:26 (12 by maintainers)
Top Results From Across the Web
Return parameters/results from a job(triggered by pipeline ...
The return from a build step is a RunWrapper, it does not seem to have a way to return a custom result that...
Read more >Trigger downstream pipeline job via generated variable in ...
The pipeline job isn't receiving the value, just the actual string $GIT_AUTHOR . If I check the parameters page for the triggered pipeline...
Read more >Set variables in scripts - Azure Pipelines
Output variables set with isoutput aren't available in the same job and instead are only available in downstream jobs. Depending on what ...
Read more >Passing variables to downstream pipelines (&4529) · Epics
Summary I want to summarize the problem of passing variables to downstream pipelines in this epic. There are now 4 issues...
Read more >Ask the Expert: Azure DevOps: working with output variables
Microsoft MVP Adam Bertram explains how to create Azure output variables and how to reference them across jobs, stages and even entire pipelines....
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
We don’t expect to bring this feature to the designer environments. We’re working on making YAML fully capable to support release pipelines.
Designer pipelines don’t support passing variables from a task in one job to another job. YAML pipelines do support this.