Add script to refresh koschei groups based on dist-git groups
This commit is contained in:
parent
551ea4ec3f
commit
24e916c2cf
3 changed files with 10 additions and 0 deletions
7
roles/koschei/backend/files/koschei-refresh-disgit-group
Normal file
7
roles/koschei/backend/files/koschei-refresh-disgit-group
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#!/bin/bash
|
||||||
|
if [ "$#" -ne 2 ]; then
|
||||||
|
echo "Usage: refresh-group <group-name> <distgit-group-name>"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
set -e
|
||||||
|
curl -s "https://src.fedoraproject.org/api/0/group/${2}?projects=1" | jq -r '.projects[].name' | koschei-admin edit-group "${1}" --content-from-file - --append
|
|
@ -6,6 +6,7 @@
|
||||||
- koschei-backend-fedora
|
- koschei-backend-fedora
|
||||||
- koschei-backend-copr
|
- koschei-backend-copr
|
||||||
- postgresql
|
- postgresql
|
||||||
|
- jq
|
||||||
tags:
|
tags:
|
||||||
- koschei
|
- koschei
|
||||||
- packages
|
- packages
|
||||||
|
@ -105,6 +106,7 @@
|
||||||
mode=755
|
mode=755
|
||||||
with_items:
|
with_items:
|
||||||
- koschei-refresh-group
|
- koschei-refresh-group
|
||||||
|
- koschei-refresh-distgit-group
|
||||||
- koschei-refresh-module
|
- koschei-refresh-module
|
||||||
tags:
|
tags:
|
||||||
- koschei
|
- koschei
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
SHELL=/bin/bash
|
SHELL=/bin/bash
|
||||||
MAILTO=sysadmin-koschei-members@fedoraproject.org
|
MAILTO=sysadmin-koschei-members@fedoraproject.org
|
||||||
0 0-23/3 * * * koschei /usr/local/bin/koschei-refresh-group php 'php*'
|
0 0-23/3 * * * koschei /usr/local/bin/koschei-refresh-group php 'php*'
|
||||||
|
5 0-23/3 * * * koschei /usr/local/bin/koschei-refresh-distgit-group rust-sig rust-sig
|
||||||
|
|
||||||
# I'd use dnf clean, but it leaves stuff behind
|
# I'd use dnf clean, but it leaves stuff behind
|
||||||
5 1 * * * koschei rm -rf /var/tmp/dnf-koschei-*
|
5 1 * * * koschei rm -rf /var/tmp/dnf-koschei-*
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue