Software Factory configuration for the Fedora project.
Here are configured:
The Zuul CI configuration for Fedora is managed through 3 repositories:
fedora-project-config: this one.
fedora-zuul-jobs-config: A Zuul config repository to host sensitive Zuul config (e.g. jobs relying on secrets).
fedora-zuul-jobs: A Zuul untrusted repository to host non sensitive Zuul config.
Most of the Zuul config for Fedora is managed via the Dhall language. The rendering of the dhall program produces YAML files to be used by Zuul. YAML files are generated into the three repositories described above.
As a package maintainer who wishes to benefit from the Zuul CI, you need to add your packages to
You can add them manually or use the zuul-config-generator. It generates a new config file containing all missing packages of a given maintaner or group.
Replace the existing
resources/fedora-distgits.yaml with the newly generated file and submit a Pull Request to this repository.
zuulfmt are needed to render the Zuul configuration.
dhall-to-yaml runs (or adapt to your working environment)
dnf install -y dhall-json
zuulfmt runs (or adapt to your working environment)
python -mpip install --user zuulfmt
It is adviced to install the Dhall lang support for your IDE:
Run the following command to install (and/or reset to the last origin/HEAD) extra repositories.
fedora-zuul-jobs checkout in the parent directory.
git remote add fork ssh://firstname.lastname@example.org/forks/<username>/<repo>.git
First, ensure repositories are in the right state (all commands below assume working from the master branch):
git checkout master && git fetch origin && git reset --hard origin/master make update-jobs-repos
Second, add the required changes.
Then run the rendering.
[fedora@localhost fedora-project-config]$ make render /bin/dhall-to-yaml /home/fedora/bin/zuulfmt Rendering FZCI.dhall/fedora-zuul-jobs-config/jobs.dhall in ../fedora-zuul-jobs-config/zuul.d/jobs.yaml Rendering FZCI.dhall/fedora-zuul-jobs/jobs.dhall in ../fedora-zuul-jobs/zuul.d/jobs.yaml Rendering FZCI.dhall/fedora-zuul-jobs/nodesets.dhall in ../fedora-zuul-jobs/zuul.d/nodesets.yaml Rendering FZCI.dhall/fedora-zuul-jobs/templates.dhall in ../fedora-zuul-jobs/zuul.d/templates.yaml
In case of error, update your changes then run again the rendering.
Finally, create Pull Requests for each repositories that got an update from the rendering.
make check-updates # For each repo where this shows a diff then run: (here a change in fedora-zuul-jobs) pushd ../fedora-zuul-jobs git status git add -A . git commit -m"Add change for ..." git push fork master:pr-branch-on-fork
And open the PR on pagure.io.
If you don't have the support of Dhall in your IDE, you might want to check your edit with the type checker:
dhall <<< './FZCI.dhall/Branches.dhall'
If the type checker does not complain then nothing needs to be done into that file.
When edits are done on those repos then commits and push changes (as PR) then wait for CI result.
When a new fedora release is available, the
fedora-latest-* nodesets need to be updated.
Two changes are required:
Here are the required changes and example changes from a previous update.
Wait for the infra team to provide the new labels. For examples, here are the changes for f38:
latest-version value in Nodesets.dhall. For example, here is the change for f38:
make render command and update the fedora-zuul-jobs project. For example, here is the change for f38: