It's all about the answers!

Ask a question

Hudson Jenkins build engine missing in plain java api


Steffen Kriese (381921) | asked Jun 03 '14, 10:08 a.m.
retagged Jul 02 '14, 3:11 a.m. by Colin Thorne (22421619)
I want to create a Jenkins build engine via plain java API.
When running this code against my RTC 4.0.6 server:
IBuildEngineTemplate[] buildEngineTemplates = BuildEngineConfigurationRegistry.getInstance().getBuildEngineTemplates();
            for(IBuildEngineTemplate buildEngineTemplate :  buildEngineTemplates)
            {
                System.out.println(buildEngineTemplate.getName());
                System.out.println(buildEngineTemplate.getId());
                System.out.println(buildEngineTemplate.getDescription());
               
            }
IBuildConfigurationElement[] buildConfigurationElements = BuildEngineConfigurationRegistry.getInstance().getBuildEngineConfigurationElements();           
            for(IBuildConfigurationElement buildConfigurationElement:  buildConfigurationElements)
            {
                System.out.println(buildConfigurationElement.getName());
                System.out.println(buildConfigurationElement.getDescription());
            }

I get the following output:
Jazz Build Engine
com.ibm.team.build.engine.jbe
This build engine registration represents a Jazz Build Engine or other process on a build machine that polls the repository for build requests.
General
General configuration such as the polling interval. This configuration is edited on the Overview tab of the build engine editor.
Properties
Generic properties that are available to build scripts. The properties are edited in the Properties section of the build engine editor.

for me this looks like there is only a JBE build engine template available.

When listing the build engine templates in the create new build engine wizard I have in addition the "Jazz Build Engine" also a Hudson/Jenkins build engine and a build forge engine listed. How can I create a Hudson/Jenkins Build engine in the plain java api?

One answer



permanent link
Colin Thorne (22421619) | answered Jul 01 '14, 9:50 a.m.
I used the instructions in this answer https://jazz.net/forum/questions/137478/possible-to-create-hudsonjenkins-build-def-via-api to be able to list the Hudson/Jenkins definition. In particular I added three jar files to my classpath which I found in my eclipse plugin directory:
com.ibm.rational.connector.hudson.client_1.0.400.v20130502_0139.jar
com.ibm.rational.connector.hudson.common_1.0.400.v20130430_2233.jar
com.ibm.rational.connector.hudson.ui_1.0.400.v20130502_0139.jar

Now I see an additional template:
Hudson/Jenkins Engine
com.ibm.rational.connector.hudson.engine.template
Create a representation of Hudson/Jenkins build system in RTC.

Your answer


Register or 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.