forked from tektoncd/experimental
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
toTriggerTemplate() add spec.params to tt.params conversion add toTriggers add el/rbac for workflows add repos/events Add interceptor based on eventType Update example for demo small changes for demo Add gitRef fields Depends on tektoncd#806 for annotation based remote resolution to work Add minimal + example.yaml remove illegal char
- Loading branch information
Showing
44 changed files
with
3,783 additions
and
190 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
name: tekton-triggers-example-sa | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding # TODO: Use a rolebinding and only create pipelineruns in specific namespaces | ||
metadata: | ||
name: triggers-example-eventlistener-binding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: tekton-triggers-example-sa | ||
namespace: default | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: tekton-triggers-eventlistener-roles | ||
--- | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: triggers-example-eventlistener-clusterbinding | ||
subjects: | ||
- kind: ServiceAccount | ||
name: tekton-triggers-example-sa | ||
namespace: default | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: tekton-triggers-eventlistener-clusterroles | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
apiVersion: triggers.tekton.dev/v1beta1 | ||
kind: EventListener | ||
metadata: | ||
name: workflows-listener | ||
spec: | ||
serviceAccountName: tekton-triggers-example-sa | ||
resources: | ||
kubernetesResource: | ||
serviceType: LoadBalancer | ||
labelSelector: | ||
matchLabels: | ||
managed-by: tekton-workflows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: experimental.tekton.dev/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
name: from-git | ||
spec: | ||
repos: | ||
- name: tkndemo | ||
url: "https://github.com/dibyom/tkndemo" | ||
triggers: | ||
- name: on-pr | ||
event: | ||
source: | ||
url: https://github.com/dibyom/tkndemo | ||
type: "pull_request" | ||
secret: | ||
secretName: "repo-secret" | ||
secretKey: "token" | ||
interceptors: | ||
- name: "only_opened_prs" | ||
ref: | ||
name: cel | ||
params: | ||
- name: "filter" | ||
value: "body.action in ['opened', 'synchronize', 'reopened']" | ||
bindings: | ||
- name: commit-sha | ||
value: $(body.pull_request.head.sha) | ||
- name: url | ||
value: $(body.repository.clone_url) | ||
params: | ||
- name: url | ||
default: "https://github.com/dibyom/tkndemo" | ||
- name: commit-sha | ||
default: main | ||
pipeline: | ||
git: | ||
repo: "tkndemo" | ||
commit: $(params.commit-sha) | ||
path: pipeline.yaml | ||
pipeline: p |
Oops, something went wrong.