Skip to main content
Version: 0.3

References

Webhook#

Webhook defines repositories to handle and resources to apply.

apiVersion: pullup.dev/v1alpha1
kind: Webhook
metadata:
name: example
spec:
repositories:
- type: github
name: tommy351/pullup
resourceName: "{{ .Webhook.Name }}-{{ .Spec.Number }}"
resources:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: example
spec:
template:
spec:
- name: foo
image: "tommy351/pullup:{{ .Spec.Head.SHA }}"
- apiVersion: v1
kind: Service
metadata:
name: example
NameTypeDescriptionDefault
spec.repositoriesarrayRepositories to handle.
spec.repositories[].typestringRepository type. Possible values: githubRequired
spec.repositories[].namestringFull name of repositoryRequired
spec.repositories[].branches.include[]stringIncluded branches.
spec.repositories[].branches.exclude[]stringExcluded branches.
spec.resourceNamestringTemplate of resource name. This value is used to generate name of resource sets.{{ .Webhook.Name }}-{{ .Spec.Number }}
resourcesarrayResources to apply.

Filter by Branch#

You can filter pull requests by setting spec.repositories[].branches. The value can be a string or a regular expression. For example:

- master
- /.*/

Template#

You can use template strings in spec.resourceName or spec.resources.

Webhook variables:

ResourceSet variables:

See more:

ResourceSet#

ResourceSet defines resources to apply and some information about the pull request and the commit. It's usually created by the webhook.

apiVersion: pullup.dev/v1alpha1
kind: ResourceSet
metadata:
name: example-123
spec:
base:
ref: master
sha: "3afa0879385842fa7423a8f18ab03783709a3d3e"
head:
ref: feature
sha: "121b29fb6c467d388faea3d7c9b4859b7e244772"
number: 123
resources: []
NameTypeDescription
spec.base.refstringBase branch name.
spec.base.shastringBase branch revision.
spec.head.refstringHead branch name.
spec.head.shastringHead branch revision.
spec.numberintPull requset number.
spec.resourcesarrayResources to apply.