Build feature project via buckminster / commandline / jenkins

463 views
Skip to first unread message

Jan Thielemann

unread,
Jun 10, 2013, 6:20:42 AM6/10/13
to idem...@googlegroups.com
Hello guys,
i have a jenkins build server which is building idempiere on a daily base. I also created some plugins and fragments for our customers. Moreover i have created a feature project so i can export the fragments and plugins. I now want my jenkins to build this feature. 

The thing is, all plugins, fragmens and feature projects are in separate repositories due to http://wiki.idempiere.org/en/Developing_plug-ins_without_affecting_the_trunk . How would i build/export the feature with buckminster on the command line or in jenkins? Any suggestions? Any hint is appreciated.


Kind regards
Jan

Ivy Michels

unread,
Jun 14, 2013, 3:53:41 PM6/14/13
to idem...@googlegroups.com
Hello Jan,

I'm  trying several ways without success...

i really don't know how to build with buckminster headless the workspace as I did inside eclipse, following the wiki developing plug-ins without affecting the trunk... 

the main problem is, how to merge both idempiere repos and my own repos inside a job, and make all this visible to Buckminster... 

did you get some more info on doing that ?

BR

Ivy

Ivy Michels

unread,
Jun 14, 2013, 4:01:45 PM6/14/13
to idem...@googlegroups.com
One more detail...

Inside Eclipse I changed the Buckminster log level to see if some info could be used... and this is what I got:

start org.ivymichels.server-feature:eclipse.feature$1.0.0.qualifier#site.p2]
target.arch=x86_64
buckminster.component=org.ivymichels.server-feature
qualifier.replacement.*=generator:buildTimestamp
workspace.root=/home/ivy/ivymichels/sources/workspace/idempiere
buckminster.temp=/home/ivy/tmp/org.ivymichels.server-feature_1.0.0-eclipse.feature/temp
buckminster.home=/home/ivy/ivymichels/sources/workspace/ivymichels-saas/org.ivymichels.server-feature/
buckminster.output=/home/ivy/buckminster.output/org.ivymichels.server-feature_1.0.0-eclipse.feature
buckminster.temp.root=/home/ivy/tmp
localhost=MyLaptop
generator.buildTimestamp.format='v'yyyyMMdd-HHmm
buckminster.component.type=eclipse.feature
buckminster.version=1.0.0.qualifier
target.nl=en_US
target.ws=gtk
eclipse.home=/home/ivy/ivymichels/applications/eclipse
buckminster.output.root=/home/ivy/buckminster.output
target.os=linux
target.location=/home/ivy/ivymichels/sources/workspace/idempiere/targetPlatform


it looks like to be the buckminster command/properties but i'm not good enought to translate and use that inside jenkins  :(

Jan Thielemann

unread,
Jun 17, 2013, 4:04:27 AM6/17/13
to idem...@googlegroups.com
Hi Ivy, 
i managed to build my plug-ins with buckminster and jenkins. Unfortunately i only can build features/plug-ins but not fragments. As soon as i put a fragment in my feature, the build fails. I'm still trying to figure out whats going wrong. Once i am able to build everything (Features with plug-ins and fragments) i'll create a pictured tutorial in the developing plugins section of the wiki. Until i finish this, if you only want to build plug-ins i can give you some advice if you want

Ivy Michels

unread,
Jun 17, 2013, 9:42:51 AM6/17/13
to idem...@googlegroups.com
Hi Jan,

Firstly as I forgot to mention in earlier messages, your Wiki tutorials are very good! They helped me a lot! 

About Jenkins/Buckminster, I'm still trying but I'm still not able to configure the environment / workspace as I did at Eclipse to build my plug-ins. I don't have fragments, just plug-ins and features.

When you can, please send me some hints on building plug-ins with Jenkins/Buckminster... 

Tks!

Jan Thielemann

unread,
Jun 18, 2013, 8:50:21 AM6/18/13
to idem...@googlegroups.com
In your feature project, you have to create a cquery and a rmap like these:
.cquery:
<?xml version="1.0" encoding="UTF-8"?><cq:componentQuery xmlns:cq="http://www.eclipse.org/buckminster/CQuery-1.0" resourceMap="logvocatus.rmap">
    <cq:rootRequest name="org.evenos.logvocatusfeature" componentType="eclipse.feature"/>
    <cq:property key="target.arch" value="*"/>
    <cq:property key="target.os" value="*"/>
    <cq:property key="target.ws" value="*"/>
</cq:componentQuery>

.rmap:
<?xml version="1.0" encoding="UTF-8"?>
  <rm:locator searchPathRef="org.adempiere.server" failOnError="false"/>
  <rm:locator searchPathRef="workspace.bundle.jar" failOnError="false"/>
  <rm:locator searchPathRef="workspace.bundle.project" failOnError="false"/>
  <rm:locator searchPathRef="workspace.feature.project2"/>
  <rm:locator searchPathRef="workspace.feature.project"/>
  <rm:searchPath name="org.adempiere.server">
    <rm:provider componentTypes="osgi.bundle,eclipse.feature" readerType="p2" source="false" mutable="false">
      <rm:property key="buckminster.source" value="false"/>
      <rm:property key="buckminster.mutable" value="false"/>
      <rm:uri format="file:////opt/idempiere-builds/idempiere.p2/"/>
    </rm:provider>
  </rm:searchPath>
  <rm:searchPath name="workspace.bundle.project">
    <rm:provider componentTypes="osgi.bundle" readerType="local">
      <rm:uri format="{0}/{1}">
        <bc:propertyRef key="workspace.root"/>
        <bc:propertyRef key="buckminster.component"/>
      </rm:uri>
    </rm:provider>
  </rm:searchPath>
  <rm:searchPath name="workspace.bundle.jar">
    <rm:provider componentTypes="osgi.bundle" readerType="url" source="false" mutable="false">
      <rm:property key="buckminster.source" value="false"/>
      <rm:property key="buckminster.mutable" value="false"/>
      <rm:uri format="file:///{0}/lib/plugins/{1}_{2}.jar">
        <bc:replace>
          <bc:propertyRef key="workspace.root"/>
          <bc:match pattern="\s" replacement="%20"/>
        </bc:replace>
        <bc:propertyRef key="buckminster.component"/>
        <bc:propertyRef key="jar.version"/>
      </rm:uri>
    </rm:provider>
  </rm:searchPath>
  <rm:searchPath name="workspace.feature.project">
    <rm:provider componentTypes="eclipse.feature" readerType="local">
      <rm:uri format="{0}/{1}-feature">
        <bc:propertyRef key="workspace.root"/>
        <bc:propertyRef key="buckminster.component"/>
      </rm:uri>
    </rm:provider>
  </rm:searchPath>
  <rm:searchPath name="workspace.feature.project2">
    <rm:provider componentTypes="eclipse.feature" readerType="local">
      <rm:uri format="{0}/{1}">
        <bc:propertyRef key="workspace.root"/>
        <bc:propertyRef key="buckminster.component"/>
      </rm:uri>
    </rm:provider>
  </rm:searchPath>
</rm:rmap>

As you can see, i put a p2 repository for the idempiere server search path in it. this is a repository in which i compile idempiere itself on a daily base. Then in jenkins i use this buckminster command:

setpref targetPlatformPath="/var/lib/jenkins/workspace/iDempiere/targetPlatform"
import '${WORKSPACE}/org.evenos.logvocatusfeature/logvocatus.cquery'
perform org.evenos.logvocatusfeature:eclipse.feature#buckminster.clean
build -t
perform -D qualifier.replacement.*=generator:buildTimestamp -D generator.buildTimestamp.format=\'v\'yyyyMMdd-HHmm -D target.os=linux -D target.ws=gtk -D target.arch=x86 org.evenos.logvocatusfeature:eclipse.feature#site.p2
perform -D qualifier.replacement.*=generator:buildTimestamp -D generator.buildTimestamp.format=\'v\'yyyyMMdd-HHmm -D target.os=linux -D target.ws=gtk -D target.arch=x86_64 org.evenos.logvocatusfeature:eclipse.feature#site.p2

Please notice that /var/lib/jenkins/workspace is my general jenkins workspace. I have two projects on my jenkins, one for idempiere which build in /var/lib/jenkins/workspace/iDempiere and one for my plugins which i build in /var/lib/jenkins/workspace/Logvocatusfeature

I hope this gives you a little help. I'll create a complete step by step tutorial once i have figured out how to build the fragments. Unfortunately i am stuck on another topic which i have to solve first...

Ivy Michels

unread,
Jun 21, 2013, 10:37:05 AM6/21/13
to idem...@googlegroups.com
Jan,

Thanks for the tips...I'm traveling and I will be back to my office next week, so i'll try to configure as you said...

regards... 
Reply all
Reply to author
Forward
0 new messages