You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.5 KiB
YAML
41 lines
1.5 KiB
YAML
apiVersion: triggers.tekton.dev/v1beta1
|
|
kind: EventListener
|
|
metadata:
|
|
name: gitea-pushes
|
|
namespace: sakal-us
|
|
spec:
|
|
serviceAccountName: tekton-triggers-sakal-us
|
|
triggers:
|
|
# inline Trigger:
|
|
- name: build-and-deploy-sakal-us
|
|
bindings: # TriggerBindings to pluck data from EventListener and map it to named variables
|
|
- name: gitrevision
|
|
value: $(body.commits[0].id)
|
|
- name: gitrepositoryurl
|
|
value: $(body.repository.clone_url)
|
|
template: # TriggerTemplates to render various Tekton CRDs using plucked data
|
|
spec:
|
|
params:
|
|
- name: gitrevision
|
|
description: The git revision
|
|
default: main
|
|
- name: gitrepositoryurl
|
|
description: The git repository url
|
|
default: https://git.sakal.us/avraham/sakal.us.git
|
|
resourcetemplates:
|
|
- apiVersion: tekton.dev/v1beta1
|
|
kind: PipelineRun
|
|
metadata:
|
|
generateName: build-and-deploy-sakal-us-
|
|
spec:
|
|
pipelineRef:
|
|
name: build-and-deploy-sakal-us
|
|
params:
|
|
- name: gitrevision
|
|
value: $(tt.params.gitrevision)
|
|
- name: gitrepositoryurl
|
|
value: $(tt.params.gitrepositoryurl)
|
|
workspaces:
|
|
- name: repo
|
|
persistentVolumeClaim:
|
|
claimName: sakal-us-cicd |