Discussion

Ask the Expert - Implementing Continuous Integration using Jenkins with Ketan Verma

Join Ketan (@vermk) in this month's Ask the Expert session on Jenkins!

Meet Ketan Verma: Ketan Verma is working as a Quality Analyst for Communication Industry Applications. Ketan has been with Pega since 4 years and has extensively worked on Jenkins implementation for application automation test using selenium

Message from Ketan: I will try to answer your questions about Jenkins implementation for application automation test using selenium. Please feel free to ask any question or share the issues you are facing in Automation test of your application. I’m happy to help!

Ask the Expert Rules

  • This is not a Live Chat - Ketan will reply to your questions over the course of this two-week event
  • Questions should be clearly and succinctly expressed
  • Questions should be of interest to many others in the audience
  • Have fun!

Group Tags

Comments

Keep up to date on this post and subscribe to comments

May 15, 2018 - 4:44am

Hi Ketan,

I have configured Jenkins in my local machine having Pega 7.2.2 Personal Edition.

I have followed below article to configure -

https://pdn.pega.com/using-prpcserviceutils-and-jenkins-automated-application-deployment/using-prpcserviceutils-and

When I run the build, I am seeing below issue -

BUILD FAILED
E:\Pega\prpcServiceUtils-7.2.2\scripts\utils\prpcserviceutilsWrapper.xml:171: Connection Property file -Dprpc.service.util.action=export is not a valid file

Total time: 0 seconds
Exiting with Error

Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

I have attached the complete Console Output along with prpcServiceUtils folder and Jenkins configuration screen shots.

Can you please help me identifying what I am missing here ?

 

Thanks

Dilip Voosuru

Pega
May 16, 2018 - 8:06am
Response to __Dillu__

Hi Dilip, 

Please try changing Execute Windows batch command to single line i.e "%PEGA_HOME%\scripts\utils\prpcServiceUtils.bat export --connPropFile %WORKSPACE%\%SystemName%_export.properties --artifactsDir %WORKSPACE%" as in screenshot (Screenshot 4 in word doc) I am able to see there is a newline character.

although I was having some other issues so I have to update command to " %PEGA_HOME%\scripts\utils\prpcServiceUtils.bat export --connPropFile %PEGA_HOME%\scripts\utils\%SystemName%_export.properties --artifactsDir %PEGA_HOME% "

Thanks 
Ketan Verma

May 16, 2018 - 6:41am
Response to vermk

Hi Ketan,

 

I am glad that you are able to reproduce the issue. I will be waiting for your response.

 

Thanks

Dilip Voosuru

Pega
May 16, 2018 - 8:13am
Response to __Dillu__

I am able to export and edited my response above. please check same and let me know.

May 16, 2018 - 3:21pm
Response to vermk

Hi Ketan,

 

Thank you for guiding me, after doing below changes, export happened successfully but I am still having issues with Import. 

After removing the extra line, I faced issues with the %WORKSPACE% path since it had space in the file path (in my case C:\Program Files (x86)\Jenkins).

So, I too changed the command to below - 

 %PEGA_HOME%\scripts\utils\prpcServiceUtils.bat export --connPropFile

%PEGA_HOME%\scripts\utils\%SystemName%_export.properties --artifactsDir %PEGA_HOME% 

 

I have configured both export & import in the same project. Though export is successful, import is getting failed with below output - 

 

[jenkins] $ cmd.exe /C "C:\apache-ant-1.10.3\bin\ant.bat -file Jenkins-build.xml -DproductVersion=01.01.01 -DproductName=SiD_RnD_Data_Auto_Test importprops && exit %%ERRORLEVEL%%"
Buildfile: E:\Pega\prpcServiceUtils-7.2.2\scripts\samples\jenkins\Jenkins-build.xml

importprops:

BUILD FAILED
E:\Pega\prpcServiceUtils-7.2.2\scripts\samples\jenkins\Jenkins-build.xml:19: E:\Pega\prpcServiceUtils-7.2.2\scripts\samples\jenkins\PegaprpcServiceUtils-7.2.2 does not exist.

Total time: 0 seconds
Build step 'Invoke Ant' marked build as failure
Finished: FAILURE

 

I have uploaded the console output, could you please share your inputs on this ?

 

Thanks 

Dilip Voosuru

Pega
May 17, 2018 - 8:45am
Response to __Dillu__

Hi Dilip,

The error says it's not able to find the specified folder in --artifactsDir. Please verify the folder exist. 
I have tried a workaround for same and its worked for me. Attaching steps for the workaround in the document.

Please let me know your comments.

Thanks 
Ketan

 

May 20, 2018 - 2:40am
Response to vermk

Hi Ketan,

 

Thank you for your help. Now the build is working fine with both export & import.

However, the existing instances are skipped on import though I have set below -

 

import.existingInstances=override in prpcServiceUtils.properties file and 

ImportExistingInstances=override in the Jenkins project environment variables.

 

Can you please help me, where else I am missing the variable to make my import override the instances instead of skipping.

 

Thank you in advance

Dilip Voosuru

Pega
May 21, 2018 - 6:28am
Response to __Dillu__

Hi Dilip, 

I am not facing this issue in my environment (maybe because of Pega 7.4). Could you please try restoring prpc service utils file original state and try. if you don't provide any data in properties file it will automatically take from Jenkins job. In this way, there is only time you will define ImportExistingInstances property.

Thank you

Ketan

Ketan

May 16, 2018 - 10:50am

Do you have a "best practice" around database deployments that are not part of the Pega RAP? We currently use Jenkins and Pega to deploy rules etc but any DDL/DML is done externally.

Pega
May 17, 2018 - 6:02am
Response to DPCLARK12

Hi David,

does externally SQL update means manually or you are using ANT to run sql?

Normally we use ANT scripts to run DDL/DML script by Jenkins.

Thanks 

Ketan

 

May 17, 2018 - 10:32am
Response to vermk

Externally does means manually today. We're looking at automating the process via Jenkins but we're looking at a different tool than ant. We had used ant via prpcUtils to deploy RAPs previously.

May 17, 2018 - 1:42pm
Response to vermk

Are you using sqltask - https://ant.apache.org/manual/Tasks/sql.html ?

Pega
May 18, 2018 - 2:07am
Response to DPCLARK12

Yes, we are using same.

May 18, 2018 - 7:16am

Hi Ketan, 

We are planning to use prpcServiceUtils to call the export REST API services as part of our DevOps implementation. the REST API URL is configured as - https://serverhostname:443/prweb/PRRestService/

Pega version we are using is - 7.3.1

When we are executing it, it shows the below error - [java] Error Messages      : REQUEST_EXECUTION_ERROR com.pega.pegarules.serviceclient.exception.PRPCServiceException: javax.net.ssl.SSLHandshakeException: No appropriate protocol, may be no appropriate cipher suite specified or protocols are deactivated.

Any idea, why we are encountering this error and how to resolve this?

Pega
May 21, 2018 - 2:25am
Response to SENA0001

Hi  Aishik,

I am not able to find the root cause of this issue. could you please send me more details and log files.

Regards

Ketan 

May 21, 2018 - 4:00am
Response to vermk

Hi Ketan,

Pega version we are using - PRPC 7.3.1

Application Server - JBOSS

Pega Hosting is SSL enabled.

We are using prpcServiceUtils CLI tool to connect to the export REST services.

PFA the log files. Let me know if anything else is required.

Pega
May 21, 2018 - 9:18am
Response to SENA0001

Hi Aishik,

Cloud you please share prpc utils properties files and xml files as well. I am not able to find root cause of issue,

Thanks

Ketan

May 23, 2018 - 5:21am
Response to vermk

Hi Ketan,

PFA the files you requested for. 

Mod
May 25, 2018 - 8:38am
Response to SENA0001

Hi @SENA0001,

We see that you had created a new post for your query: SSL Handshake Exception While Using prpcServiceUtils Tool

Please continue the discussion over the new post.

Regards,

Lochana | Community Moderator | Pegasystems Inc.

May 19, 2018 - 10:39am

Hi 

For Business user Licensing perspective is it Jenkins need to get separate license ? or if we have Pega User License that would takes care.

Pega
May 21, 2018 - 3:32am
Response to BALASUBRAMANIAMD2991

Jenkins is an open source automation server so no license required for the same.

May 21, 2018 - 3:01am

Hi Ketan,

 

We are on Pega 7.2.1. Could you please help suggest which tool is being used for Unit testing as part of integration process.apart from Pega Unit

 

regards

krishna

Pega
May 21, 2018 - 9:31am
Response to KrishnaR2370

Hi Krishna,

Pega Unit test is the best available tool for the Unit test in general, again it depends on what kind of rules you want to test. if you are using Pega marketing you can use Simulation tools provided by Marketing applications. 

Thanks 

Ketan

May 24, 2018 - 4:40pm

Hi Ketan,

     I have configured Pega 7.3.1 with Jenkins to automate the deployments using prpcServiceUtils. I have managed to export the artifact into a third-party repository ex: JFrog. I am trying to create custom repositories like BitBucket, will the version 7.3.1 support creating custom repositories? if yes, can you please provide me with starting pointers on where exactly to look and start implementing the same?

Regards,

Bharat

Mod
May 25, 2018 - 8:41am
Response to KOMARINA

Hi Bharat,

We see that you have created a new post for this query. As we will be closing our Ask the Expert session today, our expert will help you out on your post: Custom Repository in Pega 7.3.1

Thank you for your understanding.

Lochana | Community Moderator | Pegasystems Inc.

Mod
May 25, 2018 - 8:42am

Thank you all for a great discussion and thanks to our Expert Ketan (@vermk) for taking time to be our expert!

Lochana | Community Moderator | Pegasystems Inc.