Skip to content

Commit

Permalink
update git push binding and rename
Browse files Browse the repository at this point in the history
  • Loading branch information
haofrank committed Dec 12, 2023
1 parent 96849ea commit fa1adee
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 21 deletions.
25 changes: 23 additions & 2 deletions .tekton/events/event_listener_push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,27 @@ spec:
triggers:
- name: github-push
bindings:
- ref: cd-binding
- ref: cd-binding-push
template:
ref: cd-template
ref: cd-template


---

apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
name: cd-binding-push
spec:
params:
- name: git-repo-url
value: $(body.repository.clone_url)
- name: git-repo-name
value: $(body.repository.name)
- name: git-revision
# use release tag name
value: $(body.head_commit.id)
- name: git-ref
# use release tag name
value: $(body.head_commit.id)

23 changes: 21 additions & 2 deletions .tekton/events/event_listener_release.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: triggers.tekton.dev/v1beta1
kind: EventListener
metadata:
name: cd-listener
name: cd-listener-release
spec:
serviceAccountName: pipeline
triggers:
Expand All @@ -22,4 +22,23 @@ spec:
bindings:
- ref: cd-binding
template:
ref: cd-template
ref: cd-template

---

apiVersion: triggers.tekton.dev/v1beta1
kind: TriggerBinding
metadata:
name: cd-binding-release
spec:
params:
- name: git-repo-url
value: $(body.repository.clone_url)
- name: git-repo-name
value: $(body.repository.name)
- name: git-revision
# use release tag name
value: $(body.release.tag_name)
- name: git-ref
# use release tag name
value: $(body.release.tag_name)
17 changes: 0 additions & 17 deletions .tekton/events/trigger_binding.yaml

This file was deleted.

0 comments on commit fa1adee

Please sign in to comment.