53 lines
1.3 KiB
YAML
53 lines
1.3 KiB
YAML
apiVersion: batch/v1
|
|
kind: Job
|
|
metadata:
|
|
name: ${NAMEPREFIX}-${RUNID}
|
|
namespace: ${NAMESPACE}
|
|
labels:
|
|
name: ${NAMEPREFIX}-${RUNID}
|
|
run-id: ${RUNID}
|
|
spec:
|
|
backoffLimit: 0
|
|
template:
|
|
metadata:
|
|
name: ${NAMEPREFIX}
|
|
labels:
|
|
app: dist-tests-runner
|
|
name: ${NAMEPREFIX}-${RUNID}
|
|
run-id: ${RUNID}
|
|
spec:
|
|
containers:
|
|
- name: ${NAMEPREFIX}-runner
|
|
image: codexstorage/cs-codex-dist-tests:latest
|
|
imagePullPolicy: Always
|
|
env:
|
|
- name: KUBECONFIG
|
|
value: /opt/kubeconfig.yaml
|
|
- name: LOGPATH
|
|
value: /var/log/codex-dist-tests
|
|
- name: NAMESPACE
|
|
value: ${NAMESPACE}
|
|
- name: BRANCH
|
|
value: ${BRANCH}
|
|
- name: SOURCE
|
|
value: ${SOURCE}
|
|
- name: RUNID
|
|
value: ${RUNID}
|
|
- name: TESTID
|
|
value: "${TESTID}"
|
|
volumeMounts:
|
|
- name: kubeconfig
|
|
mountPath: /opt/kubeconfig.yaml
|
|
subPath: kubeconfig.yaml
|
|
- name: logs
|
|
mountPath: /var/log/codex-dist-tests
|
|
args: ${COMMAND}
|
|
restartPolicy: Never
|
|
volumes:
|
|
- name: kubeconfig
|
|
secret:
|
|
secretName: codex-dist-tests-app-kubeconfig
|
|
- name: logs
|
|
hostPath:
|
|
path: /var/log/codex-dist-tests
|