UiPath, Jenkins CICD Pipeline Tutorial - Part 1

In this tutorial, I teach you how to setup a basic UiPath CICD pipeline with Jenkins. This pipeline tracks a Github repository for changes and as soon as a new version of code is committed, it pushes a new build and to the UiPath orchestrator in an automated fashion.

Note: This tutorial is intended as a learning concept to get a pipeline up and running to explore CICD further. It is not intended as an approach for deploying code to production.

You can preview this implementation in the following video: UiPath, Jenkins CICD Pipeline - Part 1 - YouTube

What you’ll need:

  • Admin rights to an orchestrator instance (UiPath Community or Enterprise Edition)
  • Jenkins installed on your Windows PC
  • A Github account and UiPath integrated with it

High level steps:

  1. Install Jenkins and UiPath Plugin
  2. Clone Github Repo
  3. Setup Jenkins Pipeline
  4. Connect Git Repository

In each stage I mention the pitfalls that you have to watch out for.

I have also included additional references at the end of this post. A special thanks to Satish Prasad - his post on RPABotsWorld.com helped me to set this up. I have linked his article in the references section as well.

1. Install Jenkins and UiPath Plugin

  • Install Java Development Kit (JDK)
  • Add JDK to PATH
  • Download and install Jenkins
  • Run Jenkins on localhost 8080
  • Install UiPath Plugin within Jenkins

Reference: Jenkins installation on Windows 10 | How to install Jenkins CI on Windows 10 - YouTube


  • Take care to install a version of JDK that Jenkins is compatible with. As on this date, this version is 11. Find out the latest supported version here: Java requirements
  • During the installation, select Run service as LocalSystem even though it isn’t recommended


Install the UiPath Plugin within Jenkins:

Note: If your Jenkins workspace is set to a folder within the WINDOWS folder (which is usually the case… a path such as C:\WINDOWS\system32\config\systemprofile\AppData\Local\Jenkins.jenkins\workspace), you need to carry out an additional step for the UiPath plugin to work. You need to change this folder to one outside WINDOWS. To do this, navigate to the ‘config.xml’ file within your Jenkins folder to modify the workspace and the builds directories:


What this achieves is that it changes my workspace and build directories to ‘C:/JenkinsRoot’. Feel free to come up with a more creative name.

Reference: How to change workspace and build record Root Directory on Jenkins? - Stack Overflow

2. Clone Github Repo

Note: The Jenkinsfile is written in Groovy syntax. Within it, you can see the various stages of the pipeline:
Build → Test → Deploy to UAT-> Deploy to Production
I’ve included the full code within the Jenkinsfile at the end of this post.

To replicate the demo, you need to input your own orchestrator details into this file against the following variables:

UIPATH_ORCH_URL = "https://cloud.uipath.com/"

You can find these values in your automation cloud instance. Navigate to Admin → Tenant → API Access



Now note down the value in the ‘User Key’ field carefully. You’ll need to supply it to Jenkins as a credential in a later step.

Pitfall: Once you have made the necessary changes to the Jenkinsfile, commit and push to the Github repository before proceeding further. Further, the name “Jenkinsfile” is case specific and the file should not have any extension such as “.txt”.

3. Setup Jenkins Pipeline

Before we get to the pipeline itself, we need to create a credential for the API User Key we obtained earlier to the UiPath Orchestrator.

In Jenkins, add a global credential for the API key. Navigate to Jenkins → Manage Jenkins → Manage Credentials. You should see the following screen:

Click on ‘global’ → Add Credentials. In the ‘Kind’ dropdown, select Secret Text.

Enter your API User Key in the secret field. In the ID field, be sure to enter “APIUserKey” as the value. This is how the code in the Jenkinsfile refers to this credential. Click ‘OK’ after including a helpful description.

We are now ready to create our Jenkins pipeline. Navigate to Jenkins → New Item. Enter a suitable name, select Multibranch Pipeline and click OK

In the Branch Sources tab, select Add Source → Github:

In the Repository HTTPS URL field, enter the URL to your Github repository and click Save.


That is pretty much it… If everything is setup perfectly, Jenkins should show you the following screen with the status as “Finished: SUCCESS.”


Jenkins should have replicated the structure of your Github repository. Within the master branch, you should see that the pipeline has successfully created a build:

And this build should appear (like magic!) in your orchestrator instance too:


Pitfall: If you haven’t moved the workspace directory outside of the windows folder as I have indicated in step 1, you are likely to encounter the following error message:

ERROR: The plugin cannot be executed in a workspace path inside the WINDOWS folder. Please use a custom workspace folder that is outside the WINDOWS folder for this build definition or reinstall Jenkins and use a local user account instead.
Finished: FAILURE

If so, change the Jenkins config file as indicated in step 1 above.

Otherwise, if you have received a success message, congratulations! Let us now see how we can configure your pipeline to build new versions and push them to UiPath orchestrator as soon as the code in your Github repository is updated.

4. Connect Git Repo for automated builds when new commits are made

As with most things, there is an easy way and a hard, but elegant way to do this:

The easy way is to check for new builds is to have Jenkins periodically poll your github repository and check if new code has been committed. You can do this by navigating to Jenkins Pipeline → Configure → Scan Repository Triggers.



The limitation here is that updates happen only at a set frequency - not as soon as code is committed. Another factor is that Jenkins imposes limitations on polling Git repositories for updates.

The hard, but elegant way is to configure webhooks:

Github Repo → Settings → Webhooks → Add Webhook

On taking that path, you should see the following form. Here, you need to specify the URL to your Jenkins server followed by “/github-webhook/”

Select “application/x-www-form-urlencoded” as the type and the “Just the push event” radio button before creating the webhook.


Pitfall: If you’re running Jenkins on your local machine “E.g. localhost:8080”, Github mostly won’t be able to access it since it sits behind a firewall, even if you provide your public IP address in the place of “localhost”. To get around this, you need a secure tunneling service. For the purpose of this demo, I used Ngrok, and it worked quite well.

Reference: ngrok - download

Next Steps
Alright! So you have gotten this far. Where can you go from here? I suggest you explore the following topics

  • Try configuring a webhook if you didn’t do that already
  • Try setting this up for a private Github repo (hint: you’ll need a username and a private access token)
  • Break the code within the Jenkinsfile to see how it works
  • Use the UiPath plugin to generate additional code to add to the Jenkinsfile
  • Wait for part 2 of this series, which will explain how you include Testing


Jenkinsfile text

pipeline {
 agent any

    	        // Environment Variables
	        environment {
	        MAJOR = '1'
	        MINOR = '0'
	        //Orchestrator Services
	        UIPATH_ORCH_URL = "https://cloud.uipath.com/"
	        UIPATH_ORCH_LOGICAL_NAME = "anupaminc"
	        UIPATH_ORCH_TENANT_NAME = "Descriptify"
	        UIPATH_ORCH_FOLDER_NAME = "Default"

	    stages {

	        // Printing Basic Information
	            steps {
	                echo "Jenkins Home ${env.JENKINS_HOME}"
	                echo "Jenkins URL ${env.JENKINS_URL}"
	                echo "Jenkins JOB Number ${env.BUILD_NUMBER}"
	                echo "Jenkins JOB Name ${env.JOB_NAME}"
	                echo "GitHub BranhName ${env.BRANCH_NAME}"
	                checkout scm


	         // Build Stages
	        stage('Build') {
	            steps {
	                echo "Building..with ${WORKSPACE}"
	                UiPathPack (
	                      outputPath: "Output\\${env.BUILD_NUMBER}",
	                      projectJsonPath: "project.json",
	                      version: [$class: 'ManualVersionEntry', version: "${MAJOR}.${MINOR}.${env.BUILD_NUMBER}"],
	                      useOrchestrator: false
	         // Test Stages
	        stage('Test') {
	            steps {
	                echo 'Testing..the workflow...'

	         // 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'), 



	         // Deploy to Production Step
	        stage('Deploy to Production') {
	            steps {
	                echo 'Deploy to Production'

	    // Options
	    options {
	        // Timeout for pipeline
	        timeout(time:80, unit:'MINUTES')


	    post {
	        success {
	            echo 'Deployment has been completed!'
	        failure {
	          echo "FAILED: Job '${env.JOB_NAME} [${env.BUILD_NUMBER}]' (${env.JOB_DISPLAY_URL})"
	        always {
	            /* Clean workspace if success */


Informative @anupamck :clap:t2::clap:t2::clap:t2::clap:t2::fire:


Thank you very much for sharing your knowledge @anupamck :smiley:

1 Like

A pleasure, Stefan. Thanks for your guidance and encouragement!

1 Like


1 Like

This is exactly what I was looking for, never found such a detailed guide. Thank you @anupamck. This should be added to docs.uipath.com if possible !


Thank you @Nithin_P - glad you found it useful :slight_smile:


Thank you so much for this through walkthrough!

After adhering to all steps and pitfalls It fails at UAT as shown in the images provided.

Also not I was able to access Jenkins by logging in as a service.