How to change a tfs build variable in script

2019-07-22 05:03发布

I'm using TFS2015 update 1. I want to pass information from one build step to the next, how is this possible?

That seems like a very simple task, but I can't figure out how that's suppose to work. Passing a variable to a build step is easy, but passing information from one step to the next seems to be impossible. I hope I'm wrong.

标签: tfs tfs2015
1条回答
冷血范
2楼-- · 2019-07-22 05:23

You can call the task.setvariable Logging Command, which sets a variable in the variable service of taskcontext. The first task can set a variable, and following tasks are able to use the variable. The variable is exposed to the following tasks as an environment variable. Example:

##vso[task.setvariable variable=testvar;]testvalue
查看更多
登录 后发表回答