Open a browser and navigate to your Azure DevOps Server / TFS (for example: http://SERVER_NAME:8080/tfs/DefaultCollection).
Create a new project or open an existing one. Make sure your project has a valid repository.
Download the TFS Agent (If you haven't already). To download the Agent, do the following:
Go to your project settings and select Agent Queues.
Click Download agent and follow the instructions for setting up and running the Agent.
You should have an agent running at this step.
Go to Build and Release.
Click on New definition or select an existing definition.
For a new definition, select a relevant source, click Continue, then create an Empty process.
Go to your Tasks.
Add a new Task:
Search for Command Line.
Click on Add next to the task.
Click on the task in the left section, and enter Run curl jar in the Display name field.
Enter curl in the Tool field.
NOTICE ON CURL USAGE: For performance reasons, it is advised to use the curl command only once a week to download the latest version of the Unified Agent and not as part of every build. You can do this using a scheduler task, such as cron.
Enter -LJO https://github.com/Mend/unified-agent-distribution/releases/latest/download/wss-unified-agent.jar in the Arguments field.
Copy the above task by right-clicking it, then click Clone task(s).
Click the task in the left section, and enter Run Unified Agent in the Display name field.
Enter java in the Tool field.
Enter -jar wss-unified-agent.jar in the Arguments field.
Add the following variables to your Variables: WS_APIKEY: <your-api-key>