Question

Rest Service for Jenkins

Hello All,

we are integrating Jenkins for devops pack by Pega, During Jenkins setup we faced an error:-

Error Messages : REQUEST_VALIDATION_ERROR java.lang.IllegalArgumentException: Invalid URL provided for system DefaultSystem URL:http://<host name>:<port number>/<context>/PRRestService/<tenant url hash> Error Messages : REQUEST_VALIDATION_ERROR java.lang.IllegalArgumentException: Invalid URL provided for system DefaultSystem URL:http://<host name>:<port number>/<context>/PRRestService/<tenant url hash>

and found out the root cause to be the wrong details in pega.rest.server.url=<REST service URL> provided during the jenkins setup.

SInce i am not a Jenkins guys, I tried to find out details on creating a REST service for Import by the jenkins, however no details are there on PDN for the jenkins integration.

SINCE THIS SETUP IS TO AUTOMATE THE DEPLOYMENT:-

As of now the page class in the servcie REST rule is Rule-Admin-Product. however i am not sure on the methods.

can anyone help here with some examples for this kind of setup.

Thank your in Advance!

Thanks,

Swagat

Comments

Keep up to date on this post and subscribe to comments

May 3, 2018 - 7:24am

May 3, 2018 - 9:29am
Response to KevinZheng_GCS

Hello Kevin, We are using Pega7.2.2.

 

Thank you for the URL, However this URL has details on how to create a Jenkins JOB.

my question is that when jenkins is making a REST-Service call to pega we have to have a RESTService package and a Service Rule where we should handle the ACtivity for RAP creation i assume its ExportRAP, Parameters, GET/POST/PUT/DELETE. Would you be able to provide an example rule which is working for creating RAP's when initaited VIA JENKINS?

 

Thanks in Advance for your Help.

Swagat

May 4, 2018 - 11:00am
Response to swagats0

Hi Swagat,

I am also getting the same problem and looking for a valid link. Jenkins runs on a virtual box and pega platform is on cloud. 

Pega version : 7.3.1 and prpcserviceutil is also 7.3.1 so we can rule out any compatibility issues. 

November 19, 2018 - 3:56pm

Swagat,

I am facing the same issue and I am trying to troubleshoot it.

Can you please elaborate "found out the root cause to be the wrong details in pega.rest.server.url=<REST service URL> provided during the jenkins setup"

 

November 19, 2018 - 4:29pm
Response to KaranK25

Hello!

 

Thank you for posting your query on PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s at the top of this screen and also on our Pega Support Community homepage.  Once created, please reply back here with the URL of the new post.

 

We have also sent you a private message opening up a communication channel in case you have any further questions.

 

Thanks,

 

Marissa | Community Moderator | Pegasystems Inc.

August 6, 2019 - 2:34am

Hi

Basically, if you want to avoid using CLI (prpcServiceUtils), as I did, you need to create a REST service which will be called by Jenkins to initiate migration.

Pega already has ootb activity to trigger migration process (look into Migration Wizard for more details) - RequestMigration in a class PegaAccel-Management-Migration-Request. Save-as into your ruleset, and make small changes:

1. Comment out a line 6 ("Set a flag to indicate that the request is initiated from CLI")

2. Add new line to the end Property-Set with step page .ResponseBody where you set some values as a response from your service (I set Code, ResponseStatus and WorkID).

Your service must use this activity and provide several crutial parameters:

1. RAP name, version to migrate

2. Name of the system to migrate (you must create it beforehand)

 

Hope it will get you idea about starting point. Basically, everything is already implemented in Pega, you just need to adjust it for your needs. 

Any questions - ping me

 

August 7, 2019 - 9:34am

I should point out that there is no need to avoid using the prpcServiceUtils package. It is a convenience command line utility that can be invoked from any tool or choice, the above link referencing Jenkins is just an example. The prpcServiceUtils package  also include some starter ANT scripts that can be integrated into any build tool of choice and supports all of these actions out of the box

  • Manage hotfixes
  • Expose columns
  • Export RAP archives and applications
  • Import RAPs
  • Retrieve asynchronous job status

There are rule level APIs in the platform and you can create your own service packages and it will be a lot more work to recreate everything.