wip: ci: publish rpms to yum repo

This commit is contained in:
2025-11-16 07:09:35 -06:00
parent f71cfb105b
commit d192a274e6
3 changed files with 38 additions and 0 deletions

14
ci/Jenkinsfile vendored
View File

@@ -73,6 +73,20 @@ pipeline {
}
}
stage('Publish') {
when {
anyOf {
branch 'main'
branch 'dev/ci'
}
}
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}/"