Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Oomph » [Solved] How to setup Gerrit Mylyn task repository and queries
[Solved] How to setup Gerrit Mylyn task repository and queries [message #1710889] Sat, 10 October 2015 11:54 Go to next message
Dieter Scholz is currently offline Dieter ScholzFriend
Messages: 15
Registered: May 2015
Junior Member
Hello,

I would like to integrate my Gerrit instance to my setup. But I failed to do so.

First of all I failed to include my user name and password. If I specify them in the setup file there are errors about not base64 encoded strings.

What should I enter for 'Connector kind'? Just 'gerrit'? What kind of attributes are available? How do I set them? Is there any documentation on this? Or can you provide me a link to relevant source files?

Lots of questions ... Very Happy Sorry.

A short explanation of how to setup such a task would be helpful.

Thanks in advance.

Dieter

[Updated on: Sun, 11 October 2015 12:08]

Report message to a moderator

Re: How to setup Gerrit Mylyn task repository and queries [message #1710893 is a reply to message #1710889] Sat, 10 October 2015 13:23 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
I'm not sure what you mean by your Gerrit instance. Is this an issue
for cloning. Look at some of the other setups to see how they specify
choices of URIs some of which support gerrit...

On 10/10/2015 1:54 PM, Dieter Scholz wrote:
> Hello,
>
> I would like to integrate my Gerrit instance to my setup. But I failed
> to do so.
>
> First of all I failed to include my user name and password. If I
> specify them in the setup file there are errors about not base64
> encoded strings.
>
> What should I enter for 'Connector kind'? Just 'gerrit'? What kind of
> attributes are available? How do I set them? Is there any
> documentation on this? Or can you provide me a link to relevant source
> files?
>
> Lots of questions ... :d Sorry.
>
> A short explanation of how to setup such a task would be helpful.
>
> Thanks in advance.
>
> Dieter


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to setup Gerrit Mylyn task repository and queries [message #1710895 is a reply to message #1710893] Sat, 10 October 2015 13:46 Go to previous messageGo to next message
Dieter Scholz is currently offline Dieter ScholzFriend
Messages: 15
Registered: May 2015
Junior Member
Hello Ed,

instance = server

Perhaps I should explain my scenario a little bit more:

I have a gerrit server with serveral projects. In my setup file I managed to clone my projects into my local git root directory using SSH. I was able to checkout the projects into my workspace.

So cloning is not an issue.

I would like my gerrit server to appear in the task repositories view. My problem is if I specify my user name and password in the setup file, an error message apears that my password is not base64 encoded. I tried to encode it but then another error message says it must be a multiple of 8 (the encoded string has a length of 16 ???). Another question is if "gerrit" is the correct type for the "connector kind"?

Next thing I want to do is to create a query on the gerrit task repository. What are the attributes I should/could use? Is there a list of valid attributes?

Thanks.

Dieter
Re: How to setup Gerrit Mylyn task repository and queries [message #1710897 is a reply to message #1710895] Sat, 10 October 2015 14:01 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33258
Registered: July 2009
Senior Member
Dieter,

I think I see. Will your clones push to Gerrit?

For passwords, it seems bad to ever put them directly in the setup.
Better you define a variable of type password and have the system prompt
you for it and save it in secure storage so you don't need to enter it
each time. Have a look at the password variables in the two project
catalogs.


On 10/10/2015 3:46 PM, Dieter Scholz wrote:
> Hello Ed,
>
> instance = server
>
> Perhaps I should explain my scenario a little bit more:
>
> I have a gerrit server with serveral projects. In my setup file I
> managed to clone my projects into my local git root directory using
> SSH. I was able to checkout the projects into my workspace.
>
> So cloning is not an issue.
>
> I would like my gerrit server to appear in the task repositories view.
> My problem is if I specify my user name and password in the setup
> file, an error message apears that my password is not base64 encoded.
> I tried to encode it but then another error message says it must be a
> multiple of 8 (the encoded string has a length of 16 ???). Another
> question is if "gerrit" is the correct type for the "connector kind"?
>
> Next thing I want to do is to create a query on the gerrit task
> repository. What are the attributes I should/could use? Is there a
> list of valid attributes?
>
> Thanks.
>
> Dieter


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: How to setup Gerrit Mylyn task repository and queries [message #1710930 is a reply to message #1710897] Sun, 11 October 2015 10:35 Go to previous messageGo to next message
Dieter Scholz is currently offline Dieter ScholzFriend
Messages: 15
Registered: May 2015
Junior Member
Hello Ed,

I got it working. For people with similar problems, I add the XML snippet:

  <setupTask
      xsi:type="mylyn:MylynQueriesTask"
      connectorKind="org.eclipse.mylyn.gerrit"
      repositoryURL="${URL of gerrit server}"
      userID="${eclipse.user.name}"
      password="${eclipse.user.password}">
    <query summary="open reviews">
      <attribute
          key="gerrit query type"
          value="all open changes"/>
      <attribute
          key="gerrit query project"/>
      <attribute
          key="gerrit query string"/>
    </query>
  </setupTask>


The reason it failed was that I used just 'gerrit' as connectorKind value, but it should be 'org.eclipse.mylyn.gerrit'. Now a task repository is created and the query is synchronizing.

One last question is still unclear to me:

What are the possible values for the query attributes for the Gerrit connector? Are these documented somewhere or is there some source code available where I can find these values?

By the way: Thank you very much for your excellent support, Ed!

Dieter
Re: How to setup Gerrit Mylyn task repository and queries [message #1710932 is a reply to message #1710930] Sun, 11 October 2015 11:12 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6692
Registered: July 2009
Senior Member
Am 11.10.2015 um 12:35 schrieb Dieter Scholz:
> One last question is still unclear to me:
>
> What are the possible values for the query attributes for the Gerrit connector? Are these documented somewhere or is
> there some source code available where I can find these values?
You can use the Net4j Introspector view to reflectively look at the internal dtata of any object that is selectable in
the workbench, such as an already configured Gerrit query. I use to install the introspector with this snippet:

<?xml version="1.0" encoding="UTF-8"?>
<setup.p2:P2Task
xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI"
xmlns:setup.p2="http://www.eclipse.org/oomph/setup/p2/1.0"
label="Net4j Utilities">
<requirement
name="org.eclipse.net4j.util.ui.feature.group"/>
<repository
url="http://download.eclipse.org/modeling/emf/cdo/updates/integration"/>
</setup.p2:P2Task>

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: How to setup Gerrit Mylyn task repository and queries [message #1710933 is a reply to message #1710932] Sun, 11 October 2015 12:07 Go to previous message
Dieter Scholz is currently offline Dieter ScholzFriend
Messages: 15
Registered: May 2015
Junior Member
Hello,

I will try this. Thanks.

Dieter
Previous Topic:[Solved] Add launch configurations to setup
Next Topic:ResourceCreation of .options file in Eclipse install Directory
Goto Forum:
  


Current Time: Mon Dec 09 04:14:07 GMT 2024

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

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

Back to the top