No longer package rabbit-openqa but add gocd config for it

This commit is contained in:
Stephan Kulow 2019-03-20 06:44:46 +01:00
parent eb8a2265df
commit 67df42770d
5 changed files with 118 additions and 37 deletions

View File

@ -326,18 +326,6 @@ Requires: osc >= 0.159.0
%description -n osc-plugin-vdelreq
OSC plugin to check for virtually accepted request, see `osc vdelreq --help`.
%package rabbit-openqa
Summary: Sync openQA Status Into OBS
Group: Development/Tools/Other
BuildArch: noarch
Requires: osc >= 0.159.0
Requires: python2-openqa_client
Requires: python2-pika
%description rabbit-openqa
Bot listening to AMQP bus and syncs openQA job status into OBS for
staging projects
%prep
%setup -q
@ -452,14 +440,6 @@ fi
%postun pkglistgen
%systemd_postun
%pre rabbit-openqa
getent passwd osrt-rabbit-openqa > /dev/null || \
useradd -r -m -s /sbin/nologin -c "user for openSUSE-release-tools-rabbit-openqa" osrt-rabbit-openqa
exit 0
%postun rabbit-openqa
%systemd_postun
%files
%defattr(-,root,root,-)
%doc README.md
@ -511,7 +491,6 @@ exit 0
%exclude %{_datadir}/%{source_dir}/osc-staging.py
%exclude %{_datadir}/%{source_dir}/osc-vdelreq.py
%exclude %{_datadir}/%{source_dir}/update_crawler.py
%exclude %{_datadir}/%{source_dir}/rabbit-openqa.py
%dir %{_sysconfdir}/openSUSE-release-tools
%files devel
@ -660,12 +639,6 @@ exit 0
%{_unitdir}/osrt-pkglistgen@.service
%{_unitdir}/osrt-pkglistgen@.timer
%files rabbit-openqa
%defattr(-,root,root,-)
%{_bindir}/osrt-rabbit-openqa
%{_datadir}/%{source_dir}/rabbit-openqa.py
%{_unitdir}/osrt-rabbit-openqa.service
%files -n osclib
%defattr(-,root,root,-)
%{_datadir}/%{source_dir}/osclib

118
gocd/monitors.gocd.yaml Normal file
View File

@ -0,0 +1,118 @@
format_version: 3
pipelines:
openSUSE.openQA:
group: Monitors
lock_behavior: unlockWhenFinished
timer:
spec: 0 */5 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
branch: master
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 0
resources:
- staging-bot
tasks:
- script: |-
./gocd/rabbit-openqa.py -A https://api.opensuse.org
SUSE.openQA:
group: Monitors
lock_behavior: unlockWhenFinished
timer:
spec: 0 */5 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
git:
git: https://github.com/openSUSE/openSUSE-release-tools.git
branch: master
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 0
resources:
- staging-bot
tasks:
# endless loop
- script: |-
./gocd/rabbit-openqa.py -A https://api.suse.de
SUSE.Repo.Monitor:
group: Monitors
lock_behavior: unlockWhenFinished
timer:
spec: 0 */5 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
branch: master
destination: scripts
osc:
git: https://github.com/openSUSE/osc.git
branch: python3
destination: osc
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 0
resources:
- staging-bot
tasks:
# endless loop
- script: |-
git config --global user.email "coolo@suse.de"
git config --global user.name "GoCD Repo Monitor"
git clone git://botmaster.suse.de/suse-repos.git
cd suse-repos
ls -l
export PYTHONPATH=../osc:/usr/share/openSUSE-release-tools
python3 ../scripts/gocd/rabbit-repoid.py -A https://api.suse.de SUSE:SLE-15-SP1:GA
openSUSE.Repo.Monitor:
group: Monitors
lock_behavior: unlockWhenFinished
timer:
spec: 0 */5 * ? * *
environment_variables:
OSC_CONFIG: /home/go/config/oscrc-staging-bot
materials:
scripts:
git: https://github.com/openSUSE/openSUSE-release-tools.git
branch: master
destination: scripts
osc:
git: https://github.com/openSUSE/osc.git
branch: python3
destination: osc
stages:
- Run:
approval:
type: manual
jobs:
Run:
timeout: 0
resources:
- staging-bot
tasks:
# endless loop
- script: |-
git config --global user.email "coolo@suse.de"
git config --global user.name "GoCD Repo Monitor"
git clone git://botmaster.suse.de/opensuse-repos.git
cd opensuse-repos
export PYTHONPATH=../osc:/usr/share/openSUSE-release-tools
python3 ../scripts/gocd/rabbit-repoid.py -A https://api.opensuse.org openSUSE:Factory openSUSE:Leap

View File

@ -1,10 +0,0 @@
[Unit]
Description=openSUSE Release Tools: Sync openQA status
[Service]
User=osrt-rabbit-openqa
ExecStart=/usr/bin/osrt-rabbit-openqa
Restart=on-failure
[Install]
WantedBy=multi-user.target