Automated Bodhi Pushes
Finally Signed-off-by: Mohan Boddu <mboddu@redhat.com>
This commit is contained in:
parent
a3ff99a825
commit
e267c1030c
4 changed files with 34 additions and 0 deletions
12
roles/bodhi2/backend/files/bodhi-automated-pushes.py
Normal file
12
roles/bodhi2/backend/files/bodhi-automated-pushes.py
Normal file
|
@ -0,0 +1,12 @@
|
|||
import requests
|
||||
import json
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
req = requests.get('https://bodhi.fedoraproject.org/composes/')
|
||||
bodhi_composes = req.json()
|
||||
|
||||
if len(bodhi_composes['composes']) == 0:
|
||||
bodhi_push_cmd = ["bodhi-push", "--username", "releng"]
|
||||
push = subprocess.Popen(bodhi_push_cmd, stdout=PIPE, stderr=PIPE, stdin=PIPE)
|
||||
push.stdin.write('y')
|
|
@ -264,6 +264,14 @@
|
|||
- bodhi
|
||||
- cron
|
||||
|
||||
- name: put bodhi-automated-pushes.py in place
|
||||
copy: src=bodhi-automated-pushes.py dest=/usr/local/bin/bodhi-automated-pushes.py mode=0755
|
||||
when: inventory_hostname.startswith('bodhi-backend01') and env == "production"
|
||||
tags:
|
||||
- config
|
||||
- bodhi
|
||||
- cron
|
||||
|
||||
- name: put update-fullfiletimelist in place
|
||||
copy: src="{{ files }}/scripts/update-fullfiletimelist" dest=/usr/local/bin/update-fullfiletimelist mode=0755
|
||||
when: inventory_hostname.startswith('bodhi-backend01') and env == "production"
|
||||
|
@ -288,6 +296,14 @@
|
|||
- bodhi
|
||||
- cron
|
||||
|
||||
- name: Set the bodhi-automated-pushes cron job
|
||||
template: src=bodhi-automated-pushes.cron.j2 dest=/etc/cron.d/bodhi-automated-pushes
|
||||
when: inventory_hostname.startswith('bodhi-backend01') and env == "production"
|
||||
tags:
|
||||
- config
|
||||
- bodhi
|
||||
- cron
|
||||
|
||||
- name: directory sizes update cron job.
|
||||
cron: name="directory-sizes-update" minute="30" hour="19" user="ftpsync"
|
||||
job="/usr/bin/find /pub/alt/ /pub/archive/ /pub/fedora-secondary/ /pub/fedora/ /pub/epel/ -type d ! -path '/pub/alt/screenshots/f21/source' | grep -v snapshot | /usr/bin/xargs -n 1 /usr/bin/du --exclude=.snapshot -sh > /tmp/DIRECTORY_SIZES.txt 2> /dev/null; cp /tmp/DIRECTORY_SIZES.txt /pub/"
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
{% if RelEngFrozen %}
|
||||
{{ '#' }}00 00 * * * apache /usr/local/bin/bodhi-automated-pushes.py
|
||||
{% else %}
|
||||
00 00 * * * apache /usr/local/bin/bodhi-automated-pushes.py
|
||||
{% endif %}
|
1
vars/all/RelEngFrozen.yaml
Normal file
1
vars/all/RelEngFrozen.yaml
Normal file
|
@ -0,0 +1 @@
|
|||
RelEngFrozen: False
|
Loading…
Add table
Add a link
Reference in a new issue