blob: a6719c715986ad7bbaaf1126014d282465d30e5e [file] [log] [blame]
Alanny Lopezd1bb5b32017-09-20 11:32:40 -05001apiVersion: batch/v1
2kind: Job
3metadata:
4 name: openbmc${BUILD_ID}-${target}
5 namespace: ${namespace}
6 labels:
7 app: openbmc
8 stage: build
9spec:
10 template:
11 metadata:
Alanny Lopez1246b032018-02-24 23:34:55 -060012 name: ${pod_name}
Alanny Lopezd1bb5b32017-09-20 11:32:40 -050013 labels:
14 target: ${target}
15 spec:
16 nodeSelector:
17 beta.kubernetes.io/arch: ${ARCH}
18 volumes:
Alanny Lopeza6b7d4b2017-10-19 09:58:25 -050019 - name: workspace
Alanny Lopezd1bb5b32017-09-20 11:32:40 -050020 persistentVolumeClaim:
Alanny Lopez1246b032018-02-24 23:34:55 -060021 claimName: ${w_claim}
22 - name: ssc-dir
Alanny Lopezd1bb5b32017-09-20 11:32:40 -050023 persistentVolumeClaim:
Alanny Lopez1246b032018-02-24 23:34:55 -060024 claimName: ${s_claim}
Alanny Lopezd1bb5b32017-09-20 11:32:40 -050025 restartPolicy: Never
26 hostNetwork: True
27 containers:
Alanny Lopez1246b032018-02-24 23:34:55 -060028 - image: ${img_name}
Alanny Lopezd1bb5b32017-09-20 11:32:40 -050029 name: builder
30 command: ["/bin/bash","-c"]
31 args: ["sleep 2h"]
32 workingDir: ${HOME}
33 env:
34 - name: WORKSPACE
35 value: ${WORKSPACE}
Alanny Lopez1246b032018-02-24 23:34:55 -060036 - name: build-dir
37 value: ${build_dir}
Alanny Lopezd1bb5b32017-09-20 11:32:40 -050038 securityContext:
39 capabilities:
40 add:
41 - SYS_ADMIN
42 volumeMounts:
Alanny Lopeza6b7d4b2017-10-19 09:58:25 -050043 - name: workspace
44 mountPath: ${HOME}/workspace
Alanny Lopez1246b032018-02-24 23:34:55 -060045 - name: ssc-dir
46 mountPath: ${ssc_dir}
Alanny Lopezd1bb5b32017-09-20 11:32:40 -050047 imagePullSecrets:
Alanny Lopez1246b032018-02-24 23:34:55 -060048 - name: ${img_pl_sec}