ci: Publish RPMs to dch Yum repo
This commit is contained in:
11
ci/Jenkinsfile
vendored
11
ci/Jenkinsfile
vendored
@@ -70,6 +70,17 @@ pipeline {
|
||||
}
|
||||
}
|
||||
|
||||
stage('Publish') {
|
||||
when {
|
||||
branch 'main'
|
||||
}
|
||||
steps {
|
||||
sshagent(['jenkins-repohost']) {
|
||||
sh '. ci/publish.sh'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
22
ci/publish.sh
Normal 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}/"
|
||||
Reference in New Issue
Block a user