Continuous integration/Dev

From MediaWiki.org
Jump to: navigation, search
shortcut: CI/dev

We have setup an instance in labs that ships with Gerrit/Zuul and has its job defined in Jenkins Job Builder. It can be used as a playground area to test changes we are not confident enough in deploying straight to production.

Setup[edit | edit source]

We have a single instance in the wmflabs integration project : integration-dev.eqiad.wmflabs. The instances in the integration project have their own puppet master on integration-puppetmaster.

Puppet manifests are applied to install Gerrit, Jenkins and Zuul with appropriate settings. The inst

Note: Gerrit is installed via the Debian package unlike production which is using a custom war.

A web proxy is setup in front of the instance. The URL entry points are:

Gerrit: http://integration.wmflabs.org/gerrit/ Jenkins: http://integration.wmflabs.org/ci/

Gerrit[edit | edit source]

Connection[edit | edit source]

Gerrit is not hooked with the labs LDAP, instead you could use OpenID, a Google Account or a Yahoo Id.

To login with a Google account (such as your @wikimedia.org):

  • browse to http://integration.wmflabs.org/gerrit/
  • Click Sign In at the top right
  • On the new page click Sign in with a Google Account
  • Due to a bug in or a misconfiguration of Gerrit you will get a non existent page. You will have to manually enter /gerrit/ in the URL:
-http://integration.wmflabs.org/login/q/status:open...
+http://integration.wmflabs.org/gerrit/login/q/status:open...
                                ^^^^^^^

You should now be logged in.

Gotcha: you will probably need to be added to a Gerrit group. Hashar is a known admin. Full list at http://integration.wmflabs.org/gerrit/#/admin/groups/1,members

Cloning repo and URL[edit | edit source]

The repositories are available using http://integration.wmflabs.org/gerrit/

Full list of projects: http://integration.wmflabs.org/gerrit/#/admin/projects/

Examples:

git clone http://integration.wmflabs.org/gerrit/mediawiki/core
git clone http://integration.wmflabs.org/gerrit/mediawiki/core/vendor
git clone http://integration.wmflabs.org/gerrit/mediawiki/extensions/FirstExtension
git clone http://integration.wmflabs.org/gerrit/mediawiki/extensions/SecondExtension

They are not the real repositories but dummy ones meant for testing. The .gitreview files might be correct.

Jenkins[edit | edit source]

Connecting[edit | edit source]

Create an account in Jenkins http://integration.wmflabs.org/ci/signup with a unique password and a valid email address. Then you will have to ask to be granted write access on the instance. A list of user is at http://integration.wmflabs.org/ci/asynchPeople/ , else you can ping hashar.

Creating jobs[edit | edit source]

The jobs are generated using Jenkins job builder with the integration/jenkins-job-builder-config.git labs branch.

Simply create a new JJB ini file as detailed on CI/JJB.

The jobs are very simple.

Note we might be missing some plugins on the labs instance.


Zuul[edit | edit source]

Zuul is configured via the puppet class role::zuul::labs.

We run a different version than the one in production which is in integration/zuul.git in the labs branch. It has a few specific commits which are force pushed by hashar from time to time. You probably do not want to mess with it.

To have any idea of the commit difference you can:

git clone ssh://gerrit.wikimedia.org:29418/integration/zuul.git
cd zuul
git log origin/master...wikimedia/labs

The triple dot find the common ancestor.

Just like in production, Zuul logs are in /var/log/zuul