Templatize branched nightly cron

Instead of doing this by hand at branch and final release, let's
make it a template.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
This commit is contained in:
Adam Williamson 2024-11-27 09:44:45 -08:00
parent 71c9eab3d0
commit 91267d4d49
5 changed files with 11 additions and 5 deletions

View file

@ -18,6 +18,8 @@
vars_files:
- /srv/web/infra/ansible/vars/global.yml
- "/srv/web/infra/ansible/vars/all/00-FedoraCycleNumber.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraBranched.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraBranchedNumber.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraPreviousCycleNumber.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraPreviousPrevious.yaml"
- "/srv/web/infra/ansible/vars/all/FedoraPreviousPreviousCycleNumber.yaml"

View file

@ -1,3 +0,0 @@
# branched compose
# MAILTO=releng-cron@lists.fedoraproject.org
# 15 7 * * * root touch /tmp/fedora-compose-branched && TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && chmod 755 $TMPDIR && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f41 && /usr/local/bin/lock-wrapper branched-compose "LANG=en_US.UTF-8 ./nightly.sh" && sudo -u ftpsync /usr/local/bin/update-fullfiletimelist -l /pub/fedora-secondary/update-fullfiletimelist.lock -t /pub fedora fedora-secondary && rm /tmp/fedora-compose-branched

View file

@ -300,7 +300,7 @@
# put cron job in for branched compose
- name: Branched compose cron
ansible.builtin.copy:
ansible.builtin.template:
src: branched
dest: /etc/cron.d/branched
mode: "644"

View file

@ -0,0 +1,7 @@
# branched compose
# MAILTO=releng-cron@lists.fedoraproject.org
{% if FedoraBranched %}
15 7 * * * root touch /tmp/fedora-compose-branched && TMPDIR=`mktemp -d /tmp/branched.XXXXXX` && chmod 755 $TMPDIR && cd $TMPDIR && git clone https://pagure.io/pungi-fedora.git && cd pungi-fedora && git checkout f{{ FedoraBranchedNumber }} && /usr/local/bin/lock-wrapper branched-compose "LANG=en_US.UTF-8 ./nightly.sh" && sudo -u ftpsync /usr/local/bin/update-fullfiletimelist -l /pub/fedora-secondary/update-fullfiletimelist.lock -t /pub fedora fedora-secondary && rm /tmp/fedora-compose-branched
{% else %}
# No Branched at present, this space intentionally left blank
{% endif %}

View file

@ -28,7 +28,7 @@ Fedora N-2 (stable)
These are controlled by some variables:
00-FedoraCycleNumber.yaml - The current stable release
FedoraBranchedBodhi.yaml - If bodhi is enabled, If it's prebeta or postbeta
FedoraBranchedBodhi.yaml - If bodhi is enabled, whether it's preenable, prebeta, postbeta or current
FedoraBranchedNumber.yaml - The current branched release, or 0 if it doesnt exist
FedoraBranched.yaml - true if there is a branched, false otherwise
FedoraPreviousCycleNumber.yaml - number of previous stable release