Skip to content

Commit

Permalink
Revert turning on PRCommenter in triggers
Browse files Browse the repository at this point in the history
Specifically reverting #1220 and #1225

Something's wrong with how this is actually working in practice - I'm not seeing the `PipelineRun` get created, so I'm _guessing_ something's awry in the eventlistener. But I don't know enough to figure out what's wrong. So let's revert this for the moment.

Signed-off-by: Andrew Bayer <[email protected]>
  • Loading branch information
abayer authored and tekton-robot committed Sep 30, 2022
1 parent 5ce9f1d commit a73bd45
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 43 deletions.
2 changes: 0 additions & 2 deletions tekton/resources/cd/eventlistener.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ spec:
expression: body.taskRun.metadata.annotations['tekton.dev/gitURL'].parseURL().path.substring(1).split('/').join('_')
- key: shortSourceEventID
expression: body.taskRun.metadata.labels['tekton.dev/source-event-id'].truncate(13)
- key: repoName
expression: body.taskRun.metadata.annotations['tekton.dev/gitURL'].parseURL().path.substring(1).split('/')[1]
triggerSelector:
namespaceSelector:
matchNames:
Expand Down
6 changes: 0 additions & 6 deletions tekton/resources/ci/bindings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ spec:
value: success
- name: gitHubCheckDescription
value: "Job Successful."
- name: gitHubCheckIsSuccess
value: "true"
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
Expand All @@ -51,8 +49,6 @@ spec:
value: failure
- name: gitHubCheckDescription
value: "Job Failed."
- name: gitHubCheckIsSuccess
value: "false"
---
apiVersion: triggers.tekton.dev/v1alpha1
kind: TriggerBinding
Expand All @@ -77,5 +73,3 @@ spec:
value: $(extensions.shortSourceEventID)
- name: gitHubRepoUnderscore
value: $(extensions.repoUnderscore)
- name: gitHubRepoName
value: $(extensions.repoName)
45 changes: 10 additions & 35 deletions tekton/resources/ci/github-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ spec:
description: A truncated version of the sourceEventId
- name: gitHubRepo
description: The gitHubRepo (org/repo)
- name: gitHubRepoName
description: The gitHubRepo's name (repo)
- name: gitHubRepoUnderscore
description: The gitHubRepoUnderscore (org_repo)
- name: gitRevision
Expand All @@ -93,8 +91,6 @@ spec:
description: Name of the CI Job (GitHub Check)
- name: gitHubCheckStatus
description: Can be 'pending', 'success' or 'failure'
- name: gitHubCheckIsSuccess
description: Can be 'true' or 'false'
- name: gitHubCheckDescription
description: A description to be displayed for the status of the check
- name: taskRunName
Expand All @@ -109,7 +105,7 @@ spec:
default: ""
resourcetemplates:
- apiVersion: tekton.dev/v1beta1
kind: PipelineRun
kind: TaskRun
metadata:
name: $(tt.params.shortSourceEventID)-$(tt.params.checkName)-$(tt.params.gitHubCheckStatus)
namespace: tekton-ci
Expand All @@ -119,17 +115,15 @@ spec:
ci.tekton.dev/source-taskrun-name: $(tt.params.taskRunName)
tekton.dev/pr-number: $(tt.params.pullRequestNumber)
spec:
tasks:
- name: set-status
serviceAccountName: tekton-ci-jobs
podTemplate:
securityContext:
runAsNonRoot: true
runAsUser: 1001
taskRef:
name: github-set-status
bundle: gcr.io/tekton-releases/catalog/upstream/github-set-status:0.2
params:
serviceAccountName: tekton-ci-jobs
podTemplate:
securityContext:
runAsNonRoot: true
runAsUser: 1001
taskRef:
name: github-set-status
bundle: gcr.io/tekton-releases/catalog/upstream/github-set-status:0.2
params:
- name: REPO_FULL_NAME
value: $(tt.params.gitHubRepo)
- name: SHA
Expand All @@ -146,22 +140,3 @@ spec:
value: bot-token-github
- name: GITHUB_TOKEN_SECRET_KEY
value: bot-token
- name: comment-on-pr
taskRef:
apiVersion: custom.tekton.dev/v0
kind: PRCommenter
params:
- name: repo
value: $(tt.params.gitHubRepoName)
- name: prNumber
value: $(tt.params.pullRequestNumber)
- name: sha
value: $(tt.params.gitRevision)
- name: jobName
value: $(tt.params.checkName)
- name: isSuccess
value: $(tt.params.gitHubCheckIsSuccess)
- name: isOptional
value: "false"
- name: logURL
value: https://prow.tekton.dev/view/gs/tekton-prow/pr-logs/pull/$(tt.params.gitHubRepoUnderscore)/$(tt.params.pullRequestNumber)/$(tt.params.checkName)/$(tt.params.buildUUID)

0 comments on commit a73bd45

Please sign in to comment.