Pagure CI is a continuous integration tool using which the PR on the projects can be tested and flaged with the status of the build.
Pagure Project Name Jenkins Project Name Jenkins Token Jenkins Url All of which are required field.
Jenkins configuration is the most important part of how the Pagure CI works, after you login to your Jenkins Instance.
Build Authorization Root Plugin Git Plugins Notification Plugin
FORMAT: JSON PROTOCOL: HTTP EVENT: Job Finalized URL: <The POST URL that Jenkins form returned> TIMEOUT: 3000 LOG: 1
Example Script
if [ -n "$REPO" -a -n "$BRANCH" ]; then git remote rm proposed || true git remote add proposed "$REPO" git fetch proposed git checkout origin/master git config --global user.email "you@example.com" git config --global user.name "Your Name" git merge --no-ff "proposed/$BRANCH" -m "Merge PR" fi
Pagure CI requires fedmsg to run since it uses a consumer to get messages and take appropriate actions. The dependency that is required is fedmdg-hubs. For that the steps are given.
To install the dependencies required:
dnf install fedmsg-hub
fedmsg apart from the consumer require a file that tells to which cosumer it should listen to. This file basically enable the consumer in PagureCI/. For doing that, we need to place this file in appropriate directory.
sudo cp pagure/fedmsg.d/pagure_ci.py /etc/fedmsg.d/
Since the deployment is done using rpm, the next step is covered using setup.py which binds the consumer with the environment, this is done while building the rpm so if rpm is already built this is not explicitly required.
python setup.py install
Run the service:
sudo systemctl enable fedmsg-hub.service
sudo systemctl start fedmsg-hub.service