Hello,

I'm writing to this list to share about a proof of concept me and my team are setting up. The goal of the POC is to show that Zuul, OpenStack's code gating system [1], can be used to automate RPM-related jobs for Fedora's CI.

We've managed to implement the following workflows:

* Run jobs when PRs are opened/changed on a Pagure instance. Recently Zuul added support for Pagure events so we were able to set up some packaging jobs on Zuul triggered by PRs on src.fedoraproject.org. There are three jobs attached:
** The first job runs a scratch build on Koji and shares artifacts (rpms) with two child jobs.
** The first child job runs a rpm lint.
** The second child job runs the functional tests included in the package.

Here [2] you can see a PR where those Zuul jobs ran. More details can be found here [3].

* Run jobs when PRs are opened/changed that depend on others PRs. A packager is able to tell Zuul that a PR depends on others PRs by using the "Depends-On:" keyword in the PR's initial message. The artifacts from dependent PRs are available on a PR's job's workspace as well; in [4] the python-mock RPM from the dependent PR is used when building python-redis.

* Run jobs when a package is built on Koji. The idea is to listen to the fedmsg queue, waiting for the topic "buildsys.build.state.change", run the configured Zuul jobs, and finally publish the jobs' results on fedmsg. At the moment we are able to run a linter job each time a package is built, but we don't publish the results on fedmsg. Here is the list of the most recent linter job results [5]. More details can be found here [6].

We started that POC because we think Zuul offers a lot of useful features [1] like handling PR dependencies that could be of interest to the Fedora project. The POC has shown some working workflows but now we need insights from people who know what the needs of Fedora's CI are. Let us know your thoughts, and we will be happy to extend the POC and onboard anybody wanting to experiment with Zuul in that context.

Regards,
Fabien Boucher


[1] https://fedoraproject.org/wiki/Zuul-based-ci#What_is_Zuul
[2] https://src.fedoraproject.org/rpms/python-gear/pull-request/5
[3] https://fedoraproject.org/wiki/Zuul-based-ci#Pagure_PR_tests_via_Zuul
[4] https://stg.pagure.io/python-redis-distgit/pull-request/1
[5] https://fedora.softwarefactory-project.io/zuul/t/fedora-staging/builds?job_name=rpm-lint
[6] https://fedoraproject.org/wiki/Zuul-based-ci#Buildsys_build_validation_via_AMQP_and_Zuul