Add relpkg support
- Add script to run relpkg - Add systemd service and timer - Change SLSA user - Only run pkglistgen when build finishes
This commit is contained in:
parent
5ba60b7b26
commit
b9d76698cf
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ include Makefile.common
|
|||||||
|
|
||||||
pkgdata_BINS = $(shell find * -maxdepth 0 -executable -type f)
|
pkgdata_BINS = $(shell find * -maxdepth 0 -executable -type f)
|
||||||
pkgdata_SCRIPTS=$(wildcard *.py *.pl *.sh)
|
pkgdata_SCRIPTS=$(wildcard *.py *.pl *.sh)
|
||||||
pkgdata_SCRIPTS+=findfileconflicts publish_distro verify-build-and-generatelists gocd/verify-repo-built-successful.py
|
pkgdata_SCRIPTS+=findfileconflicts publish_distro generate-release-packages verify-build-and-generatelists gocd/verify-repo-built-successful.py
|
||||||
pkgdata_DATA+=bs_copy metrics osclib pkglistgen $(wildcard *.pm *.testcase)
|
pkgdata_DATA+=bs_copy metrics osclib pkglistgen $(wildcard *.pm *.testcase)
|
||||||
VERSION = "build-$(shell date +%F)"
|
VERSION = "build-$(shell date +%F)"
|
||||||
|
|
||||||
|
7
generate-release-packages
Executable file
7
generate-release-packages
Executable file
@ -0,0 +1,7 @@
|
|||||||
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
|
LOG_DIR="/var/log/openSUSE-release-tools/$1"
|
||||||
|
|
||||||
|
[ ! -d "${LOG_DIR}" ] && mkdir ${LOG_DIR}
|
||||||
|
|
||||||
|
/usr/bin/osrt-pkglistgen -A $API_URL update_and_solve -p SUSE:SLE-15-SP4:GA -s target --only-release-packages --force > ${LOG_DIR}/relpkggen-$(date -Is).log 2>&1
|
@ -1,5 +1,5 @@
|
|||||||
[Service]
|
[Service]
|
||||||
User=sysuser
|
User=openSUSE-release-tools
|
||||||
SyslogIdentifier=sysuser
|
SyslogIdentifier=openSUSE-release-tools
|
||||||
EnvironmentFile=/etc/openSUSE-release-tools/ibsapi
|
EnvironmentFile=/etc/openSUSE-release-tools/ibsapi
|
||||||
ExecStart=/usr/bin/osrt-verify-build-and-generatelists %i
|
ExecStart=/usr/bin/osrt-verify-build-and-generatelists %i
|
6
systemd/osrt-relpkggen@.service
Normal file
6
systemd/osrt-relpkggen@.service
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
[Service]
|
||||||
|
User=openSUSE-release-tools
|
||||||
|
SyslogIdentifier=openSUSE-release-tools
|
||||||
|
EnvironmentFile=/etc/openSUSE-release-tools/ibsapi
|
||||||
|
ExecStart=/usr/bin/osrt-generate-release-packages %i
|
||||||
|
RuntimeMaxSec=120 hour
|
7
systemd/osrt-relpkggen@.timer
Normal file
7
systemd/osrt-relpkggen@.timer
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
[Timer]
|
||||||
|
OnBootSec=120
|
||||||
|
OnCalendar=hourly
|
||||||
|
Unit=osrt-relpkggen@.service
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=timers.target
|
@ -1,8 +1,9 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
LOG_DIR="/var/log//openSUSE-release-tools/$1"
|
LOG_DIR="/var/log/openSUSE-release-tools/$1"
|
||||||
|
|
||||||
[ ! -d "${LOG_DIR}" ] && mkdir ${LOG_DIR}
|
[ ! -d "${LOG_DIR}" ] && mkdir ${LOG_DIR}
|
||||||
|
|
||||||
/usr/share/openSUSE-release-tools/verify-repo-built-successful.py -A $API_URL -p $1 -r standard > ${LOG_DIR}/verify-build.log 2>&1
|
if /usr/share/openSUSE-release-tools/verify-repo-built-successful.py -A $API_URL -p $1 -r standard > ${LOG_DIR}/verify-build-$(date -Is).log 2>&1 ; then
|
||||||
/usr/bin/osrt-pkglistgen -A $API_URL --debug update_and_solve -p $1 -s target --force > ${LOG_DIR}/pkglistgen.log 2>&1
|
/usr/bin/osrt-pkglistgen -A $API_URL --debug update_and_solve -p $1 -s target --force > ${LOG_DIR}/pkglistgen-$(date -Is).log 2>&1
|
||||||
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user