30 lines
679 B
YAML
30 lines
679 B
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
metadata:
|
|
generateName: job-<proj>-<env>-<job>-
|
|
spec:
|
|
backoffLimit: 0
|
|
ttlSecondsAfterFinished: 120
|
|
template:
|
|
spec:
|
|
restartPolicy: Never
|
|
volumes:
|
|
- name: work
|
|
emptyDir: {}
|
|
initContainers:
|
|
- name: git-clone
|
|
image: alpine/git:2.45.2
|
|
args: ["clone","--depth=1","https://github.com/ORG/REPO.git","/work"]
|
|
volumeMounts:
|
|
- name: work
|
|
mountPath: /work
|
|
containers:
|
|
- name: run
|
|
image: python:3.12-slim
|
|
workingDir: /work
|
|
command: ["python","main.py"]
|
|
volumeMounts:
|
|
- name: work
|
|
mountPath: /work
|