{"id":28502590,"url":"https://github.com/systemd/systemd-centos-ci","last_synced_at":"2025-07-20T21:37:05.896Z","repository":{"id":38375597,"uuid":"52275074","full_name":"systemd/systemd-centos-ci","owner":"systemd","description":"CI scripts for systemd upstream/downstream testing using the CentOS CI infrastructure","archived":false,"fork":false,"pushed_at":"2025-03-10T12:08:44.000Z","size":6056,"stargazers_count":10,"open_issues_count":5,"forks_count":16,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-07-05T11:42:54.835Z","etag":null,"topics":["centos","centos-ci","ci","continuous-integration","duffy","systemd"],"latest_commit_sha":null,"homepage":"https://jenkins-systemd.apps.ocp.ci.centos.org","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/systemd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.LGPL2.1","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-22T13:25:19.000Z","updated_at":"2025-04-04T02:19:36.000Z","dependencies_parsed_at":"2023-12-08T21:25:21.508Z","dependency_job_id":"518b889d-fe8e-4b85-b1b1-647d6e56d08f","html_url":"https://github.com/systemd/systemd-centos-ci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/systemd/systemd-centos-ci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fsystemd-centos-ci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fsystemd-centos-ci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fsystemd-centos-ci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fsystemd-centos-ci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/systemd","download_url":"https://codeload.github.com/systemd/systemd-centos-ci/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/systemd%2Fsystemd-centos-ci/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266204640,"owners_count":23892366,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos","centos-ci","ci","continuous-integration","duffy","systemd"],"created_at":"2025-06-08T16:30:52.162Z","updated_at":"2025-07-20T21:37:05.854Z","avatar_url":"https://github.com/systemd.png","language":"Shell","readme":"# About\n\nThis project contains code to build, install and test [systemd](https://github.com/systemd/systemd/)\non test machines provisioned from a pool provided by the [CentOS CI](https://wiki.centos.org/QaWiki/CI) project,\nusing their [Duffy](https://wiki.centos.org/QaWiki/CI/Duffy) API.\n\nAs of right now these scripts provide CI for [upstream](https://github.com/systemd/systemd)\non CentOS Stream 8 and Arch Linux, and for [RHEL downstream](https://github.com/redhat-plumbers)\non supported CentOS releases.\n\n# Structure\n\nThe main entrypoint is the `agent-control.py` script, which is responsible for\ngetting a provisioned machine from the Duffy pool, run the respective CI scripts,\nand gather results. To make this work with GitHub pull requests, the `jenkins/`\ndirectory contains *glue* scripts which generate a correct set of arguments for\nthe `agent-control.py` script for each PR.\n\nThe CI scripts are scattered among several directories:\n\n* `agent/`\n\n    Bootstrap and test runner scripts used to run tests directly on the provisioned\n    machines (i.e. for running tests on CentOS (Stream) X).\n\n* `common/`\n\n    Various *libraries* and support functions used by other scripts.\n\n* `jenkins/`\n\n    Scripts which are responsible for feeding `agent-control.py` correct parameters\n    based on data from the Jenkins GitHub plugin.\n\n    These scripts are used directly in the *Execute shell* step of each Jenkins job\n    in following manner:\n\n```bash\n#!/bin/sh\n\nset -e\n\ncurl -q -o runner.sh https://raw.githubusercontent.com/systemd/systemd-centos-ci/main/jenkins/runners/upstream-centos8.sh\nchmod +x runner.sh\n./runner.sh\n```\n\n* `utils/`\n\n    Various utility scripts used by the pipeline.\n\n* `vagrant/`\n\n    Setup, build, and test runner scripts to test systemd on other distributions than CentOS\n    using Vagrant VMs.\n\n# Pipelines\n\nJenkins instance: https://jenkins-systemd.apps.ocp.cloud.ci.centos.org/\n\n## Upstream on CentOS Stream 8 (upstream-centos8)\n\n```\nagent-control.py +-\u003e agent/bootstrap.sh +-\u003e reboot +-\u003e agent/testsuite.sh\n```\n\nTo test compatibility of the upstream systemd with older kernels, this job builds, installs, and\ntests an upstream PR on a CentOS Stream 8 baremetal machine.\n\nTo achieve this, `agent-control.py` runs `agent/bootstrap.sh` script to fetch, build, and install\nthe respective PR (along with other necessary dependencies), reboots the machine, and executes\n`agent/testsuite.sh` to to the actual testing.\n\n## Downstream (RHEL) on CentOS 7 and CentOS Stream 8/9 (rhelX-centosX)\n\nThe same worklflow as above, but for systemd in RHEL:\n\n  * [RHEL 7/CentOS 7](https://github.com/redhat-plumbers/systemd-rhel7)\n\n```\nagent-control.py +-\u003e agent/bootstrap-rhel7.sh +-\u003e reboot +-\u003e agent/testsuite-rhel7.sh\n```\n\n  * [RHEL 8/CentOS Stream 8](https://github.com/redhat-plumbers/systemd-rhel8)\n\n```\nagent-control.py +-\u003e agent/bootstrap-rhel8.sh +-\u003e reboot +-\u003e agent/testsuite-rhel8.sh\n```\n\n  * [RHEL 9/CentOS Stream 9](https://github.com/redhat-plumbers/systemd-rhel9)\n\n```\nagent-control.py +-\u003e agent/bootstrap-rhel9.sh +-\u003e reboot +-\u003e agent/testsuite-rhel9.sh\n```\n\n## Upstream on Arch Linux using Vagrant (upstream-vagrant-archlinux)\n\nTo achieve the exact opposite of the testing on CentOS Stream 8, this pipeline check the compatibility\nof systemd with the latest versions of kernel and other components. As the CentOS CI\npool provides only CentOS machines, this pipeline introduces an intermediary in form of\na [Vagrant](https://www.vagrantup.com) VM along with [vagrant-libvirt](https://github.com/vagrant-libvirt/vagrant-libvirt)\nplugin to spin up a virtual machine in which we do the actual testing.\n\n### Structure\n\nEach VM consists of two images: the base image (Vagrant Box) and a runtime image.\n\nVagrant Box templates are stored under `vagrant/boxes/` and the images themselves\nare rebuilt every few days by a separate job to keep the package set up-to-date,\nbut to not slow down the CI pipeline.\n\nThe templates for each VM used in the CI can be found in `vagrant/vagrantfiles/`.\nAs the majority of the current (single) Vagrantfile remains identical across several\ninstances of the VMs except for the bootstrap phase, the bootstrap scripts were\nseparated into their own directory - `vagrant/bootstrap_scripts/` and the Vagrantfile\nitself is now parametrized, to avoid code duplication.\n\nThe test scripts are in the `vagrant/test_scripts/` directory, and follow the\nsame naming convention as the bootstrap scripts above, except for being prefixed\nwith `test-`.\n\n### Pipeline\n\n```\nagent-control.py +-\u003e vagrant/vagrant-ci-wrapper.sh +-\u003e vagrant/vagrant-build.sh +-\u003e [reboot] +-\u003e vagrant/test_scripts/test-\u003cdistro\u003e-\u003ctype\u003e.sh\n                        +               ^                +                 ^\n                        |               |                |                 |\n                        v               +                v                 +\n                     vagrant/vagrant-setup.sh          vagrant/vagrantfiles/Vagrantfile_\u003cdistro\u003e\n                                                         +                 ^\n                                                         |                 |\n                                                         v                 +\n                                                       vagrant/bootstrap-scripts/\u003cdistro\u003e-\u003ctype\u003e.sh\n\n```\n\nThe pipeline consists of several steps (scripts):\n\n1. `vagrant/vagrant-ci-wrapper.sh`\n\n    This script acts as a bootstrap where it checks out the systemd repository\n    on a revision based on information passed down by the respective Jenkins\n    glue script, configures the underlying system for Vagrant (by calling\n    `vagrant/vagrant-setup.sh`) and the test suite, and starts the VM build process\n    by executing `vagrant/vagrant-build.sh`\n\n2. `vagrant/vagrant-build.sh`\n\n    Builds a *runtime* VM image based on the base one (Vagrant Box). The Vagrantfile\n    for each VM (`vagrant/vagrantfiles/`) can reference an external bootstrap script\n    (`vagrant/bootstrap_scripts/`) making itself reusable for multiple different\n    scenarios.\n\n    When the VM is built, the local systemd repo is mounted into it over NFS\n    and the bootstrap script is executed, which builds the checked out revision\n    and makes other necessary changes to the VM itself.\n\n    After this step the VM is rebooted (*reloaded* in the Vagrant terms) and the\n    test runner script (`vagrant/test_scripts/*.sh`) is executed inside.\n\n## Upstream on Arch Linux with sanitizers using Vagrant (upstream-vagrant-archlinux-sanitizers)\n\nTo tackle the question of security a little bit, this job does *almost* the same thing\nas the one above, but here systemd is compiled with [Address Sanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer)\nand [Undefined Behavior Sanitizer](https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html). In this\ncase we skip the *reboot* step of the pipeline, since we don't install the compiled\nsystemd revision anyway.\n\n## (Auxiliary) Rebuild the Vagrant images (vagrant-make-cache)\n\n```\nagent-control.py +-\u003e vagrant/vagrant-make-cache.sh\n```\n\nTo keep the images up-to-date but to not slow every CI pipeline down while doing so,\nthis job's sole purpose is to rebuild the base images (Vagrant Boxes) every few days\n(based on Jenkins cron) and upload it to the artifacts server, where it can be\nused by the respective Vagrantfile.\n\n## (Auxiliary) Mirror the Copr repo with CentOS (Stream) dependencies (reposync)\n\n```\nutils/reposync.sh\n```\n\nWe need a couple of newer dependencies for systemd on CentOS (Stream) to cover the most\nrecent features. For this we have a bunch of Copr repositories [0][1] with necessary packages.\n\n[0] https://copr.fedorainfracloud.org/coprs/mrc0mmand/systemd-centos-ci-centos8/ \\\n[1] https://copr.fedorainfracloud.org/coprs/mrc0mmand/systemd-centos-ci-centos9/\n\nHowever, we found out that the infrastructure Copr is running in is quite unreliable\nso a fair share of our jobs was failing just because they couldn't install dependencies.\nHaving a local mirror in the CentOS CI infrastructure definitely helps in this case and\nthe purpose of this script is to update it every few hours (again, using Jenkins cron).\n\n## (Auxiliary) CI for the CI repository (ci-build)\n\nTo make sure changes to this repository don't break the CI pipeline, this job\nprovides a way to run a specific revision of the CI scripts (from a PR) against\nthe main branch of the respective systemd repository.\n\nAs this requires twiddling around with various bits and knobs given which part\nof the CI pipeline we want to test (instead of just running everything and pointlessly\nwaiting many hours until it finishes), the job configuration is stored in the Jenkins\njob itself and thus requires access to the instance.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemd%2Fsystemd-centos-ci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsystemd%2Fsystemd-centos-ci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsystemd%2Fsystemd-centos-ci/lists"}