Tuesday 28 June 2016

Environment Variables & TFS 2015 Build/Release Agents

If you install additional software in build server, or in a target server setup as a release server with build/release agent TFS 2015, you might run into the same issues specified below, which can be solved very easily.

The requirement

Need to run python and sphinx to generate documentation in the build server with the project.

The Issue

2016-06-28T08:56:24.4848312Z ##[error]The system cannot find the file specified.
2016-06-28T08:56:24.5316991Z The 'sphinx-build' command was not found. Make sure you have Sphinx
2016-06-28T08:56:24.5316991Z installed, then set the SPHINXBUILD environment variable to point
2016-06-28T08:56:24.5316991Z to the full path of the 'sphinx-build' executable. Alternatively you
2016-06-28T08:56:24.5316991Z may add the Sphinx directory to PATH.
2016-06-28T08:56:24.5316991Z If you don't have Sphinx installed, grab it from
2016-06-28T08:56:24.5316991Z http://sphinx-doc.org/


Checked environment variables for the build agent user and all were fine. All required python environment variables were there.image

But when printed the path in the powershell script running the command to generate help, it seems environment variable path, were not having python paths.image

The fix

It is just need a restart to build agents to reload environment variables.image

This was an easy fix, but many times it can be missed, and would waste time investigating many other options.image

No comments:

Popular Posts