Page MenuHomePhabricator

Create new "Travis Bot" gerrit group
Closed, ResolvedPublic

Description

I'm prototyping travis integration for gerrit.

Code written is here: https://github.com/cscott/npm-travis

The idea is that a jenkins job will push to a temporary branch in gerrit in order to trigger a travis build, via the normal gerrit/github sync mechanism. (This is better than pushing directly to a branch on the github mirror, because "If true, replication will remove remote branches that are absent locally or invisible to the replication (for example read access denied via authGroup option)" according to ^demon, which means the temporary branch could be wiped out if replication happens while the travis build is running.)

I've tested this for the mw-ocg-bundler project, it seems to work well when run manually.

The plan is to integrate it into jenkins using a new 'wmftravis' wikitech user, which will have force-push permissions in gerrit only to refs/heads/npm-travis/* branches, and only for projects which use the npm-travis integration.

But project permissions can't be given to users, only to groups. Hence this bug: I'd like a "Travis Bot" gerrit group created, with 'wmftravis' as its only member (the latter for testing/debugging purposes). For a gerrit admin this can be done with https://gerrit.wikimedia.org/r/#/admin/create-group/ apparently.


Version: wmf-deployment
Severity: normal

Details

Reference
bz73334

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:52 AM
bzimport added a project: Gerrit.
bzimport set Reference to bz73334.
bzimport added a subscriber: Unknown Object (MLST).

I created the group [1], but I cannot find the wmftravis user.

https://wikitech.wikimedia.org/wiki/User:Wmftravis

says:

User account "Wmftravis" is not registered.

[1] https://gerrit.wikimedia.org/r/#/admin/groups/902,info

I created the gerrit user 'npmtravis'. (The name 'wmftravis' apparently violates some rule on account naming, so https://www.mediawiki.org/wiki/Developer_access wouldn't let me create a user with that name.)

(Thanks, christian, btw.)

So now I just need 'npmtravis' added to the group.

I added npmtravis to the group.

I merged these

https://gerrit.wikimedia.org/r/#/c/174161/
https://gerrit.wikimedia.org/r/#/c/176026/1

and we now have this user, home dir and private key on gallium and lanthanum, the jenkins slave prod servers

@lanthanum:/home/npmtravis/.ssh# file npmtravis_id_rsa
npmtravis_id_rsa: PEM RSA private key

4.0K -r-------- 1 npmtravis jenkins 3.2K Nov 26 19:05 npmtravis_id_rsa

@gallium:/home/npmtravis/.ssh# file npmtravis_id_rsa
npmtravis_id_rsa: PEM RSA private key

4.0K -r-------- 1 npmtravis zuul 3.2K Nov 26 19:00 npmtravis_id_rsa