UiPath Jenkins Plugin publishes Process as Library when created with "Windows" Compatibility

Hi Guys,

we have a weird problem in the company.

The setup of our UiPath:

  • onPrem Orchestrator (Development) 2021.10.2
  • onPrem Orchestrator (Production) 2021.10.2
  • Git (Gitlabs)
  • Jenkins
  • Uipath (Latest stable version)

Every Project in GIT has a Jenkinsfile attached to it - it looks like that:

@Library('RPA Pipeline Build and Publish') _

def major = "1"
def minor = "0"
def folder = "Default"

buildAndPublish(major, minor, folder)

In jenkins itself we have a plugin that runs a specific groovy file that houses the buildAndPublish function. It looks like that:

// default pipeline to build and publish RPA/UIPath projects



def call(String MAJOR, String MINOR, String folderName) {


    pipeline {
        agent {
            label "uipath"
        }

        environment {
            BUILD_NUM_ENV = currentBuild.getNumber()
            PROD_URL = 'https://rpa.ourcompany.com/'
            DEV_URL = 'https://rpa-dev.ourcompany.com/'
            BRANCH_NAME = "${GIT_BRANCH.split("/").size() > 1 ? GIT_BRANCH.split("/")[1] : GIT_BRANCH}"
        }

        options {
                disableConcurrentBuilds()
                buildDiscarder(logRotator(daysToKeepStr: '5', numToKeepStr: '5', artifactNumToKeepStr: '1'))
        }

        stages {
            stage ('Pre Build') {
                steps {
                    catchError {
                        bat label: '', script: 'rmdir /Q /S Output'
                    }
                }            
            }
            stage ('Build') {
                steps {
                    script {
                        if ("master" == "${BRANCH_NAME}"){
//                            BUILD_NUM_ENV = 0
                        }
                    }
                    UiPathPack(
                        outputPath: 'Output',
                        projectJsonPath: 'project.json',
                        version: CustomVersion("${MAJOR}.${MINOR}.${BUILD_NUM_ENV}"),
                        traceLevel: 'Verbose',
                        outputType: 'Process'
                    )
                }
            }
            stage ('Post Build') {
                steps {
                    script {
                        if ("master" == "${BRANCH_NAME}"){
                            UIP_URL = "${PROD_URL}"
                        } else {
                            UIP_URL = "${DEV_URL}"
                        }
                    }

                    echo "${UIP_URL}"

                    UiPathDeploy(
                        credentials: UserPass('uid'),
                        environments: 'Development',
                        folderName: "${folderName}", 
                        orchestratorAddress: "${UIP_URL}", 
                        orchestratorTenant: 'ourcompany', 
                        packagePath: 'Output',
                        traceLevel: 'Verbose',
                        entryPointPaths: "Main.xaml",
                        createProcess: true,
                    )
                }
            }
        }

    }
}

When we create a project in UiPath Studio with “Windows - Legacy” Compatibility, this works fine. Jenkins build a new process and publishes it to our orchestrator server.

In our latest project we decided to go with “Windows Compatibility”.

This gets built fine, but instead of a process, jenkins builds and publishes it as a library.

Here is the output of jenkins:

At this point I have no clue why jenkins uipath plugin does this.
I checked everything and the only difference between a studio project “windows” vs “windows - legacy” is that in the project.json the last line compatibility is either “Windows” or “Legacy”.

Any ideas? Thank you so much.

Hey @ShadowDom

Would you be able to share path where project.json resides inside the nuget after the packaging is successful?

Hi @Rishi_Raj_Singh
Thx for replying!

I went to the orchestrator where the published package is located: C:\Program Files (x86)\UiPath\Orchestrator\Storage\Orchestrator-Host\Libraries\2217_WindowsCompatibility and unzipped the latest version .nupkg.

The project.json resides then in C:\Program Files (x86)\UiPath\Orchestrator\Storage\Orchestrator-Host\Libraries\2217_WindowsCompatibility\content\project.json

Any ideas?

Also (didn’t find edit button) - i also did the exact same but with windows legacy compatibilty. The file is located here:

C:\Program Files (x86)\UiPath\Orchestrator\Storage\Orchestrator-e876b5b8-20b7-4506-b638-d8bc643f7c9d\Processes\2217_WindowsLegacyCompatibility\lib\net45

This is the project.json from the unpacked .nuget version that was sent to the server:

{
  "name": "2217_WindowsCompatibility",
  "description": "Windows",
  "main": "Main.xaml",
  "dependencies": {
    "UiPath.Excel.Activities": "[2.12.3]",
    "UiPath.System.Activities": "[22.4.5]",
    "UiPath.Testing.Activities": "[22.4.3]",
    "UiPath.UIAutomation.Activities": "[22.4.7]"
  },
  "webServices": [],
  "entitiesStores": [],
  "schemaVersion": "4.0",
  "studioVersion": "22.4.5.0",
  "projectVersion": "1.0.10",
  "runtimeOptions": {
    "autoDispose": false,
    "isPausable": true,
    "isAttended": false,
    "requiresUserInteraction": true,
    "supportsPersistence": false,
    "excludedLoggedData": [
      "Private:*",
      "*password*"
    ],
    "executionType": "Workflow",
    "readyForPiP": false,
    "startsInPiP": false,
    "mustRestoreAllDependencies": true
  },
  "designOptions": {
    "projectProfile": "Developement",
    "outputType": "Process",
    "libraryOptions": {
      "includeOriginalXaml": false,
      "privateWorkflows": []
    },
    "processOptions": {
      "ignoredFiles": []
    },
    "fileInfoCollection": [],
    "modernBehavior": true
  },
  "arguments": {
    "input": [
      {
        "name": "in_OrchestratorQueueName",
        "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
        "required": false,
        "hasDefault": false
      },
      {
        "name": "in_OrchestratorQueueFolder",
        "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
        "required": false,
        "hasDefault": false
      }
    ],
    "output": []
  },
  "expressionLanguage": "VisualBasic",
  "entryPoints": [
    {
      "filePath": "Main.xaml",
      "uniqueId": "996d65c8-3a5e-46c7-8bdc-9f21feb46975",
      "input": [
        {
          "name": "in_OrchestratorQueueName",
          "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
          "required": false,
          "hasDefault": false
        },
        {
          "name": "in_OrchestratorQueueFolder",
          "type": "System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089",
          "required": false,
          "hasDefault": false
        }
      ],
      "output": []
    }
  ],
  "isTemplate": false,
  "templateProjectData": {},
  "publishData": {},
  "targetFramework": "Windows"
}

@ShadowDom Thanks for the quick reply , it was helpful!
I have taken a note of this , will be discussing this with the team and will get back to you with a appropriate fix or a timeline in which fix can be expected.

Thanks again!
cc: @ThomasStocker @Amol_Awate

1 Like

Hello,

that sounds very nice. Thank you very much!

@Rishi_Raj_Singh Any updates? Thx

@ShadowDom We have planned a release by end of next week which will be fixing this issue.

Thank you very much!

@Rishi_Raj_Singh Is the update available yet? Sorry cant check myself have to write our admins first to proceed the update. Thx

@Rishi_Raj_Singh Thx the update is available and jenkins is not failing anymore. However now I have a new problem. After installing the package and trying to running it I get this error (the process that is marked in red is just how the process is called):

image

On the machine I tried to run it via Orchestrator the userprofile looks like that:

What could be the problem? Thx

@ShadowDom What exactly the issue you are facing?
as from the screenshot i’m not able to depict the cause for this as it is in some other language than english.

@Rishi_Raj_Singh

I opened a ticket via customer support portal and provided detailed infos, also a demo project I tried that again.

The error basically says "Could not load file or assembly , Culture=neutral, PublicKeyToken=null’. The system can’t find the provided file.

This only happens after jenkins plugin built this package. When I publish the same process via “Publish” button in Studio it works. Also in Studio itself the process works.

Thanks for your ongoing help!

Ok.
Let me check & find that ticket.
Will get back to you with an update or if I need anything else.

Thank you for your time.

Thank you very much!

Have you found any solution for this?

Hi,

so support said that we have to upgrade our Orchestrator Version to the newest one, that should fix the issue. (We are currently on 2021.10.2)

Since we are moving into the cloud this year we won’t upgrade. Right now we are just publishing the packages to dev orchestrator with the studio publish button.
Then we download it from there and upload it on the prod orchestrator.

Not a beautiful solution but a temporary workaround that works for us since we know we move in the cloud soon.

Thanks for your reply :slightly_smiling_face:

@Rishi_Raj_Singh , Any update on the above mentioned Ticket on customer support portal. P.s. Orchestrator is 2022.10 version.