Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

Overview

This topic describes how to run the Unified Agent from within Microsoft Team Foundation Server 2018 or earlier.

Instructions on how to use the Azure DevOps Pipelines native integration can be found at Azure DevOps Pipelines Integration and instructions on how to run the Unified Agent directly from Azure DevOps Services can be found at Microsoft Azure DevOps Services (UA) Integration.

Prerequisites 

  1. Download and install Java JRE/JDK on the TFS Agent. See Unified Agent Prerequisites for supported Java versions.

  2. Set your JAVA_HOME system variable to the relevant Java version on the TFS Agent (see versions in the previous step).

  3. The relevant package manager must be installed. For details, see https://whitesource.atlassian.net/wiki/spaces/WD/pages/1140852201/Getting+Started+with+the+Unified+Agent#Prerequisites.

Unified Agent Configuration

The following integration uses environment variables to configure the Unified Agent in order to use the default configuration values.

For more information, see the following articles:

Getting Started with the Unified Agent

https://whitesource.atlassian.net/wiki/spaces/WD/pages/1544880156/Unified+Agent+Configuration+Parameters#Configuring-the-Unified-Agent-by-Environment-Variables

Integrating Microsoft Azure DevOps Server

...

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:

  1. Go to your project settings and select Agent Queues.

  2. Click Download agent and follow the instructions for setting up and running the Agent.

  3. You should have an agent running at this step.

...

Go to Build and Release.

...

Click on New definition or select an existing definition.

  1. For a new definition, select a relevant source, click Continue, then create an Empty process.

...

Go to your Tasks.

...

Add a new Task:

  1. Search for Command Line.

  2. Click on Add next to the task.

  3. Click on the task in the left section, and enter Run curl jar in the Display name field.

  4. 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.

  5. 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).

  1. Click the task in the left section, and enter Run Unified Agent in the Display name field.

  2. Enter java in the Tool field.

  3. Enter -jar wss-unified-agent.jar in the Arguments field.

...

Add the following variables to your Variables:
WS_APIKEY: <your-api-key>

WS_USERKEY: <your-user-key>

WS_WSS_URL: <your-wss-url>

WS_PRODUCTNAME: TFS_$(System.TeamProject)

WS_PROJECTNAME: $(Build.Repository.Name)_$(Build.SourceBranchName)

...

This page is available at: https://docs.mend.io/bundle/unified_agent/page/microsoft_azure_devops_server__ua__integration.html