Added PR number to tekton pipelines
This commit is contained in:
parent
5da3b51817
commit
15f7c37f22
@ -17,3 +17,5 @@ spec:
|
||||
value: $(body.repository.name)
|
||||
- name: isprivate
|
||||
value: $(body.repository.private)
|
||||
- name: prid
|
||||
value: $(body.number)
|
||||
|
@ -69,6 +69,10 @@ spec:
|
||||
params:
|
||||
- name: TARGET
|
||||
value: "ci"
|
||||
- name: REPO
|
||||
value: $(params.projectname)
|
||||
- name: PR_ID
|
||||
value: $(params.prid)
|
||||
resources:
|
||||
inputs:
|
||||
- name: src
|
||||
|
@ -17,3 +17,13 @@ spec:
|
||||
image: docker.cluster.fun/averagemarcus/ci-builder:latest
|
||||
script: |
|
||||
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
|
||||
- name: projectname
|
||||
description: The name of the git project
|
||||
- name: prid
|
||||
description: The number of the PR
|
||||
resourcetemplates:
|
||||
- apiVersion: tekton.dev/v1beta1
|
||||
kind: PipelineRun
|
||||
@ -31,6 +33,8 @@ spec:
|
||||
value: $(params.gitrevision)
|
||||
- name: projectname
|
||||
value: $(params.projectname)
|
||||
- name: prid
|
||||
value: $(params.prid)
|
||||
resources:
|
||||
- name: git-source
|
||||
resourceSpec:
|
||||
|
Loading…
Reference in New Issue
Block a user