Jump to content

Continuous integration/Dev

shortcut: CI/dev
From mediawiki.org

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]

We have a bunch of instances in the wmflabs integration project. The instances in the integration project have their own puppet master on integration-puppetmaster01.integration.eqiad.wmflabs.

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

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://gerrit-test.wmflabs.org/gerrit Jenkins: http://gerrit-jenkins.wmflabs.org/

Gerrit

[edit]

Connection

[edit]

Gerrit is set to development mode so anyone can log in as any user.

To login :

You should now be logged in.

Gotcha: you will probably need to be added to a Gerrit group. The full list of admins is at http://gerrit-test.wmflabs.org/gerrit/#/admin/groups/1,members

Cloning repo and URL

[edit]

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

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

Examples:

git clone http://gerrit-test.wmflabs.org/gerrit/mediawiki/core
git clone http://gerrit-test.wmflabs.org/gerrit/mediawiki/core/vendor
git clone http://gerrit-test.wmflabs.org/gerrit/mediawiki/extensions/FirstExtension
git clone http://gerrit-test.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]

Connecting

[edit]

Create an account in Jenkins http://http://gerrit-jenkins.wmflabs.org/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 users is at http://http://gerrit-jenkins.wmflabs.org/asynchPeople/ or you can ping hashar.

Creating jobs

[edit]

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]

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 https://gerrit.wikimedia.org/r/integration/zuul
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

See also

[edit]