# UiPath Install Platform

> The **UiPathInstallPlatform** task downloads and installs a specific version of the UiPath CLI to the Jenkins agent's tool cache. This task applies to both standalone automation projects (processes, libraries, tests) and Solutions.

The **UiPathInstallPlatform** task downloads and installs a specific version of the UiPath CLI to the Jenkins agent's tool cache. This task applies to both standalone automation projects (processes, libraries, tests) and Solutions.

## When to use this task

Use the **UiPathInstallPlatform** task when:

- You want to explicitly control which CLI version is used in your pipeline.
- You need to install a specific CLI flavor based on your project types (see [CLI Flavors](#cli-flavors) below).
- Your build agents don't have internet access to the UiPath Public Feed.
- You want to cache the CLI on the agent to speed up subsequent builds.

Execute the **UiPathInstallPlatform** task before any other UiPath tasks in your pipeline.

:::note
This task is optional. If not specified, Jenkins will automatically use the CLI version bundled with the plugin. However, using this task gives you explicit control and improves build performance through caching.
:::

## CLI Flavors

UiPath CLI is distributed in platform-specific packages:

| Platform | Architecture | CLI Package | Supported Project Types |
|---|---|---|---|
| Windows | x64 | `UiPath.CLI.Windows` | Cross-platform, Windows (non-legacy), Solutions |
| Linux | x64 | `UiPath.CLI.Linux` | Cross-platform, Solutions |
| macOS | ARM64 (Apple Silicon) | `UiPath.CLI.macOS` | Cross-platform, Solutions |
| Windows | x64 | `UiPath.CLI.Windows.Legacy` | Windows - Legacy projects only |

All CLI packages require .NET 8 Runtime:
- Windows agents: .NET Desktop Runtime 8
- Linux agents: .NET Runtime 8

## Handling mixed project types

If your repository contains multiple project types (e.g., both Windows-Legacy and Cross-platform projects), you need to install multiple CLI flavors and process each project type with the correct CLI:

### Recommended approach
1. Install `UiPath.CLI.Windows` and process all Cross-platform and Windows (non-legacy) projects.
2. Install `UiPath.CLI.Windows.Legacy` and process all Windows-Legacy projects separately.

You can achieve this in the same Jenkins pipeline by:
- Using multiple **UiPathInstallPlatform** steps with different CLI versions.
- Organizing your build stages to process each project type with the appropriate CLI.
- Using conditional logic based on folder structure or naming conventions to identify project types.

:::tip
There is no automatic way for UiPath CLI to detect project types. You must know which projects in your repository are Windows-Legacy and organize your pipeline accordingly.
:::

## UiPath CLI version selector

Select the version of the UiPath CLI that you want to use from the **Choose a CLI version** dropdown.

The options in the dropdown list include:

- Available versions of UiPath CLI 25.10 and later.
- The CLI flavor (Windows, Linux, or Windows.Legacy).
- The .NET runtime requirements for each version.

## Path to UiPath CLI nupkg (Offline scenario)

If your Jenkins agents cannot access the UiPath Public Feed, you can manually provide the CLI package:

1. Download the desired UiPath CLI version from the [UiPath Public Feed](https://uipath.visualstudio.com/Public.Feeds/_artifacts/feed/UiPath-Official).
2. Place the downloaded `.nupkg` file in an accessible location within the agent workspace directory.
   
   Examples: 
      `${WORKSPACE}/nupkg/UiPath.CLI.Windows.25.10.3.nupkg`
      `${env.ProgramFiles}\\CLIVersions\\UiPath.CLI.Windows.Legacy.25.10.9424.14050.nupkg`

3. In the **UiPathInstallPlatform** task configuration, set cli version to **'CustomVersion'** and provide the path to the `.nupkg` file in the **Path to CLI nupkg** field.

:::important
Make sure custom version CLI package name matches exactly the one from Official feed like below:
- **UiPath.CLI.Windows.25.10.3.nupkg**
- **UiPath.CLI.Linux.25.10.3.nupkg**
:::

## Pipeline example

```
pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Build') {
      steps {
         UiPathInstallPlatform(
            cliVersion: 'Windows.25.10.0-20251104-11',
            traceLevel: 'Information',
         )
      }
    }
  }
}
```

```
pipeline {
  agent any
  environment {
      MAJOR = '1'
      MINOR = '0'
  }
  stages {
    stage ('Build') {
      steps {
        UiPathInstallPlatform(
            cliVersion: 'CustomVersion',
            cliNupkgPath: 'C:\Tools\UiPath.CLI.Windows.25.10.3.nupkg',
            traceLevel: 'Information',
         )
      }
    }
  }
}
```

## Next steps

- [Running Jenkins Jobs](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/running-jenkins-jobs) - Learn how to configure and execute Jenkins pipelines.
- [Jenkins Project Tasks](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/jenkins-project-tasks) - Explore tasks for standalone automation projects.
- [Jenkins Solution Tasks](https://docs.uipath.com/cicd-integrations/standalone/2025.10/user-guide/jenkins-solution-tasks) - Explore tasks for Solutions.
