Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Buckminster » Dynamic branchToTag in cquery
Dynamic branchToTag in cquery [message #669229] Mon, 09 May 2011 14:25 Go to next message
Eclipse UserFriend
Originally posted by: Holger Schmid

Hello,

our development strategy uses svn with a lot of branching. All branches
shall be build and tested on a CI-Server (e.g. Jenkins).

To build our application, we are using the following build.cquery with
one advisor node:

---- build.cquery ----
<cq:componentQuery ... resourceMap="build.rmap">
<cq:rootRequest name="..." componentType="eclipse.feature" />
<cq:advisorNode namePattern="^my.plugin(\..+)?"
useTargetPlatform="false" branchTag="myBranch" />
</cq:componentQuery>
----------------------

The build.rmap looks has a svn provider:

---- build.rmap ----
<rmap>
<searchPath name="svn">
:
<uri
format=" http://user:passwd@svnServer/trunk/{0}?moduleAfterTag&am p;moduleAfterBranch">
<bc:propertyRef key="buckminster.component" />
</uri>
</searchPath>
<locator ... />
</rmap>
--------------------

This works fine as long as the value for branchTag in the cquery is
hard-coded.

Now the problem:
as we do have a lot of branches, we would like to use the same cquery
for all of our branches in order to get our product built and tested on
the CI-Server. What we would like to do is to set the value of the
branchTag using properties when calling the import for our headless
buckminster build:

e.g. change the branchTag in the cquery to:

<cq:componentQuery ... resourceMap="build.rmap">
:
<cq:advisorNode ... branchTag="${branch}" />
</cq:componentQuery>

Invoke the import for the headless build on Jenkins:
import -D branch=myBranch $WORKSPACE/build.cquery

Unfortuantly, this however does not work - we are receiving the
following errors during materialization:
:
my.feature: branch myBranch rejected: not in '${branch}'
my.feature: branch someOtherBranch rejected: not in '${branch}'
:

It looks like ${branch} has not been correctly replaced by "myBranch".
Do you have any solution to get this running?

Best regards,
Holger
Re: Dynamic branchToTag in cquery [message #669344 is a reply to message #669229] Tue, 10 May 2011 01:20 Go to previous messageGo to next message
Henrik Lindberg is currently offline Henrik LindbergFriend
Messages: 2509
Registered: July 2009
Senior Member
Did you consider putting the variability into the rmap instead?
I think you can do a lot more with variables there.

- henrik

On 5/9/11 4:25 PM, Holger Schmid wrote:
> Hello,
>
> our development strategy uses svn with a lot of branching. All branches
> shall be build and tested on a CI-Server (e.g. Jenkins).
>
> To build our application, we are using the following build.cquery with
> one advisor node:
>
> ---- build.cquery ----
> <cq:componentQuery ... resourceMap="build.rmap">
> <cq:rootRequest name="..." componentType="eclipse.feature" />
> <cq:advisorNode namePattern="^my.plugin(\..+)?"
> useTargetPlatform="false" branchTag="myBranch" />
> </cq:componentQuery>
> ----------------------
>
> The build.rmap looks has a svn provider:
>
> ---- build.rmap ----
> <rmap>
> <searchPath name="svn">
> :
> <uri
> format=" http://user:passwd@svnServer/trunk/{0}?moduleAfterTag&am p;moduleAfterBranch">
>
> <bc:propertyRef key="buckminster.component" />
> </uri>
> </searchPath>
> <locator ... />
> </rmap>
> --------------------
>
> This works fine as long as the value for branchTag in the cquery is
> hard-coded.
>
> Now the problem:
> as we do have a lot of branches, we would like to use the same cquery
> for all of our branches in order to get our product built and tested on
> the CI-Server. What we would like to do is to set the value of the
> branchTag using properties when calling the import for our headless
> buckminster build:
>
> e.g. change the branchTag in the cquery to:
>
> <cq:componentQuery ... resourceMap="build.rmap">
> :
> <cq:advisorNode ... branchTag="${branch}" />
> </cq:componentQuery>
>
> Invoke the import for the headless build on Jenkins:
> import -D branch=myBranch $WORKSPACE/build.cquery
>
> Unfortuantly, this however does not work - we are receiving the
> following errors during materialization:
> :
> my.feature: branch myBranch rejected: not in '${branch}'
> my.feature: branch someOtherBranch rejected: not in '${branch}'
> :
>
> It looks like ${branch} has not been correctly replaced by "myBranch".
> Do you have any solution to get this running?
>
> Best regards,
> Holger
Re: Dynamic branchToTag in cquery [message #669374 is a reply to message #669344] Tue, 10 May 2011 06:21 Go to previous message
Eclipse UserFriend
Originally posted by: Holger Schmid

Hello Henrik,

thanks for your response.

Do you have an idea how to put this variability into the rmap. I was
thinking about setting up the uri for the svn provider but this is quite
limited as the resolve mechanism for the svn provider expects "trunk" in
the uri-template and then determines the correct uri of using the
branchToTag value from the cquery. But mayby thats's the wrong way...

Thanks,
Holger

Am 10.05.2011 03:20, schrieb Henrik Lindberg:
> Did you consider putting the variability into the rmap instead?
> I think you can do a lot more with variables there.
>
> - henrik
>
> On 5/9/11 4:25 PM, Holger Schmid wrote:
>> Hello,
>>
>> our development strategy uses svn with a lot of branching. All branches
>> shall be build and tested on a CI-Server (e.g. Jenkins).
>>
>> To build our application, we are using the following build.cquery with
>> one advisor node:
>>
>> ---- build.cquery ----
>> <cq:componentQuery ... resourceMap="build.rmap">
>> <cq:rootRequest name="..." componentType="eclipse.feature" />
>> <cq:advisorNode namePattern="^my.plugin(\..+)?"
>> useTargetPlatform="false" branchTag="myBranch" />
>> </cq:componentQuery>
>> ----------------------
>>
>> The build.rmap looks has a svn provider:
>>
>> ---- build.rmap ----
>> <rmap>
>> <searchPath name="svn">
>> :
>> <uri
>> format=" http://user:passwd@svnServer/trunk/{0}?moduleAfterTag&am p;moduleAfterBranch">
>>
>>
>> <bc:propertyRef key="buckminster.component" />
>> </uri>
>> </searchPath>
>> <locator ... />
>> </rmap>
>> --------------------
>>
>> This works fine as long as the value for branchTag in the cquery is
>> hard-coded.
>>
>> Now the problem:
>> as we do have a lot of branches, we would like to use the same cquery
>> for all of our branches in order to get our product built and tested on
>> the CI-Server. What we would like to do is to set the value of the
>> branchTag using properties when calling the import for our headless
>> buckminster build:
>>
>> e.g. change the branchTag in the cquery to:
>>
>> <cq:componentQuery ... resourceMap="build.rmap">
>> :
>> <cq:advisorNode ... branchTag="${branch}" />
>> </cq:componentQuery>
>>
>> Invoke the import for the headless build on Jenkins:
>> import -D branch=myBranch $WORKSPACE/build.cquery
>>
>> Unfortuantly, this however does not work - we are receiving the
>> following errors during materialization:
>> :
>> my.feature: branch myBranch rejected: not in '${branch}'
>> my.feature: branch someOtherBranch rejected: not in '${branch}'
>> :
>>
>> It looks like ${branch} has not been correctly replaced by "myBranch".
>> Do you have any solution to get this running?
>>
>> Best regards,
>> Holger
>
Previous Topic:Doing a jdk5 build with jdk6, best practises?
Next Topic:product.ant fails (missing req), pde product export works
Goto Forum:
  


Current Time: Sat Apr 20 00:38:26 GMT 2024

Powered by FUDForum. Page generated in 0.03406 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top