Last active
April 23, 2019 20:39
-
-
Save dlorenc/bdd3dc952cd9b9cb10b837224b031214 to your computer and use it in GitHub Desktop.
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
apiVersion: tekton.dev/v1alpha1 | |
kind: EventBinding | |
spec: | |
# Reference to the knative/eventing Source | |
sourceRef: | |
name: myGithubRepo | |
# PipelineResources to create/delete based on data in the event source | |
# This assumes the event data looks something like: | |
# { | |
# repo: { | |
# name: foo | |
# revision: abc232 | |
# } | |
# } | |
# | |
# This data is made available via "valueFrom" | |
resourceTemplates: | |
- name: gitTemplate | |
template: | |
metadata: | |
spec: | |
type: git | |
params: | |
- name: revision | |
valueFrom: | |
fieldName: event.repo.revision | |
- name: url | |
valueFrom: | |
fieldName: event.repo.name | |
# This contains a mapping between these newly created PipelineResources and the Pipeline. | |
# Which resource goes where in the Pipeline inputs. | |
resources: | |
- templateRef: | |
name: gitTemplate | |
resourceName: git | |
# Reference to the pipeline to run | |
pipelineRef: | |
name: myPipeline |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment