Jenkins Master + Jenkins Agent( uipath Robot) + Orchestrator server


Can anyone please explain how the uipath deploy works on this particular setup.

I have a jenkins master ( Server A) where the job is configured to run a uipath deploy on an agent ( Server B ) where i have uipath robot installed , the agent then talks to the orchestrator ( Server C) to deploy the package in a tenanat.

i am getting the below error

Get-UiPathAuthToken : An error occurred while sending the request.
12:06:00 At D:\jenkins\master\workspace\UIpath_Manual@tmp\UiPath.Extensions\1.0.7051.31454\UiPathPackage-Module.psm1:41 char:9
12:06:00 + Get-UiPathAuthToken -URL $orchestratorAddress -TenantName $te …
12:06:00 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12:06:00 + CategoryInfo : NotSpecified: (:slight_smile: [Get-UiPathAuthToken], HttpRequestException
12:06:00 + FullyQualifiedErrorId : System.Net.Http.HttpRequestException,UiPath.PowerShell.Cmdlets.GetAuthToken

Add-UiPathPackage : An authentication token is required. Specify a value for -AuthToken on the cmdlet or call
12:06:00 Set-UiPathAuthToken for the session
12:06:00 At D:\jenkins\master\workspace\UIpath_Manual@tmp\UiPath.Extensions\1.0.7051.31454\UiPathPackage-Module.psm1:53 char:63
12:06:00 + … { Write-Host “Adding $"; Add-UiPathPackage -PackageFile "$”; Log -m …
12:06:00 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12:06:00 + CategoryInfo : NotSpecified: (:slight_smile: [Add-UiPathPackage], Exception
12:06:00 + FullyQualifiedErrorId : System.Exception,UiPath.PowerShell.Cmdlets.AddPackage

What am i missing here ? and what is the role of powershell here ?

Thanks for asking, It all depends how you wish to configure your pipeline.

from the above code it looks like you are trying to work with cloud Orch and it supports token based auth method.

// Deploy Stages
	        stage('Deploy to UAT') {
	            steps {
	                echo "Deploying ${BRANCH_NAME} to UAT "
	                UiPathDeploy (
	                packagePath: "Output\\${env.BUILD_NUMBER}",
	                orchestratorAddress: "${UIPATH_ORCH_URL}",
	                orchestratorTenant: "${UIPATH_ORCH_TENANT_NAME}",
	                folderName: "${UIPATH_ORCH_FOLDER_NAME}",
	                environments: 'DEV',
	                //credentials: [$class: 'UserPassAuthenticationEntry', credentialsId: 'APIUserKey']
	                credentials: Token(accountName: "${UIPATH_ORCH_LOGICAL_NAME}", credentialsId: 'APIUserKey'), 


Which can be configured like above.

In case you wish to read full step by step guide see details here.