92 lines
2.1 KiB
YAML
92 lines
2.1 KiB
YAML
|
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
|
||
|
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"
|
||
|
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"
|
||
|
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"
|
||
|
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"
|
||
|
|