docs sync: adjust cron jobs and rsync script

Right now we update translation files once a day at 22:00UTC.
So, it makes no sense to generate the translated docs more often than
once a day after that update. So, that cron moves to 23:00UTC.
The en cron can be once per hour, run it before sync.

Finally, adjust the docs-rsync script so it's actually idempotent,
and only transfers as much as it needs to.

Signed-off-by: Kevin Fenzi <kevin@scrye.com>
This commit is contained in:
Kevin Fenzi 2020-06-23 10:05:41 -07:00
parent 5a0fd14679
commit 41ca654628
3 changed files with 5 additions and 5 deletions

View file

@ -1,9 +1,9 @@
#!/bin/sh
/usr/bin/rsync -aSHPv -OJ --size-only --compare-dest /srv/web/docs-redirects/ --compare-dest /srv/web/docs-old.fedoraproject.org/public_html/ --compare-dest /srv/web/docs-combined/ --delete --delete-excluded --exclude=.git --exclude='copying.tmp/' sundries01::docs/ /srv/web/docs.fedoraproject.org/
/usr/bin/rsync -aSHPv -OJ --size-only --compare-dest /srv/web/docs.fedoraproject.org --compare-dest /srv/web/docs-old.fedoraproject.org/public_html/ --compare-dest /srv/web/docs-combined/ --delete --delete-excluded --exclude=.git --exclude='copying.tmp/' sundries01::docs-redirects/ /srv/web/docs-redirects/
/usr/bin/rsync -aH --link-dest /srv/web/docs-redirects/ --link-dest /srv/web/docs-old.fedoraproject.org/public_html/ --link-dest /srv/web/docs-combined/ --delete --delete-excluded --delete-after --exclude=.git --exclude='copying.tmp/' sundries01::docs/ /srv/web/docs.fedoraproject.org/
/usr/bin/rsync -aH --link-dest /srv/web/docs.fedoraproject.org --link-dest /srv/web/docs-old.fedoraproject.org/public_html/ --link-dest /srv/web/docs-combined/ --delete --delete-excluded --delete-after --exclude=.git --exclude='copying.tmp/' sundries01::docs-redirects/ /srv/web/docs-redirects/
# build the combined docs tree.
# See https://pagure.io/fedora-infrastructure/issue/7130
rsync -aH --delete --exclude=.git /srv/web/docs.fedoraproject.org/ /srv/web/docs-redirects/ /srv/web/docs-old.fedoraproject.org/public_html/ /srv/web/docs-combined/
rsync -aH --delete --delete-after --exclude=.git /srv/web/docs.fedoraproject.org/ /srv/web/docs-redirects/ /srv/web/docs-old.fedoraproject.org/public_html/ /srv/web/docs-combined/

View file

@ -4,7 +4,7 @@ metadata:
name: cron-translated
spec:
concurrencyPolicy: Forbid
schedule: "0 * * * *"
schedule: "0 23 * * *"
jobTemplate:
spec:
template:

View file

@ -4,7 +4,7 @@ metadata:
name: cron
spec:
concurrencyPolicy: Forbid
schedule: "0 * * * *"
schedule: "50 * * * *"
jobTemplate:
spec:
template: