In the "Set a multi-job output variable" section above, this definitely works across jobs within the same Stage, but there's no documentation about whether or not this can be used across jobs within different stages. Can you confirm one way or another, and also clarify within the documentation?
⚠Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.
I'm using a setvariable task to set a variable. I now need to set this variable in EACH job. I too would like to be able to do this ONCE, and use the set variables across jobs in multiple stages. The only way I can think of how to do that, is to create a stage with once job that sets the variable, and save this variable. But then I need some way to access this variable across stages.
FYI: that features is being worked on. The workaround for now is to persist the variable in an artifact.
Right now, you cannot have multi-job output variables that work across stages. Updating docs to clarify.
Most helpful comment
FYI: that features is being worked on. The workaround for now is to persist the variable in an artifact.