forked from tensorflow/build
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild-tasks.yaml
59 lines (49 loc) · 1.31 KB
/
build-tasks.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
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: kaniko-push
namespace: sig-build
secrets:
- name: kaniko-push
---
# Builds an image via kaniko and pushes it to registry.
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: build-image
namespace: sig-build
spec:
inputs:
resources:
- name: workspace
type: git
params:
- name: dockerfile
description: The path to the Dockerfile to build
default: Dockerfile
- name: context-path
description: The build context used by Kaniko (https://github.com/GoogleContainerTools/kaniko#kaniko-build-contexts)
default: ./
outputs:
resources:
- name: built-image
type: image
steps:
- name: build-and-push
image: gcr.io/kaniko-project/executor:v0.15.0
args:
- --dockerfile=$(inputs.params.dockerfile)
- --destination=$(outputs.resources.built-image.url)
- --context=/workspace/workspace/$(inputs.params.context-path)
- --oci-layout-path=$(inputs.resources.built-image.path)
- --reproducible
env:
- name: DOCKER_CONFIG # specifying DOCKER_CONFIG is required to allow kaniko to detect docker credential
value: /builder/home/.docker/
securityContext:
runAsUser: 0
sidecars:
- image: registry
name: registry
---