Software Factory configuration for the Fedora project.
Here are configured:
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
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
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.
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'
In fedora-zuul-jobs-config
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
In fedora-zuul-jobs
Then run:
cd zuul.d dhall-to-yaml --generated-comment --file jobs.dhall | zuulfmt > jobs.yaml
When edits are done on those repos then commits and push changes (as PR) then wait for CI result.
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.
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/