---
apiVersion: batch/v1beta1
kind: CronJob
metadata:
  name: update-older
  labels:
    name: dtcheck.update
    # The toolforge=tool label will cause $HOME and other paths to be mounted from Toolforge
    toolforge: tool
spec:
  schedule: "0 9 * * *"
  jobTemplate:
    spec:
      template:
        metadata:
          labels:
            toolforge: tool
        spec:
          containers:
          - name: bot
            workingDir: /data/project/dtcheck/public_html
            image: docker-registry.tools.wmflabs.org/toolforge-ruby25-sssd-base:latest
            args:
            - ruby
            - update.rb
            - "14"
            env:
            - name: HOME
              value: /data/project/dtcheck
          restartPolicy: OnFailure
