Skip to content

Instantly share code, notes, and snippets.

$ cat taskrun.yaml
...
#!/bin/bash
uname -a
xcode-select -v
...
$ tkn taskrun logs orka-ping-pp7mt
...
[unnamed-0] Darwin Admins-iMac 19.0.0 Darwin Kernel Version 19.0.0: Thu Oct 17 16:17:15 PDT 2019; root:xnu-6153.41.3~29/RELEASE_X86_64 x86_64
apiVersion: tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-interceptor
spec:
serviceType: LoadBalancer
triggers:
- name: chatbot-trig
interceptor:
github:
apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: chatbot-binding
spec:
params:
- name: prurl
value: $(body.issue.html_url)
- name: repourl
value: $(body.repository.html_url)
apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: chatbot-template
spec:
params:
- name: repourl
description: The git repository url
- name: prurl
description: The url to the PR
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: chatbot-task
spec:
inputs:
resources:
- name: repo
type: git
- name: pr
apiVersion: tekton.dev/v1alpha1
kind: EventListener
metadata:
name: listener-interceptor
spec:
serviceType: LoadBalancer
triggers:
- name: pr-trig
interceptor:
bindings:
apiVersion: tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: review-pipeline-template
spec:
params:
- name: gitrevision
description: The git revision
default: master
- name: gitrepositoryurl
apiVersion: tekton.dev/v1alpha1
kind: Task
metadata:
name: run-tests
spec:
inputs:
resources:
- name: repo
type: git
- name: pr
apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: review-pipeline-binding
spec:
params:
- name: gitrevision
value: $(body.pull_request.head.sha)
- name: gitrepositoryurl
value: $(body.pull_request.head.repo.clone_url)
apiVersion: tekton.dev/v1alpha1
kind: TriggerBinding
metadata:
name: ci-pipeline-binding
spec:
params:
- name: gitrevision
value: $(body.pull_request.head.sha)
- name: gitrepositoryurl
value: $(body.pull_request.head.repo.clone_url)