cluster.fun/tekton/triggertemplates/deploy.yaml

50 lines
1.3 KiB
YAML

apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerTemplate
metadata:
name: deploy-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
- name: isprivate
description: If the git project is set to private
default: "true"
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
metadata:
generateName: deploy-$(params.projectname)-
spec:
pipelineRef:
name: deploy-project
serviceAccountName: deploy-project
params:
- name: gitbranch
value: $(params.gitbranch)
- name: gitref
value: $(params.gitref)
- name: gitrevision
value: $(params.gitrevision)
- name: projectname
value: $(params.projectname)
- name: isprivate
value: $(params.isprivate)
resources:
- name: git-source
resourceSpec:
type: git
params:
- name: revision
value: $(params.gitrevision)
- name: url
value: $(params.gitrepositoryurl)