blob: c0351938f2d4adb8b8bf8b61052c4336644d65ce [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:
12 name: ${podname}
13 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 Lopeza6b7d4b2017-10-19 09:58:25 -050021 claimName: ${wclaim}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050022 - name: sscdir
23 persistentVolumeClaim:
24 claimName: ${sclaim}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050025 restartPolicy: Never
26 hostNetwork: True
27 containers:
28 - image: ${imgname}
29 name: builder
30 command: [\"${WORKSPACE}/build.sh\"]
31 workingDir: ${HOME}
32 env:
33 - name: WORKSPACE
34 value: ${WORKSPACE}
Alanny Lopez723fea62017-09-12 11:22:17 -050035 - name: builddir
36 value: ${builddir}
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 Lopez0e8ad992017-06-19 15:45:23 -050044 - name: sscdir
45 mountPath: ${sscdir}
Alanny Lopez0e8ad992017-06-19 15:45:23 -050046 imagePullSecrets:
Alanny Lopeza6b7d4b2017-10-19 09:58:25 -050047 - name: ${imgplsec}