cluster.fun/tekton/pipelines/pr.yaml

112 lines
2.7 KiB
YAML
Raw Normal View History

2020-04-25 18:18:33 +00:00
apiVersion: tekton.dev/v1beta1
kind: Pipeline
metadata:
name: pr-project
namespace: tekton-pipelines
spec:
params:
- name: gitbranch
type: string
- name: gitrevision
type: string
- name: projectname
type: string
2020-06-03 14:04:49 +00:00
- name: prid
type: string
2020-04-25 18:18:33 +00:00
resources:
- name: git-source
type: git
tasks:
- name: pr-start
taskRef:
name: pr-status
params:
- name: REPO
value: $(params.projectname)
- name: SHA
value: $(params.gitrevision)
- name: STATE
value: "pending"
- name: make-test
# TODO: Re-enable when conditionals can result in skipped rather than failure
# conditions:
# - conditionRef: has-makefile
# resources:
# - name: src
# resource: git-source
taskRef:
name: make
params:
- name: TARGET
value: "test"
2020-06-07 13:18:58 +00:00
- name: REPO
value: $(params.projectname)
- name: PR_ID
value: $(params.prid)
- name: SHA
value: $(params.gitrevision)
2020-04-25 18:18:33 +00:00
resources:
inputs:
- name: src
resource: git-source
- name: make-build
# TODO: Re-enable when conditionals can result in skipped rather than failure
# conditions:
# - conditionRef: has-makefile
# resources:
# - name: src
# resource: git-source
taskRef:
name: make
params:
- name: TARGET
value: "build"
2020-06-07 13:18:58 +00:00
- name: REPO
value: $(params.projectname)
- name: PR_ID
value: $(params.prid)
- name: SHA
value: $(params.gitrevision)
2020-04-25 18:18:33 +00:00
resources:
inputs:
- name: src
resource: git-source
- name: make-ci
# TODO: Re-enable when conditionals can result in skipped rather than failure
# conditions:
# - conditionRef: has-makefile
# resources:
# - name: src
# resource: git-source
taskRef:
name: make
params:
- name: TARGET
value: "ci"
2020-05-02 20:45:10 +00:00
- name: REPO
value: $(params.projectname)
- name: PR_ID
value: $(params.prid)
2020-06-07 13:18:58 +00:00
- name: SHA
value: $(params.gitrevision)
2020-04-25 18:18:33 +00:00
resources:
inputs:
- name: src
resource: git-source
- name: pr-end
taskRef:
name: pr-status
runAfter:
- pr-start
- make-test
- make-build
- make-ci
params:
- name: REPO
value: $(params.projectname)
- name: SHA
value: $(params.gitrevision)
- name: STATE
value: "success"