The series of commands shown below illustrates the process of building RPM packages with Jenkins.
sudo rm -rf /home/$USER/to-sign/
mkdir -p /home/$USER/to-sign/
copr-rpmbuild scm --clone-url [URL of git repo with package source] --chroot \
fedora-$(lsb_release -a | grep Release | cut -f2)-x86_64
sudo cp /var/lib/copr-rpmbuild/results/*.rpm /home/$USER/to-sign
rm -rf /var/lib/copr-rpmbuild/results
Once the RPM build finishes, a responsible team member then needs to connect to the build server via SSH in order to sign the completed RPM package using:
sudo rpmsign --addsign /path/to/to-sign/directory/*rpm
A tool such as
rsync should then be used to push the new packages to the mirror. After verifying the permissions are correct, run:
sudo createrepo_c --update /path/to/RPMs or SRPMs
on the mirror in order to update the proper RPM repository.