-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathtask-kustomize.yaml
More file actions
33 lines (32 loc) · 1.04 KB
/
task-kustomize.yaml
File metadata and controls
33 lines (32 loc) · 1.04 KB
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
apiVersion: tekton.dev/v1
kind: Task
metadata:
name: kustomize
spec:
params:
- name: image-name
type: string
description: "The placeholder image in the deployment to be replaced."
- name: new-image
type: string
description: "The image to update the deployment with."
- name: new-tag
type: string
description: "The image to tag update the deployment with."
- name: overlaypath
type: string
description: "Path to the overlay directory."
steps:
- name: kustomize
workingDir: $(workspaces.source.path)
image: quay.io/redhatworkshops/kustomize-task:v4.0.5
script: |
#!/usr/bin/env /bin/sh
echo "Kustomizing image"
echo "Running: kustomize edit set image $(params.image-name)=$(params.new-image):$(params.new-tag)"
cd $(params.overlaypath)
kustomize edit set image $(params.image-name)=$(params.new-image):$(params.new-tag)
echo "Updated file kustomization.yaml file"
cat kustomization.yaml
workspaces:
- name: source