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

10
ci/Jenkinsfile vendored
View File

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