question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Output variables in downstream job don't exist

See original GitHub issue

Agent 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:

  1. JobA - Hosted VS2017
  • PowerShell Task
    • inline script Write-Host "##vso[task.setvariable variable=ChangeFilePath2;isOutput=true]C:\Test"
    • Output Variables - Reference Name PS1Output
  • PowerShell Task
    • inline script Write-Host "This works: $(PS1Output.ChangeFilePath2)"
  1. JobB - Hosted VS2017
  • PowerShell Task
    • inline script Write-Host "This doesn't work $(JobA.PS1Output.ChangeFilePath2)"

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:closed
  • Created 5 years ago
  • Comments:26 (12 by maintainers)

github_iconTop GitHub Comments

7reactions
vtbassmattcommented, Jan 2, 2019

We don’t expect to bring this feature to the designer environments. We’re working on making YAML fully capable to support release pipelines.

1reaction
vtbassmattcommented, Nov 29, 2018

Designer pipelines don’t support passing variables from a task in one job to another job. YAML pipelines do support this.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found