Question

Anyone integrated with Jenkins for automate deployment in Pega 7.2

Hi,

Anyone integrated with Jenkins for deployment automation in Pega 7.2 and give me outline how to configure.

I have try to use "prpcServiceUtils", didnt work well.

Regards,

Anandh

***Moderator Edit: Vidyaranjan | Updated Categories***

**Moderation Team has archived post**

This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.

Comments

Keep up to date on this post and subscribe to comments

April 11, 2017 - 2:02pm

Please take a look at step by step guide - Using prpcServiceUtils and Jenkins for automated application deployment

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

 

April 11, 2017 - 2:11pm
Response to DilipLingaraju

Hi Dilip,

I have gone through that article, that didnt have much information. I have configure those step, but didnt mention about those source and destination configuration and other details.

Regards,

Anandh

April 11, 2017 - 2:25pm
Response to Anandh Palanisamy

Can you enlighten us with the exact issue which you are facing post following the guide, so that any of us can try to help you?

April 11, 2017 - 4:57pm
Response to DilipLingaraju

Hi Dilip,

What are those parameter need to update on the "prpcServiceUtils.properties" file before using this utility?

Regards,

Anandh

May 3, 2017 - 2:49pm

Hi All,

I have followed the same step as mentioned in the article, but Im getting the below error when I execute the build.

Started by user Anandh Palanisamy
[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Injecting as environment variables the properties content
TargetUser=user
SystemName=$BUILD_TAG
SourcePassword=password
SourceHost=http://wwwdev.xxxxxxx/prweb/PRServlet
TargetPassword=user
TargetHost=http://wwwdev.xxxxxprweb/PRServlet
SourceUser=password
ParameterName=Value

[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting contributions.
Building in workspace C:\Anandh\Project\DevOps
[jenkins] $ cmd.exe /C "ant.bat -file Jenkins-build.xml -DproductVersion=01.01.01 -DproductName=FordRuleset exportprops && exit %%ERRORLEVEL%%"
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Buildfile: C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\samples\jenkins\Jenkins-build.xml

exportprops:
   [length] C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\samples\jenkins\FordRuleset does not exist
[propertyfile] Creating new property file: C:\Anandh\Project\DevOps\jenkins-SampleBuild-12_export.properties

BUILD SUCCESSFUL
Total time: 0 seconds
[DevOps] $ cmd /c call C:\Users\APALANIS\AppData\Local\Temp\hudson5132555301835811341.bat

C:\Anandh\Project\DevOps>\scripts\utils\prpcServiceUtils.bat export --connPropFile C:\Anandh\Project\DevOps\jenkins-SampleBuild-12_export.properties --artifactsDir C:\Anandh\Project\DevOps
The system cannot find the path specified.

C:\Anandh\Project\DevOps>exit 3
Build step 'Execute Windows batch command' marked build as failure
Finished: FAILURE

 

Can you someone help me on this.

Regards,

Anandh

 

May 5, 2017 - 1:26pm

Hi All,

Im getting the below exception on the jenkin build. Can you please someone help me on this,

 

Started by user Anandh Palanisamy
[EnvInject] - Loading node environment variables.
[EnvInject] - Preparing an environment for the build.
[EnvInject] - Keeping Jenkins system variables.
[EnvInject] - Keeping Jenkins build variables.
[EnvInject] - Injecting as environment variables the properties content 
TargetUser=apalanis
SystemName=$BUILD_TAG
SourcePassword=
SourceHost=http://xxx.xx.xx
TargetPassword=
TargetHost=http://xxx.xx.xx
SourceUser=apalanis
ParameterName=Value

[EnvInject] - Variables injected successfully.
[EnvInject] - Injecting contributions.
Building in workspace C:\Anandh\Project\DevOps
[jenkins] $ cmd.exe /C "ant.bat -file Jenkins-build.xml -DproductVersion=01-01-01 -DproductName=TestProduct exportprops && exit %%ERRORLEVEL%%"
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Buildfile: C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\samples\jenkins\Jenkins-build.xml

exportprops:
   [length] C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\samples\jenkins\TestProduct does not exist
[propertyfile] Creating new property file: C:\Anandh\Project\DevOps\jenkins-SampleBuild-21_export.properties

BUILD SUCCESSFUL
Total time: 0 seconds
[DevOps] $ cmd /c call C:\Users\APALANIS\AppData\Local\Temp\hudson7320348297634750539.bat

C:\Anandh\Project\DevOps>C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils\prpcServiceUtils.bat export --connPropFile C:\Anandh\Project\DevOps\jenkins-SampleBuild-21_export.properties --artifactsDir C:\Anandh\Project\DevOps 
Invoke our ant script, passing in the arguments as collected
Unable to locate tools.jar. Expected to find it in C:\Program Files\Java\jre7\lib\tools.jar
Buildfile: C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils\prpcserviceutilsWrapper.xml
     [echo] *** JVM Arguments -Xmx1280m -XX:MaxPermSize=512m ***

-init:
   [delete] Deleting directory C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils\generated
    [mkdir] Created dir: C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils\generated
[pega:propertyparser] Reading Properties from : C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils/prpcServiceUtils.properties
[pega:propertyparser] pega.rest.server.url=http://<host name>:<port number>/<context>/PRRestService/<tenant url hash>
[pega:propertyparser] pega.rest.username=
[pega:propertyparser] pega.rest.password=*****
[pega:propertyparser] pega.rest.proxy.host=
[pega:propertyparser] pega.rest.proxy.port=
[pega:propertyparser] pega.rest.proxy.username=
[pega:propertyparser] pega.rest.proxy.password=*****
[pega:propertyparser] pega.rest.proxy.domain=
[pega:propertyparser] pega.rest.proxy.workstation=
[pega:propertyparser] pega.rest.response.type=xml
[pega:propertyparser] user.temp.dir=C:/pega_temp
[pega:propertyparser] export.archiveName=
[pega:propertyparser] export.productName=
[pega:propertyparser] export.productVersion=
[pega:propertyparser] export.applicationVersion=
[pega:propertyparser] export.applicationName=
[pega:propertyparser] export.async=true
[pega:propertyparser] expose.includedClasses=
[pega:propertyparser] expose.includeDescendents=true
[pega:propertyparser] expose.excludedClasses=
[pega:propertyparser] expose.excludeDescendents=true
[pega:propertyparser] expose.startKey=
[pega:propertyparser] expose.endKey=
[pega:propertyparser] expose.startDate=
[pega:propertyparser] expose.endDate=
[pega:propertyparser] expose.reindex=true
[pega:propertyparser] expose.reindexType=nonpega
[pega:propertyparser] expose.commitRate=100
[pega:propertyparser] expose.async=true
[pega:propertyparser] import.archive.path=
[pega:propertyparser] import.mode=import
[pega:propertyparser] import.existingInstances=skip
[pega:propertyparser] import.nofailonerror=false
[pega:propertyparser] import.commitRate=100
[pega:propertyparser] import.compileLibraries=true
[pega:propertyparser] import.allowImportWithMissingDependencies=false
[pega:propertyparser] import.codesetName=Customer
[pega:propertyparser] import.codesetVersion=06-01-01
[pega:propertyparser] import.async=true
[pega:propertyparser] import.trackData=false
[pega:propertyparser] manageTrackedData.operation=
[pega:propertyparser] hotfix.operation=
[pega:propertyparser] hotfix.dlFilePath=
[pega:propertyparser] hotfix.catalogPath=
[pega:propertyparser] hotfix.bypassSchema=false
[pega:propertyparser] hotfix.force=false
[pega:propertyparser] hotfix.async=true
[pega:propertyparser] getstatus.jobID=
[pega:propertyparser] getstatus.operationName=
    [mkdir] Created dir: C:\Users\APALANIS\AppData\Local\Temp\PegaInstallTemp-05-May-2017-13.20.07
[pega:hasenoughspace] Found 58393784KB of free space on 'C:\Users\APALANIS\AppData\Local\Temp\'

-processInstances:
     [echo] Performing export on multiple instance(s)
     [echo] argument line
     [echo]  -action export -propFileDir C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils/generated -poolSize ${prpcserviceutils.pool.size} -requestTimeOut ${prpcserviceutils.request.timeout} -tempDir C:\Users\APALANIS\AppData\Local\Temp\/PegaInstallTemp-05-May-2017-13.20.07 -artifactsDir C:\Anandh\Project\DevOps
     [echo] Reading connection information from C:\Anandh\Project\DevOps\jenkins-SampleBuild-21_export.properties
[pega:propertyfilegenerator] pega.rest.server.url=http://<host name>:<port number>/<context>/PRRestService/<tenant url hash>
[pega:propertyfilegenerator] pega.rest.username=
[pega:propertyfilegenerator] pega.rest.password=*****
[pega:propertyfilegenerator] pega.rest.proxy.host=
[pega:propertyfilegenerator] pega.rest.proxy.port=
[pega:propertyfilegenerator] pega.rest.proxy.username=
[pega:propertyfilegenerator] pega.rest.proxy.password=*****
[pega:propertyfilegenerator] pega.rest.proxy.domain=
[pega:propertyfilegenerator] pega.rest.proxy.workstation=
[pega:propertyfilegenerator] pega.rest.response.type=xml
[pega:propertyfilegenerator] user.temp.dir=C:/pega_temp
[pega:propertyfilegenerator] export.archiveName=
[pega:propertyfilegenerator] export.productName=
[pega:propertyfilegenerator] export.productVersion=
[pega:propertyfilegenerator] export.applicationVersion=
[pega:propertyfilegenerator] export.applicationName=
[pega:propertyfilegenerator] export.async=true
[pega:propertyfilegenerator] expose.includedClasses=
[pega:propertyfilegenerator] expose.includeDescendents=true
[pega:propertyfilegenerator] expose.excludedClasses=
[pega:propertyfilegenerator] expose.excludeDescendents=true
[pega:propertyfilegenerator] expose.startKey=
[pega:propertyfilegenerator] expose.endKey=
[pega:propertyfilegenerator] expose.startDate=
[pega:propertyfilegenerator] expose.endDate=
[pega:propertyfilegenerator] expose.reindex=true
[pega:propertyfilegenerator] expose.reindexType=nonpega
[pega:propertyfilegenerator] expose.commitRate=100
[pega:propertyfilegenerator] expose.async=true
[pega:propertyfilegenerator] import.archive.path=
[pega:propertyfilegenerator] import.mode=import
[pega:propertyfilegenerator] import.existingInstances=skip
[pega:propertyfilegenerator] import.nofailonerror=false
[pega:propertyfilegenerator] import.commitRate=100
[pega:propertyfilegenerator] import.compileLibraries=true
[pega:propertyfilegenerator] import.allowImportWithMissingDependencies=false
[pega:propertyfilegenerator] import.codesetName=Customer
[pega:propertyfilegenerator] import.codesetVersion=06-01-01
[pega:propertyfilegenerator] import.async=true
[pega:propertyfilegenerator] import.trackData=false
[pega:propertyfilegenerator] manageTrackedData.operation=
[pega:propertyfilegenerator] hotfix.operation=
[pega:propertyfilegenerator] hotfix.dlFilePath=
[pega:propertyfilegenerator] hotfix.catalogPath=
[pega:propertyfilegenerator] hotfix.bypassSchema=false
[pega:propertyfilegenerator] hotfix.force=false
[pega:propertyfilegenerator] hotfix.async=true
[pega:propertyfilegenerator] getstatus.jobID=
[pega:propertyfilegenerator] getstatus.operationName=
[pega:propertyfilegenerator] jenkins-SampleBuild-21.pega.rest.server.url=http://xxx.xx.xx
[pega:propertyfilegenerator] jenkins-SampleBuild-21.pega.rest.username=apalanis
[pega:propertyfilegenerator] jenkins-SampleBuild-21.pega.rest.password=*****
[pega:propertyfilegenerator] jenkins-SampleBuild-21.export.archiveName=-.zip
[pega:propertyfilegenerator] jenkins-SampleBuild-21.export.productName=TestProduct
[pega:propertyfilegenerator] jenkins-SampleBuild-21.export.productVersion=01-01-01
[pega:propertyfilegenerator] jenkins-SampleBuild-21.export.applicationName=
[pega:propertyfilegenerator] jenkins-SampleBuild-21.export.applicationVersion=
[pega:propertyfilegenerator] jenkins-SampleBuild-21.export.async=false
[pega:propertyfilegenerator] jenkins-SampleBuild-21.pega.rest.response.type=xml
[pega:propertyfilegenerator] Systems Configured
[pega:propertyfilegenerator] jenkins-SampleBuild-21
[pega:propertyfilegenerator] Generated C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils\generated\jenkins-SampleBuild-21.prpcServiceUtils.properties
     [echo] *** JVM Arguments -Xmx1280m -XX:MaxPermSize=512m ***

_callService:
     [java] 13:20:09.130 [main] INFO  [a.pegarules.serviceclient.ClientSettings] - -action export -propFileDir C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils/generated -poolSize ${prpcserviceutils.pool.size} -requestTimeOut ${prpcserviceutils.request.timeout} -tempDir C:\Users\APALANIS\AppData\Local\Temp\/PegaInstallTemp-05-May-2017-13.20.07 -artifactsDir C:\Anandh\Project\DevOps 
     [java] 13:20:09.140 [main] INFO  [a.pegarules.serviceclient.ClientSettings] - Setting Thread Pool Size to default 5
     [java] 13:20:09.140 [main] INFO  [a.pegarules.serviceclient.ClientSettings] - Setting Request TimeOut to default 300
     [java] 13:20:09.140 [main] INFO  [.pega.pegarules.serviceclient.ClientMain] - Initializing client Current Operation = EXPORT; Thread Pool Size = 5; RequestTimeOut = 300; TemporaryDirectory = C:\Users\APALANIS\AppData\Local\Temp\/PegaInstallTemp-05-May-2017-13.20.07
     [java] 13:20:09.150 [main] INFO  [viceclient.requestmanager.RequestManager] - Initializing Request Manager
     [java] 13:20:09.150 [main] INFO  [viceclient.requestmanager.RequestManager] - Initializing ExecutorService with pool size 5 
     [java] 13:20:09.160 [main] INFO  [viceclient.requestmanager.RequestManager] - Performing EXPORT with params [System Name = jenkins-SampleBuild-21 Parameters = {hotfix.async=true, expose.includeDescendents=true, getstatus.jobID=, export.async=false, expose.async=true, expose.excludedClasses=, export.productName=TestProduct, import.commitRate=100, expose.commitRate=100, import.existingInstances=skip, user.temp.dir=C:/pega_temp, expose.reindex=true, hotfix.operation=, expose.excludeDescendents=true, pega.rest.proxy.password=, import.nofailonerror=false, export.applicationVersion=, import.codesetVersion=06-01-01, pega.rest.proxy.username=, expose.includedClasses=,http://xx.xx.xx.xx pega.rest.server.url=http://xx.xx.xx.xx, expose.startKey=, expose.reindexType=nonpega, import.codesetName=Customer, pega.rest.password=Welcome@1, import.async=true, import.compileLibraries=true, hotfix.force=false, export.productVersion=01-01-01, import.allowImportWithMissingDependencies=false, pega.rest.username=apalanis, getstatus.operationName=, expose.endDate=, pega.rest.proxy.port=, pega.rest.proxy.workstation=, expose.endKey=, import.archive.path=, hotfix.dlFilePath=, export.archiveName=-.zip, import.mode=import, expose.startDate=, manageTrackedData.operation=, hotfix.bypassSchema=false, hotfix.catalogPath=, pega.rest.proxy.domain=, import.trackData=false, export.applicationName=, pega.rest.response.type=xml, pega.rest.proxy.host=}]
     [java]  
     [java] 13:20:11.372 [pool-2-thread-1] INFO  [egarules.serviceclient.rest.RestResponse] - jenkins-SampleBuild-21: Parsing response
     [java] 13:20:11.372 [pool-2-thread-1] INFO  [egarules.serviceclient.rest.RestResponse] - jenkins-SampleBuild-21: Parsing response of length 1336
     [java] 13:20:11.382 [pool-2-thread-1] INFO  [egarules.serviceclient.rest.RestResponse] - jenkins-SampleBuild-21: Parsing content of type text/html; charset=ISO-8859-1
     [java] 13:20:11.412 [main] INFO  [viceclient.requestmanager.RequestManager] - Request on system jenkins-SampleBuild-21 failed
     [java] 
     [java] Exception in thread "main" Operation EXPORT failed on jenkins-SampleBuild-21,
     [java] 	at com.pega.pegarules.serviceclient.ClientMain.executeAndHandleResponse(ClientMain.java:116)
     [java] 	at com.pega.pegarules.serviceclient.ClientMain.main(ClientMain.java:61)
     [java]                                        FAILED JOBS
     [java] --------------------------------------------------------------------------------------------
     [java] 
     [java] System Name         : jenkins-SampleBuild-21                                                                              
     [java] Job ID              :                                                                                                     
     [java] Status              :                                                                                                     
     [java] Error Messages      : HTTP/1.1 404 Not Found                                                                                                                                                                                  
     [java] --------------------------------------------------------------------------------------------
     [java] 13:20:11.452 [main] INFO  [viceclient.requestmanager.RequestManager] - Shutting down executor service
     [java] 13:20:11.452 [main] INFO  [viceclient.requestmanager.RequestManager] - Executor Service shutdown completed

BUILD FAILED
C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils\prpcserviceutilsWrapper.xml:172: The following error occurred while executing this line:
C:\Anandh\Project\DevOps\prpcServiceUtils\scripts\utils\prpcserviceutilsWrapper.xml:190: Java returned: 1

Total time: 4 seconds
Exiting with Error

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

 

Regards,

Anandh

May 19, 2017 - 10:56am
Response to Anandh Palanisamy

Hi Anandh,

Your REST server name has not been set, so you get a 404 - not found.

The log output shows what you have:

jenkins-SampleBuild-21.pega.rest.server.url=http://xxx.xx.xx

If you put the correct url then this should solve your problem.

David.

May 22, 2017 - 3:14pm
Response to DavidW1562

Hi David,

I have checked those web.xml entry , i have the below entry.

<servlet-mapping>
        <servlet-name>WebRestService</servlet-name>
        <url-pattern>/PRRestService/*</url-pattern>
    </servlet-mapping>

Do i need to check anything else, im using 7.2 to run this utility.

Regards,

Anandh
    

June 16, 2017 - 3:13pm

Hi All,

I found the issue and solution on the above issue, there is one issue on the prpcServiceUtils it will move the whole application only. Don't have a option to move ruleset alone.

Pega should come up with utility can used for ruleset move also.

Regards,

Anandh

September 14, 2017 - 9:38am
Response to Anandh Palanisamy

Hi Anand,

Which version of pega 7.x your using for the automation.

have you tried using prpcutils for CICD or it is not possible.

September 14, 2017 - 10:04am
Response to Anandh Palanisamy

Hi Anand,

Yes, prpcServiceUtils it will move the application only.