-
Notifications
You must be signed in to change notification settings - Fork 1
/
build-deploy-trigger.yml
98 lines (91 loc) · 2.34 KB
/
build-deploy-trigger.yml
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: tekton-argocd-blog-build-tt
spec:
params:
- name: git-app-repo-url
- name: git-app-repo-name
- name: git-app-repo-revision
resourcetemplates:
- apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: git-app-repo-$(uid)
namespace: tekton-argocd-pipeline
labels:
pipeline: tekton
deploy: argocd
spec:
params:
- name: url
value: $(tt.params.git-app-repo-url)
- name: revision
value: $(tt.params.git-app-repo-revision)
- name: git-app-repo-name
value: $(tt.params.git-app-repo-name)
type: git
- apiVersion: tekton.dev/v1alpha1
kind: PipelineResource
metadata:
name: image-registry-$(uid)
namespace: tekton-argocd-pipeline
labels:
pipeline: tekton
deploy: argocd
spec:
params:
- name: url
# Replace <docker_registry_name> with your docker registry name (e.g. my-acr.azurecr.io)
value: registry.digitalocean.com
type: image
- apiVersion: tekton.dev/v1alpha1
kind: PipelineRun
metadata:
generateName: tekton-argocd-blog-build-deploy-pipeline-run-
namespace: tekton-argocd-pipeline
labels:
pipeline: tekton
deploy: argocd
spec:
serviceAccountName: pipeline-sa
pipelineRef:
name: tekton-argocd-blog-build-deploy-pipeline
resources:
- name: git-app-repo
resourceRef:
name: git-app-repo-$(uid)
- name: image-registry
resourceRef:
name: image-registry-$(uid)
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: tekton-argocd-blog-build-git-tb
spec:
params:
- name: git-app-repo-url
value: $(body.repository.url)
- name: git-app-repo-revision
value: master
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: EventListener
metadata:
name: tekton-argocd-blog-build-el
spec:
serviceAccountName: tekton-triggers-admin
triggers:
- bindings:
- ref: tekton-argocd-blog-build-git-tb
template:
ref: tekton-argocd-blog-build-tt
---
apiVersion: getambassador.io/v2
kind: Mapping
metadata:
name: tekton-argocd-blog-build-el-mapping
spec:
prefix: /tekton-argocd-blog-build-mapping/
service: el-tekton-argocd-blog-build-el:8080