Farmijo
Farmijo

Reputation: 245

How to setup a output variable on AzureDevOps from a npm task to pass it to other tasks?

Currently I'm executing a node.js task on a deploy pipeline on AzureDevops. The node task, internally, generates some data that would be helpful if could be able to output from the node task to a Pipeline variable, in order to use it on other tasks after the node.js task finishes.

Exists a way to do this?

Upvotes: 3

Views: 1161

Answers (1)

4c74356b41
4c74356b41

Reputation: 72201

if its a string you can just print to stdout:

##vso[task.setvariable variable=variableName]variable_content

and then you can reuse it later in the pipeline with:

$(variableName)

Upvotes: 4

Related Questions