forked from tektoncd/pipeline
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdeploy_tasks.yaml
43 lines (42 loc) · 1.12 KB
/
deploy_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
apiVersion: pipeline.knative.dev/v1alpha1
kind: Task
metadata:
name: deploy-with-helm
namespace: default
spec:
inputs:
resources:
- name: workspace
type: git
params:
- name: pathToHelmCharts
- name: helmArgs
- name: image
clusters:
- name: targetCluster
buildSpec:
steps:
- name: deploy
image: kubernetes-helm
args: ['install', '--kube-context=${targetCluster}', '--set image=${image}', '${helmArgs}', '${pathToHelmChart}']
---
apiVersion: pipeline.knative.dev/v1alpha1
kind: Task
metadata:
name: deploy-with-kubectl
namespace: default
spec:
inputs:
resources:
- name: workspace
type: git
params:
- name: kubectlArgs
- name: pathToFiles
clusters:
- name: targetCluster
buildSpec:
steps:
- name: runKubectl
image: k8s-kubectl
args: ['--use-context', '${targetCluster}', '--namespace', '${targetCluster.namespace}', 'apply', '-c', '${pathToFiles}', '${kubectlArgs}']