 <p>You can call the <a href="https://github.com/Microsoft/vso-agent-tasks/blob/master/docs/authoring/commands.md" rel="nofollow">task.servariable Logging Command</a>, 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: </p> <pre><code>##vso[task.setvariable variable=testvar;]testvalue </code></pre>