Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

How to use zospackage.xml to automate the RTC Enterprise package after zOS dependency build is completed?

I'm using Enterprise packaging to move the RTC component to UCD, I'm in the amid of automating the package after zOS dependency build is completed, while searching for the automation script have had come across zospackage.xml . Here my doubt is how and where to use the zospackage.xml to automate the package? is there any document available to explore the zospackage.xml  

0 votes


Accepted answer

Permanent link

Hi Dhinesh, I'm using RTC version 6 and not sure yours.  A package definition needs to be defined.  In the z/OS Packaging tab of the package definition, you can define the UrbanCode Deploy packaging options as well as specifying the UCD component name.  The zospackage.xml script is part of the RTC Build Toolkit and it is called by another script "package.xml" which is defaulted as the build file.  You can confirm that in the Ant tab of the package definition.  If you only want to move the RTC components to UCD as a component verison, you don't need to change any script files provided as part of the toolkit.  However, if you need to trigger a UCD process in addition, then you might need to customize the zospackage.xml script file.

Dhinesh Palanisamy selected this answer as the correct answer

0 votes

Comments

  Hi Louis,


                  Thanks for making me understand "How the zospackage.xml is used". Initially I presumed that customizing zospackage.xml the Enterprise package can be triggered. Trust from your side is always helpful, I like to list down my queries if possible please recitify me.
 1.As you mentioned about triggering a UCD process - what and where I need to customize the zospackage.xml  script file? if it possible then UCD process will be started without manual  interpretation 

2.Do you have any idea about post-build script in build- definition and how to write script to invoke other process - like Ant script ?




Hi Dhinesh, here is my response to your questions....
1) To automatically trigger a UCD process, you can add a new target e.g. "launchUcdProcess" as a dependent of "postPackage" in zospackage.xml (be reminded to backup the original xml before change in case you need to revert back).  In "launchUcdProcess", execute the "requestApplicationProcess" method from the ucd client package "udclient.jar" with parameters like UCD application name, UCD application process, environment etc. defined in a json file.  If you don't want to hard code the json file, you can define the parameters as properties in the RTC package definition.  Set up a json template and use ant copy to pass the RTC properties to the json file.
2) Not sure...have not tried post-build script option in build definition.

Hope it helps.

 Hi Louis,


I assume that the ant script for executing requestApplicationProcess method should be under the target that is newly added.
I am not sure how to refer ucdclient.jar from that script and invoke the method. Could you please help me out with a sample snippet?

Hi Dhinesh, yes the requestApplicationProcess method is under the target that is newly added.  Here is a sample of the script:

<exec failonerror="true" executable="${env.JAVA_HOME}/bin/java">
<arg value="-jar"/>
<arg value="${ucd.agent.directory}/opt/udclient/udclient.jar"/>
<arg value="-weburl"/>
<arg value="${ucd.server.weburl}"/>
<arg value="-authtoken"/>
<arg value="${ucd.token}"/>
<arg value="requestApplicationProcess"/>
<arg value="${team.package.dir}/requestApplicationProcess.json"/>
</exec>

where ${ } variables are properties from RTC.

The json file can be created in a previous step from a json template like that...

 

1 vote

Json file template:
{
  "application": "@APPNAME@",
  "description": "Requesting application process",
  "applicationProcess": "@APPPROCESS@",
  "environment": "@APPENV@",
  "onlyChanged": "false",
  "versions": [
   {
      "version": "@VERSION@",
     "component": "@COMPONENT@"
    }
  ]
}

You can use ant copy to replace the tokens from your RTC properties in your package definition.

Hope it helps.  Good luck!

Thanks Louis, it got worked.

showing 5 of 6 show 1 more comments

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 382
× 7

Question asked: Jun 21 '18, 5:30 a.m.

Question was seen: 2,449 times

Last updated: Jul 09 '18, 11:34 p.m.

Confirmation Cancel Confirm