Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 1 | apiVersion: batch/v1 |
| 2 | kind: Job |
| 3 | metadata: |
| 4 | name: openbmc${BUILD_ID}-${target} |
| 5 | namespace: ${namespace} |
| 6 | labels: |
| 7 | app: openbmc |
| 8 | stage: build |
| 9 | spec: |
| 10 | template: |
| 11 | metadata: |
Alanny Lopez | 1246b03 | 2018-02-24 23:34:55 -0600 | [diff] [blame] | 12 | name: ${pod_name} |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 13 | labels: |
| 14 | target: ${target} |
| 15 | spec: |
| 16 | nodeSelector: |
Alanny Lopez | eba5ad4 | 2017-08-18 14:48:37 -0500 | [diff] [blame] | 17 | beta.kubernetes.io/arch: ${ARCH} |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 18 | volumes: |
Alanny Lopez | a6b7d4b | 2017-10-19 09:58:25 -0500 | [diff] [blame] | 19 | - name: workspace |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 20 | persistentVolumeClaim: |
Alanny Lopez | 1246b03 | 2018-02-24 23:34:55 -0600 | [diff] [blame] | 21 | claimName: ${w_claim} |
| 22 | - name: ssc-dir |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 23 | persistentVolumeClaim: |
Alanny Lopez | 1246b03 | 2018-02-24 23:34:55 -0600 | [diff] [blame] | 24 | claimName: ${s_claim} |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 25 | restartPolicy: Never |
| 26 | hostNetwork: True |
| 27 | containers: |
Alanny Lopez | 1246b03 | 2018-02-24 23:34:55 -0600 | [diff] [blame] | 28 | - image: ${img_name} |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 29 | name: builder |
| 30 | command: [\"${WORKSPACE}/build.sh\"] |
| 31 | workingDir: ${HOME} |
| 32 | env: |
| 33 | - name: WORKSPACE |
| 34 | value: ${WORKSPACE} |
Alanny Lopez | 1246b03 | 2018-02-24 23:34:55 -0600 | [diff] [blame] | 35 | - name: build-dir |
| 36 | value: ${build_dir} |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 37 | securityContext: |
| 38 | capabilities: |
| 39 | add: |
| 40 | - SYS_ADMIN |
| 41 | volumeMounts: |
Alanny Lopez | a6b7d4b | 2017-10-19 09:58:25 -0500 | [diff] [blame] | 42 | - name: workspace |
| 43 | mountPath: ${HOME}/workspace |
Alanny Lopez | 1246b03 | 2018-02-24 23:34:55 -0600 | [diff] [blame] | 44 | - name: ssc-dir |
| 45 | mountPath: ${ssc_dir} |
Alanny Lopez | 0e8ad99 | 2017-06-19 15:45:23 -0500 | [diff] [blame] | 46 | imagePullSecrets: |
Alanny Lopez | 1246b03 | 2018-02-24 23:34:55 -0600 | [diff] [blame] | 47 | - name: ${img_pl_sec} |