#
# Reference: https://kubernetes.io/docs/concepts/workloads/controllers/jobs-run-to-completion/
#
apiVersion: batch/v1
kind: Job
metadata:
  name: tworavens-test-runner
spec:
  backoffLimit: 4
  #
  # Delete job 100 seconds after it completes
  #
  # ttlSecondsAfterFinished: 100
  #
  # Keep pods for 5 minutes before removing
  #
  activeDeadlineSeconds: 300
  template:
    spec:
      containers:
      - name: tworavens-test-runner
        image: tworavens/tworavens-test-runner:latest
        env:
          - name: CYPRESS_TWO_RAVENS_BASE_URL
            value: http://2ravens.org
          - name: CYPRESS_TA3TA2_API_VERSION
            value: 2019.2.27
        # command: ["npm", "run", "--spec", "cypress/integration/two_ravens_test_01.js"]
        # command: ["perl",  "-Mbignum=bpi", "-wle", "print bpi(2000)"]
      restartPolicy: Never
