Hi guys,

at our wonderful OsmoDevCon 2016 we have decided to give a Gerrit based 
workflow a try. Right now the components are set-up and we need to figure out 
where to start, how to integrate and then also how to migrate.


URL:

https://gerrit.osmocom.org will host our installation of Gerrit.



Authentication:

It is using the OpenID authentication scheme to register to it. I have found 
and massaged a redmine plugin to turn our redmine into an OpenID provider[1].



Set-up/ACLs:

There is a complex set of rules for ACLs. In terms of user branches it will be 
the easiest if they are located at "user/*" instead of our current "*" scheme. 
For a transition period we can continue to allow to push directly into gerrit 
as well.



Registering:

https://gerrit.osmocom.org/login, sign-in with your OpenID provider. And then 
set a username (this will be used for the git log-in). Register additional 
email addresses and install your ssh key.


Projects:

I have currently created "osmo-ci" for some CI scripts and Dockerfiles and 
started to play with it, e.g. using git to manage notifications of this project.


Jenkins:

http://jenkins.osmocom.org/jenkins/job/osmo-pcpap-gerrit/16/ is an example of a 
build triggered (and failed and reported as failure) to the Gerrit installation.

Tricks: 

$ git ls-remote gerrit
...
5f3b6b8472a319d8d1184266cf9f80b5dbb709b6        refs/changes/23/23/1

'23' the 'hashed' structure
'23' the actual change #23
'1'  the first patch

so one can use git fetch to fetch the patchset and browse

$ ssh -p 29418 [email protected] gerrit --help



Next:

We need to pick some projects to start with. I would propose to start with 
libosmocore and OpenBSC or one of the two.


Approach:

Regardless of what we start with the approach would be:

* Create project on Gerrit
* Make current code available to gerrit
* Set-up jenkins integration
* Remove all but gerrit's push right for this specific repository
* Set-up replication



What is missing:

* Which projects to migrate when
* Gerrit / Jenkins integration
* Gerrit => git.osmocom.org replication (and github?)
* Additional build jobs (with docker). Decision if we 
* Group set-up if we want fine-grained review per project. I think we can start 
without.
* Create wiki page/documentation


sorry, the mail is a bit too long.

holger




[1] Don't trust it as your general ID provider, but you might prefer using it 
for gerrit instead of yahoo or canonical. The URL is 
https://osmocom.org/openid. The heavy lifting is done by a ruby library (which 
has some DH code.. but I didn't see a configure knob to change the prime.. so 
probably everyone is using 
https://openid.net/specs/openid-authentication-2_0.html#pvalue?

Reply via email to