-
Notifications
You must be signed in to change notification settings - Fork 1
/
task-tekton-jinja.yaml
46 lines (46 loc) · 1.55 KB
/
task-tekton-jinja.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
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: tekton-jinja
spec:
inputs:
params:
- name: TEMPLATE_URLS
type: array
description: List of files to apply jinja template rendering to
- name: TEMPLATE_VARS
type: array
description: |
List of jinja template variables and values of the form
var1, val1, var2, val2, ...
- name: TEMPLATE_DIR
description: Directory to place input template files
default: template
- name: RENDERED_DIR
description: Directory to place output rendered templates
default: rendered
- name: TEKTON_JINJA_IMAGE
description: Image to use for tekton jinja task
default: 'quay.io/erikerlandson/tekton-jinja:0.1.0'
workspaces:
- name: output
readOnly: false
mountPath: /opt/tekton-jinja/data
steps:
- name: stage-templates
image: $(inputs.params.TEKTON_JINJA_IMAGE)
command:
- "/opt/tekton-jinja/bin/stage"
- "/opt/tekton-jinja/data/$(inputs.params.TEMPLATE_DIR)"
- "/opt/tekton-jinja/data/$(inputs.params.RENDERED_DIR)"
- "$(inputs.params.TEMPLATE_URLS[*])"
- name: render-templates
image: $(inputs.params.TEKTON_JINJA_IMAGE)
command:
- "/opt/tekton-jinja/bin/render"
- "/opt/tekton-jinja/data/$(inputs.params.TEMPLATE_DIR)"
- "/opt/tekton-jinja/data/$(inputs.params.RENDERED_DIR)"
- "--urls"
- "$(inputs.params.TEMPLATE_URLS[*])"
- "--vars"
- "$(inputs.params.TEMPLATE_VARS[*])"