1
0
Fork 0

Compare commits

..

2 Commits

Author SHA1 Message Date
Dustin 7ae316c9a1 wip: ci
infra/dch-selinux/pipeline/head This commit looks good Details
2023-10-26 08:30:13 -05:00
Dustin f82eb54e02 Add RPM spec 2023-10-26 08:30:13 -05:00
2 changed files with 13 additions and 16 deletions

View File

@ -16,6 +16,9 @@ SPEC = dch-selinux.spec
RPM = dch-selinux-$(VERSION)-$(RELEASE).$(ARCH).rpm
SRPM = dch-selinux-$(VERSION)-$(RELEASE).src.rpm
GITEA_URL = https://git.pyrocufflink.net
GITEA_ORG = infra
define buildpp
$(MAKE) NAME=$(NAME) -f /usr/share/selinux/devel/Makefile
endef
@ -65,16 +68,14 @@ endif
mock -r '$(MOCKTARGET)' $(SRPM)
cp -a /var/lib/mock/$(MOCKTARGET)/result/*.noarch.rpm .
publish: repo
ifeq ($(PUBLISH_HOST),)
$(error PUBLISH_HOST and PUBLISH_PATH are required)
publish: $(RPM)
ifeq ($(GITEA_USERNAME),)
$(error GITEA_USERNAME and GITEA_PASSWORD are required)
endif
rsync -rtiO --delete $(REPO)/ $(PUBLISH_HOST):$(PUBLISH_PATH)
repo:
mkdir -p '$(REPO)'
cp *.rpm '$(REPO)'/
createrepo '$(REPO)'
curl -f \
'$(GITEA_URL)/api/packages/$(GITEA_ORG)/rpm/upload' \
-u '$(GITEA_USERNAME):$(GITEA_PASSWORD)' \
-T $<
rpm: $(RPM)

10
ci/Jenkinsfile vendored
View File

@ -1,10 +1,6 @@
// vim: set sw=4 ts=4 sts=4 et :
pipeline {
environment {
GITEA_URL = 'https://git.pyrocufflink.net'
}
agent {
kubernetes {
yamlFile 'ci/podTemplate.yaml'
@ -23,10 +19,10 @@ pipeline {
steps {
withCredentials([usernamePassword(
credentialsId: 'jenkins-packages',
usernameVariable: 'USERNAME',
passwordVariable: 'PASSWORD',
usernameVariable: 'GITEA_USERNAME',
passwordVariable: 'GITEA_PASSWORD',
)]) {
sh 'curl -f -u "${USERNAME}:${PASSWORD}" -T *.rpm ${GITEA_URL}/api/packages/infra/rpm/upload'
sh 'make publish'
}
}
}