[QA] getting tests configured for a particular repository

Loic Dachary loic at dachary.org
Thu Jul 28 17:25:45 UTC 2016


Hi,

On 28/07/2016 18:22, Bryan Davis wrote:
> On Wed, Jul 27, 2016 at 10:34 AM, Loic Dachary <loic at dachary.org> wrote:
>> Hi,
>>
>> I'd like to get tests configured for a particular gerrit repository hosting a wikidata bot. Is there a document or an example I could read to know more about it ? The bot I'm writing is about 50 lines of code[1] but I'd like to go in the right direction from the start, even before actually getting a gerrit repository for it ;-)
>>
>> Cheers
>>
>> [1] https://www.wikidata.org/wiki/Wikidata:Requests_for_permissions/Bot#FLOSSbot
> 
> I sent you to this list and then you got no responses. :(

It has only been 24h ;-)

> The CI project page on mediawiki.org [0] is probably the place to
> start hunting for docs. The Tutorials [1] sub-page looks promising at
> first but then leads to quite a few stubs that could use some
> attention.
> 
> We use Jenkins Job Builder [2] to generate Jenkins configuration and
> Zuul [3] to fire off jobs based on changes uploaded to Gerrit. Most
> (all?) of the configuration is in the integration/config repo [4]. My
> understanding is that the tooling has been heavily inspired by how the
> OpenStack project manages their CI pipeline.

Yes. IIRC jenkins & jjb were abandonned recently and OpenStack CI now runs solely on Zuul.

> * If your code is written in PHP then using a composer.json with a
> "test" command entry is probably the easiest thing to get wired up.
> See the CDB library for a basic example [5].
> * For Python, using tox is the current best practice. An example of
> that can be seen in the operations/docker-images/toollabs-images repo
> [6].
> * There are also pre-made job templates for running `bundle exec rake
> test` (Ruby), `npm test` (Node), and `maven clean package` (Java).
> 
> [0]: https://www.mediawiki.org/wiki/Continuous_integration
> [1]: https://www.mediawiki.org/wiki/Continuous_integration/Tutorials
> [2]: https://www.mediawiki.org/wiki/Continuous_integration/Jenkins_job_builder
> [3]: https://www.mediawiki.org/wiki/Continuous_integration/Zuul
> [4]: https://github.com/wikimedia/integration-config
> [5]: https://github.com/wikimedia/cdb/blob/master/composer.json
> [6]: https://github.com/wikimedia/operations-docker-images-toollabs-images/blob/master/tox.ini

These are great pointers ! I'm exploring https://phabricator.wikimedia.org/diffusion/CICF now and reading the docs. I think I can figure out how operations-docker-images-toollabs-images/blob/master/tox.ini is run and also what installs the system requirements (docker, mediawiki instance etc.).

Thanks :-)

> 
> Bryan
> 

-- 
Loïc Dachary, Artisan Logiciel Libre



More information about the QA mailing list