'Automate IBM ODM RuleApp build from Git using Jenkins
I need to build the ODM RuleApp as below
- Decision Service and Java XOM project is in Git
- Build the RuleApp through Jenkins from Git
- The created jar file is to be uploaded to Nexus using Jenkins
To achieve the above, I see that there is an option to build project using command line as specified in the IBM ODM knowledge center https://www.ibm.com/docs/en/odm/8.10?topic=command-building-projects-build-line
The option without Maven, says, there are 2 steps
- Writing configuration file
- Building projects
My questions:
Should I put the configurations(properties) file in Git at the root level of the projects? In other words, if there is a folder called ODM and within this I commit my Decision Service and Java XOM project, then my configuration file should be directly under “ODM”… is it correct? The example given for configuration file is as below. I believe these 4 lines are enough to build my RuleApp along with XOM. I have no extension models.
project = ../HelloWorld/Hello Main Service/ output = ../HelloWorld/output dep = simple dep xom-classpath = XOM jars/hello-xom-1.0.0.jar
For building the RuleApp, I see the following command java -jar Build_Command_Line_executable_archive -config configuration_file
For example: java -jar rules-compiler/rules-compiler.jar -config samples/config-files/CustomRuleModel.properties
I read that… For each deployment configuration that is referenced by the configuration file, the command builds a RuleApp as a stand-alone archive in the specified output folder. The name of this file comes from the RuleApp name specified in the deployment configuration.
a. Where should I place rules-compiler.jar?
b. Is Jenkins referring to the .properties (CustomRuleModel.properties) file in Git? Is this not under the root folder?
c. Where is this output folder created? How can I move the created RuleApp .jar file to Nexus through Jenkins?
d. Is there any configuration required at Jenkins for building the ODM RuleApp? Any specific configuration for Nexus?
I have no insights into Git and Nexus and looking for some detailed guidance. Kindly help.
Thanks,
Solution 1:[1]
Several remarks : I suggest to use the maven compiler instead of the rule compiler command as it is simpler to use. https://www.ibm.com/docs/en/odm/8.10?topic=SSQP76_8.10.x/com.ibm.odm.dserver.rules.designer.run/build_topics/con_buildcmd_prep_env.html
Regarding your questions, if you use that maven plugin :
- a) plugin should be installed in your maven repo
- b) can you precise the question ?
- c) output folder is in target
- d) you can deploy the generated ruleset using the Rule Execution Server REST API (using a curl)
Best Emmanuel
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 |