Added PR number to tekton pipelines
This commit is contained in:
parent
5da3b51817
commit
15f7c37f22
@ -17,3 +17,5 @@ spec:
|
|||||||
value: $(body.repository.name)
|
value: $(body.repository.name)
|
||||||
- name: isprivate
|
- name: isprivate
|
||||||
value: $(body.repository.private)
|
value: $(body.repository.private)
|
||||||
|
- name: prid
|
||||||
|
value: $(body.number)
|
||||||
|
@ -69,6 +69,10 @@ spec:
|
|||||||
params:
|
params:
|
||||||
- name: TARGET
|
- name: TARGET
|
||||||
value: "ci"
|
value: "ci"
|
||||||
|
- name: REPO
|
||||||
|
value: $(params.projectname)
|
||||||
|
- name: PR_ID
|
||||||
|
value: $(params.prid)
|
||||||
resources:
|
resources:
|
||||||
inputs:
|
inputs:
|
||||||
- name: src
|
- name: src
|
||||||
|
@ -17,3 +17,13 @@ spec:
|
|||||||
image: docker.cluster.fun/averagemarcus/ci-builder:latest
|
image: docker.cluster.fun/averagemarcus/ci-builder:latest
|
||||||
script: |
|
script: |
|
||||||
make --dry-run -t $(params.TARGET) &> /dev/null && make $(params.TARGET) || echo "No '$(params.TARGET)' target found, skipping"
|
make --dry-run -t $(params.TARGET) &> /dev/null && make $(params.TARGET) || echo "No '$(params.TARGET)' target found, skipping"
|
||||||
|
env:
|
||||||
|
- name: REPO
|
||||||
|
value: $(params.REPO)
|
||||||
|
- name: PR_ID
|
||||||
|
value: $(params.PR_ID)
|
||||||
|
- name: ACCESS_TOKEN
|
||||||
|
valueFrom:
|
||||||
|
secretKeyRef:
|
||||||
|
name: gitea-access-token
|
||||||
|
key: access-token
|
||||||
|
@ -15,6 +15,8 @@ spec:
|
|||||||
description: The ref of the PR
|
description: The ref of the PR
|
||||||
- name: projectname
|
- name: projectname
|
||||||
description: The name of the git project
|
description: The name of the git project
|
||||||
|
- name: prid
|
||||||
|
description: The number of the PR
|
||||||
resourcetemplates:
|
resourcetemplates:
|
||||||
- apiVersion: tekton.dev/v1beta1
|
- apiVersion: tekton.dev/v1beta1
|
||||||
kind: PipelineRun
|
kind: PipelineRun
|
||||||
@ -31,6 +33,8 @@ spec:
|
|||||||
value: $(params.gitrevision)
|
value: $(params.gitrevision)
|
||||||
- name: projectname
|
- name: projectname
|
||||||
value: $(params.projectname)
|
value: $(params.projectname)
|
||||||
|
- name: prid
|
||||||
|
value: $(params.prid)
|
||||||
resources:
|
resources:
|
||||||
- name: git-source
|
- name: git-source
|
||||||
resourceSpec:
|
resourceSpec:
|
||||||
|
Loading…
Reference in New Issue
Block a user