README.md

fedora-project-config

Software Factory configuration for the Fedora project.

Here are configured:

  • resources/: Git repositories to be listened by softwarefactory-project.io's Zuul.
  • zuul.d/: Zuul pipelines and base Zuul jobs for Fedora.
  • playbooks/: Ansible playbooks used by Zuul jobs.
  • tools/: Some addtionnal tooling.
  • FZCI.dhall: Dhall description of Fedora Resources to be used in Zuul job configuration.

Prepare your workspace to edit FZCI Dhall config

Clone sources

cd pagure.io
git clone https://pagure.io/fedora-project-config
git clone https://pagure.io/fedora-zuul-jobs-config
git clone https://pagure.io/fedora-zuul-jobs

Ensure tooling installed

Follow install Dhall section.

Then ensure the dhall-to-yaml process as expected.

cd fedora-zuul-jobs-config/zuul.d/
dhall-to-yaml --generated-comment --file jobs-unformated.yaml

Install zuul-fmt:

python3 -mpip install --user zuulfmt

Run zuul-fmt

cat jobs-unformated.yaml | zuulfmt > jobs.yaml

If both dhall-to-yaml and zuul-fmt succeeded then your are ready to move forward. But first remove rm -f jobs-unformated.yaml jobs.yaml.

Note that it is adviced to get a support for Dhall Lang into your IDE but at least you must have installed the dhall commands on you system.

Adding support for a Fedora Branch

Adding new branch definition

  • Edit file branches.dhall in order to add the <new-branch>.
  • The type checker will help you to fill the places where the <new-branch> handling must be done.

If you don't have the support of Dhall in your IDE, you might want to check your edit with the type checker:

cd fedora-project-config
dhall <<< './FZCI.dhall/Branches.dhall'

Update jobs from fedora-zuul-jobs-config

In fedora-zuul-jobs-config

  • Edit jobs.dhall to handle the <new-branch>. Again the type checker will help you.

If the type checker does not complain then nothing needs to be done into that file.

Then run:

cd zuul.d
dhall-to-yaml --generated-comment --file jobs.dhall | zuulfmt > jobs.yaml

Update jobs from fedora-zuul-jobs

In fedora-zuul-jobs

  • Edit jobs.dhall in order to ensure jobs will trigger in the <new-branch>. Again the type checker will help you.

Then run:

cd zuul.d
dhall-to-yaml --generated-comment --file jobs.dhall | zuulfmt > jobs.yaml

Push changes

When edits are done on those repos then commits and push changes (as PR) then wait for CI result.

Install Dhall

On Fedora 34

dnf install -y dhall dhall-json

Packages does not provide dhall-to-yaml command yet so you might want to install it via the upstream release.

Using upstream relase

curl -OL https://github.com/dhall-lang/dhall-haskell/releases/download/1.39.0/dhall-1.39.0-x86_64-linux.tar.bz2
tar -xf dhall-1.39.0-x86_64-linux.tar.bz2
cp bin/dhall ~/.local/bin/
curl -OL https://github.com/dhall-lang/dhall-haskell/releases/download/1.39.0/dhall-yaml-1.2.7-x86_64-linux.tar.bz2
tar -xf dhall-yaml-1.2.7-x86_64-linux.tar.bz2
cp bin/dhall-to-yaml ~/.local/bin/