-
Notifications
You must be signed in to change notification settings - Fork 113
/
buildstrategy_source-to-image_cr.yaml
73 lines (73 loc) · 1.86 KB
/
buildstrategy_source-to-image_cr.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
apiVersion: shipwright.io/v1beta1
kind: ClusterBuildStrategy
metadata:
name: source-to-image
spec:
volumes:
- name: gen-source
emptyDir: {}
steps:
- command:
- /usr/local/bin/s2i
- build
- $(params.shp-source-context)
- $(params.builder-image)
- '--as-dockerfile'
- /gen-source/Dockerfile.gen
image: quay.io/openshift-pipeline/s2i:nightly
imagePullPolicy: Always
name: s2i-build-as-dockerfile
volumeMounts:
- mountPath: /gen-source
name: gen-source
workingDir: $(params.shp-source-root)
- name: build-and-push
image: gcr.io/kaniko-project/executor:v1.23.2
command:
- /kaniko/executor
args:
- --dockerfile
- /gen-source/Dockerfile.gen
- --context
- /gen-source
- --destination
- $(params.shp-output-image)
- --snapshot-mode
- redo
- --no-push
- --tar-path
- $(params.shp-output-directory)/image.tar
# https://github.com/GoogleContainerTools/kaniko/issues/2164
- --ignore-path
- /product_uuid
env:
- name: DOCKER_CONFIG
value: /tekton/home/.docker
- name: HOME
value: /tekton/home
- name: AWS_ACCESS_KEY_ID
value: NOT_SET
- name: AWS_SECRET_KEY
value: NOT_SET
securityContext:
allowPrivilegeEscalation: false
capabilities:
add:
- CHOWN
- DAC_OVERRIDE
- FOWNER
- SETGID
- SETUID
- SETFCAP
- KILL
volumeMounts:
- mountPath: /gen-source
name: gen-source
workingDir: /gen-source
parameters:
- name: builder-image
description: The builder image.
type: string
securityContext:
runAsUser: 0
runAsGroup: 0