donderdag 20 februari 2014

How to add your Hackergotchi to Planet Eclipse

I write this blog to test if my Hackergotchi appears on Planet Eclipse. Normally you ask the webmasters to insert your Hackergotchi into the relevant files but now that we have Gerrit, the only thing the webmasters need to do is to check the code and accept your patch.

This is how I added my own Hackergotchi to Planet Eclipse.



File a Bug
First I filed a bug against Community/PlanetEclipse.org. You do this by clicking on this link[1]. You also have to sign the CLA. You can do that from bugzilla.


Write down the bug number and the summary

Get your Gerrit password
Then you need to get your Gerrit password. You do this by clicking on this link[2] and sign on with your bugzilla e-mail address and password. After you have done this, a screen appears where you see your Gerrit credentials. Write them down.


Clone the git repository 
Go to the command line and surf to the place where you keep your git repos and type

git clone https://GERRIT_USER_HERE@git.eclipse.org/r/planeteclipse.org/planeteclipse.org

Then go into Eclipse, open the "Git Repository Exploring" perspective, click "Add an existing local git repository to this view" and pick the planet eclipse repository that you have just cloned.



Then import the "planet" project:

Changing the content 
Create a Hackergotchi. Mine is about 90x120 and you should also be in this range. Be creative. Make sure you have a transparent background. Once your Hackergotchi is created, open the package explorer and find the "planet" project. Then open the "output/images" directory and place your Hackergotchi in the "faces" directory. 

Then open the "eclipse/feeds/community.ini" file (open in text editor) and find the link to your blog. Then just below the entry, make sure to put the following content just below your blog entry. 

[http://industrial-tsi-wim.blogspot.com/feeds/posts/default/-/Eclipse]
name = Wim Jongman
face = wim.png
facewidth = 96
faceheight = 122

Your name should already be there and the "facewidth" and "faceheight" variables should exactly match the image dimensions. The "face" variable should exactly match the name of the image you placed in "output/images/faces".

Commit your changes 
Committing your changes to Gerrit requires some additional steps. First write down the bug number in the format I show here:

bug xxxxxx - bug summary


(click 1)
(click 2)

Click on the project and select "Team/Commit ...". You have to add a Gerrit change-id and you have to sign-off the change. Then press "Commit"

Push to Gerrit
Again go to the "Git Repository Exploring" perspective and right click on the planeteclipse.org repo. Then select "Push to Gerrit ...":


On the dialog that appears type "master" in the field that follows "refs/for" in "Gerrit Branch". Then in the Login dialog box you type in your Gerrit password.


When EGit congratulates you with the push, you will see a link that looks something like this:


You should also be able to find it in Gerrit under "My/Changes"

Go to the bug again and enter this link in a new comment.

Happy Hackergotchi,

Wim

5 opmerkingen:

  1. There has to be an easier way with Orion.

    BeantwoordenVerwijderen
  2. Thanks for this nice step-by-step instruction. It could also be used for contributing to other Eclipse projects that employ Gerrit, including the platform. Only the Git clone URL has to be replaced with the Gerrit Git URL of the project.

    Two comments: instead of cloning the Git repository via the command line and then using the "Git Repositories" view you can do this in one step via "File > Import > Git > Projects from Git > URI". "Add Change-Id" (click 1) is not required because pushing the commit will create a new Gerrit item and not refer to an existing one.

    BeantwoordenVerwijderen
  3. Deze reactie is verwijderd door de auteur.

    BeantwoordenVerwijderen