Bandara
Bandara

Reputation: 800

How do you pass build result from one VSTS build task to another?

I have two build tasks in my VSTS extension (TaskA, TaskB), User will add the TaskA first and TaskB next in the build definition. I need to pass some information from TaskA to TaskB once taskA is complete. What should be the approach for this? Is this possible with vsts-node-api package? Please advice.

Thanks in advance.

Upvotes: 1

Views: 754

Answers (1)

starian chen-MSFT
starian chen-MSFT

Reputation: 33698

You can set a variable by using console.log("##vso[task.setvariable variable=testvar;]testvalue"), then the following tasks are able to use this variable.

Upvotes: 2

Related Questions