blob: 7f9c017c686601772e200e2dbbe8dcb25a0c7735 [file] [log] [blame]
Alanny Lopez0e8ad992017-06-19 15:45:23 -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 Lopez0e8ad992017-06-19 15:45:23 -050013 labels:
14 target: ${target}
15 spec:
16 nodeSelector:
Alanny Lopezeba5ad42017-08-18 14:48:37 -050017 beta.kubernetes.io/arch: ${ARCH}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050018 volumes:
Alanny Lopeza6b7d4b2017-10-19 09:58:25 -050019 - name: workspace
Alanny Lopez0e8ad992017-06-19 15:45:23 -050020 persistentVolumeClaim:
Alanny Lopez1246b032018-02-24 23:34:55 -060021 claimName: ${w_claim}
22 - name: ssc-dir
Alanny Lopez0e8ad992017-06-19 15:45:23 -050023 persistentVolumeClaim:
Alanny Lopez1246b032018-02-24 23:34:55 -060024 claimName: ${s_claim}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050025 restartPolicy: Never
26 hostNetwork: True
27 containers:
Alanny Lopez1246b032018-02-24 23:34:55 -060028 - image: ${img_name}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050029 name: builder
30 command: [\"${WORKSPACE}/build.sh\"]
31 workingDir: ${HOME}
32 env:
33 - name: WORKSPACE
34 value: ${WORKSPACE}
Alanny Lopez1246b032018-02-24 23:34:55 -060035 - name: build-dir
36 value: ${build_dir}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050037 securityContext:
38 capabilities:
39 add:
40 - SYS_ADMIN
41 volumeMounts:
Alanny Lopeza6b7d4b2017-10-19 09:58:25 -050042 - name: workspace
43 mountPath: ${HOME}/workspace
Alanny Lopez1246b032018-02-24 23:34:55 -060044 - name: ssc-dir
45 mountPath: ${ssc_dir}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050046 imagePullSecrets:
Alanny Lopez1246b032018-02-24 23:34:55 -060047 - name: ${img_pl_sec}