ci: Publish RPMs to dch Yum repo

This commit is contained in:
2025-11-16 07:09:35 -06:00
parent 7f673e3b5a
commit 663a2976ad
3 changed files with 35 additions and 0 deletions

11
ci/Jenkinsfile vendored
View File

@@ -70,6 +70,17 @@ pipeline {
}
}
stage('Publish') {
when {
branch 'main'
}
steps {
sshagent(['jenkins-repohost']) {
sh '. ci/publish.sh'
}
}
}
}
}
}

View File

@@ -2,7 +2,9 @@
xargs dnf install -y --setopt install_weak_deps=0 <<EOF
kernel-devel
openssh-clients
rpm-build
rpm-sign
rsync
util-linux
EOF

22
ci/publish.sh Normal file
View File

@@ -0,0 +1,22 @@
#!/bin/sh
ARCH="$(uname -m)"
REPO_HOST=jenkins@files.pyrocufflink.blue
REPO_PATH=/srv/www/repohost/repos/dch/fedora/$(rpm --eval %fedora)
case "${ARCH}" in
x86_64)
# only include the SRPM once
include='*.rpm'
;;
*)
include="*.${ARCH}.rpm"
;;
esac
rsync -rtiO \
--chmod=ugo=rwX \
--include "${include}" \
--exclude '*' \
./ \
"${REPO_HOST}:${REPO_PATH}/"