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>
30 lines
790 B
YAML
30 lines
790 B
YAML
apiVersion: batch/v1beta1
|
|
kind: CronJob
|
|
metadata:
|
|
name: cron
|
|
spec:
|
|
concurrencyPolicy: Forbid
|
|
schedule: "50 * * * *"
|
|
jobTemplate:
|
|
spec:
|
|
template:
|
|
metadata:
|
|
labels:
|
|
parent: "cronjobbuild"
|
|
spec:
|
|
containers:
|
|
- name: build-english
|
|
image: docker-registry.default.svc:5000/docsbuilding/builder:latest
|
|
env:
|
|
- name: BUILD_ENV
|
|
value: "{{ env_short }}"
|
|
volumeMounts:
|
|
- name: build-output
|
|
mountPath: /antora/output
|
|
readOnly: false
|
|
restartPolicy: Never
|
|
startingDeadlineSeconds: 600
|
|
volumes:
|
|
- name: build-output
|
|
persistentVolumeClaim:
|
|
claimName: docs-storage
|