cluster.fun/tekton/triggertemplates/pr.yaml

43 lines
1.2 KiB
YAML
Raw Normal View History

2020-04-25 18:18:33 +00:00
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: pr-project
namespace: tekton-pipelines
spec:
params:
- name: gitrevision
description: The git revision
- name: gitrepositoryurl
description: The git repository url
- name: gitbranch
description: The branch of the PR
- name: gitref
description: The ref of the PR
- name: projectname
description: The name of the git project
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: pr-project-
spec:
pipelineRef:
name: pr-project
serviceAccountName: pr-project
params:
- name: gitbranch
value: $(params.gitbranch)
- name: gitrevision
value: $(params.gitrevision)
- name: projectname
value: $(params.projectname)
resources:
- name: git-source
resourceSpec:
type: git
params:
- name: revision
value: $(params.gitrevision)
- name: url
value: $(params.gitrepositoryurl)