Skip to content

Commit 1c00fb7

Browse files
authored
ROX-31146: Reduce spam of Konflux PRs, releasers can approve/4.9 (#2438)
1 parent a819ec5 commit 1c00fb7

File tree

4 files changed

+91
-32
lines changed

4 files changed

+91
-32
lines changed

.github/CODEOWNERS

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44

55
* @stackrox/scanner
66

7-
# The RHTAP maintainers for ACS review all changes related to the Konflux pipelines, such as new
8-
# pipelines, parameter changes or automated task updates as well as Dockerfile updates.
9-
# rhacs-bot auto-approves MintMaker PRs for automated task and security updates.
10-
**/konflux.*Dockerfile @stackrox/rhtap-maintainers @rhacs-bot
11-
/.konflux/ @stackrox/rhtap-maintainers @rhacs-bot
12-
/.tekton/ @stackrox/rhtap-maintainers @rhacs-bot
13-
rpms.* @stackrox/rhtap-maintainers @rhacs-bot
14-
.github/renovate.json5 @stackrox/rhtap-maintainers
7+
# The Konflux maintainers for ACS review all changes related to the Konflux pipelines, Dockerfiles, etc.
8+
# Release engineers need to merge MintMaker PRs at the time of release.
9+
# rhacs-bot needs ability to auto-approve MintMaker PRs for automated task and security updates.
10+
**/konflux.*Dockerfile @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email @rhacs-bot
11+
/.tekton/ @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email @rhacs-bot
12+
rpms.* @stackrox/konflux-maintainers-no-email @stackrox/release-mgmt-no-email @rhacs-bot
13+
/.konflux/ @stackrox/konflux-maintainers
14+
.github/renovate.json5 @stackrox/konflux-maintainers

.github/workflows/auto-approve.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: auto-merge
22

33
on:
4-
pull_request_target:
4+
pull_request:
55
types:
66
- labeled
77

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Tag more reviewers
2+
3+
on:
4+
pull_request:
5+
types:
6+
- review_requested
7+
8+
jobs:
9+
tag-konflux-maintainers:
10+
# We have lots of PR traffic from MintMaker (acting as `red-hat-konflux[bot]`), and so it's unsustainable to go
11+
# through these emails every day. Therefore, the notifications are disabled for `konflux-maintainers-no-email`
12+
# team that's set as owner in CODEOWNERS for the Konflux stuff.
13+
# At the same time, we want to be notified when humans, not the bot, request reviews (which happens automatically
14+
# again through CODEOWNERS) for the Konflux-related files. This job invites `konflux-maintainers` team for review
15+
# for such cases.
16+
if: |
17+
github.event.requested_team.name == 'konflux-maintainers-no-email' &&
18+
github.event.pull_request.user.login != 'red-hat-konflux[bot]'
19+
env:
20+
GH_TOKEN: ${{ secrets.RHACS_BOT_GITHUB_TOKEN }}
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Tag Konflux Maintainers for review
24+
run: |
25+
exec gh api \
26+
--method POST \
27+
-H "Accept: application/vnd.github+json" \
28+
-H "X-GitHub-Api-Version: 2022-11-28" \
29+
"/repos/${{ github.repository }}/pulls/${{ github.event.pull_request.number }}/requested_reviewers" \
30+
--input - <<< '{ "team_reviewers": [ "konflux-maintainers" ] }'

.tekton/scanner-component-pipeline.yaml

Lines changed: 52 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ apiVersion: tekton.dev/v1
22
kind: Pipeline
33
metadata:
44
name: scanner-component-pipeline
5+
56
spec:
7+
68
finally:
9+
710
- name: slack-notification
811
params:
912
- name: message
1013
value: ':x: `{{event_type}}` pipeline for <https://console.redhat.com/application-pipeline/workspaces/rh-acs/applications/acs/pipelineruns/$(context.pipelineRun.name)|$(context.pipelineRun.name)> (`$(params.output-image-repo)`, revision <$(params.git-url)/commit/$(params.revision)|$(params.revision)>) has failed.'
1114
- name: key-name
1215
value: 'acs-konflux-notifications'
1316
when:
14-
# Run when any task has Failed
17+
# Run when any task has Failed
1518
- input: $(tasks.status)
1619
operator: in
17-
values: ["Failed"]
20+
values: [ "Failed" ]
1821
taskRef:
1922
params:
2023
- name: name
@@ -24,6 +27,7 @@ spec:
2427
- name: kind
2528
value: task
2629
resolver: bundles
30+
2731
- name: show-sbom
2832
params:
2933
- name: IMAGE_URL
@@ -37,6 +41,7 @@ spec:
3741
- name: kind
3842
value: task
3943
resolver: bundles
44+
4045
- name: post-metric-end
4146
params:
4247
- name: AGGREGATE_TASKS_STATUS
@@ -50,6 +55,7 @@ spec:
5055
- name: kind
5156
value: task
5257
resolver: bundles
58+
5359
params:
5460
- description: Source Repository URL
5561
name: git-url
@@ -108,7 +114,7 @@ spec:
108114
description: Build stage to target in container build
109115
name: build-target-stage
110116
type: string
111-
- default: []
117+
- default: [ ]
112118
description: List of scanner-data file names to fetch to include in the container build.
113119
name: blobs-to-fetch
114120
type: array
@@ -134,6 +140,7 @@ spec:
134140
- name: extra-labels
135141
type: array
136142
description: Additional labels to put on the built containers.
143+
137144
results:
138145
- description: ""
139146
name: IMAGE_URL
@@ -147,17 +154,21 @@ spec:
147154
- description: ""
148155
name: CHAINS-GIT_COMMIT
149156
value: $(tasks.clone-repository.results.commit)
157+
150158
workspaces:
151159
- name: git-auth
160+
152161
tasks:
162+
153163
- name: post-metric-start
154164
taskRef: *post-bigquery-metrics-ref
165+
155166
- name: init
156167
params:
157168
- name: image-url
158-
# We can't provide a StackRox-style tag because it is not known at this time (requires cloning source, etc.)
159-
# As a workaround, we still provide a unique tag that's based on a revision in order for this task to comply with
160-
# its expected input. We later actually add this tag on a built image with the apply-index-image-tag task.
169+
# We can't provide a StackRox-style tag because it is not known at this time (requires cloning source, etc.)
170+
# As a workaround, we still provide a unique tag that's based on a revision in order for this task to comply with
171+
# its expected input. We later actually add this tag on a built image with the apply-index-image-tag task.
161172
value: $(params.output-image-repo):konflux-$(params.revision)
162173
- name: rebuild
163174
value: $(params.rebuild)
@@ -172,6 +183,7 @@ spec:
172183
- name: kind
173184
value: task
174185
resolver: bundles
186+
175187
- name: clone-repository
176188
params:
177189
- name: url
@@ -198,10 +210,11 @@ spec:
198210
when:
199211
- input: $(tasks.init.results.build)
200212
operator: in
201-
values: ["true"]
213+
values: [ "true" ]
202214
workspaces:
203215
- name: basic-auth
204216
workspace: git-auth
217+
205218
- name: determine-image-expiration
206219
params:
207220
- name: DEFAULT_IMAGE_EXPIRES_AFTER
@@ -217,6 +230,7 @@ spec:
217230
- name: kind
218231
value: task
219232
resolver: bundles
233+
220234
- name: determine-image-tag
221235
params:
222236
- name: TAG_SUFFIX
@@ -232,10 +246,11 @@ spec:
232246
- name: kind
233247
value: task
234248
resolver: bundles
249+
235250
- name: fetch-scanner-data
236251
params:
237252
- name: BLOBS_TO_FETCH
238-
value: ["$(params.blobs-to-fetch[*])"]
253+
value: [ "$(params.blobs-to-fetch[*])" ]
239254
- name: TARGET_DIR
240255
value: .konflux/scanner-data
241256
- name: SOURCE_ARTIFACT
@@ -253,6 +268,7 @@ spec:
253268
- name: kind
254269
value: task
255270
resolver: bundles
271+
256272
- name: prefetch-dependencies
257273
params:
258274
- name: input
@@ -265,7 +281,7 @@ spec:
265281
value: $(params.oci-artifact-expires-after)
266282
- name: ACTIVATION_KEY
267283
value: subscription-manager-activation-key-prod
268-
# Required for RPM prefetching support
284+
# Required for RPM prefetching support
269285
- name: dev-package-managers
270286
value: "true"
271287
taskRef:
@@ -280,6 +296,7 @@ spec:
280296
workspaces:
281297
- name: git-basic-auth
282298
workspace: git-auth
299+
283300
- name: build-images
284301
matrix:
285302
params:
@@ -315,7 +332,7 @@ spec:
315332
- name: BUILDAH_FORMAT
316333
value: $(params.buildah-format)
317334
- name: LABELS
318-
value: ["$(params.extra-labels[*])"]
335+
value: [ "$(params.extra-labels[*])" ]
319336
- name: BUILD_TIMESTAMP
320337
value: "$(tasks.clone-repository.results.commit-timestamp)"
321338
taskRef:
@@ -330,7 +347,8 @@ spec:
330347
when:
331348
- input: $(tasks.init.results.build)
332349
operator: in
333-
values: ["true"]
350+
values: [ "true" ]
351+
334352
- name: build-image-index
335353
params:
336354
- name: IMAGE
@@ -357,7 +375,8 @@ spec:
357375
when:
358376
- input: $(tasks.init.results.build)
359377
operator: in
360-
values: ["true"]
378+
values: [ "true" ]
379+
361380
- name: apply-index-image-tag
362381
params:
363382
- name: IMAGE_URL
@@ -379,7 +398,8 @@ spec:
379398
when:
380399
- input: $(tasks.init.results.build)
381400
operator: in
382-
values: ["true"]
401+
values: [ "true" ]
402+
383403
- name: build-source-image
384404
params:
385405
- name: BINARY_IMAGE
@@ -402,10 +422,11 @@ spec:
402422
when:
403423
- input: $(tasks.init.results.build)
404424
operator: in
405-
values: ["true"]
425+
values: [ "true" ]
406426
- input: $(params.build-source-image)
407427
operator: in
408-
values: ["true"]
428+
values: [ "true" ]
429+
409430
- name: deprecated-base-image-check
410431
params:
411432
- name: IMAGE_URL
@@ -424,7 +445,8 @@ spec:
424445
when:
425446
- input: $(params.skip-checks)
426447
operator: in
427-
values: ["false"]
448+
values: [ "false" ]
449+
428450
- name: clair-scan
429451
matrix:
430452
params:
@@ -448,7 +470,8 @@ spec:
448470
when:
449471
- input: $(params.skip-checks)
450472
operator: in
451-
values: ["false"]
473+
values: [ "false" ]
474+
452475
- name: ecosystem-cert-preflight-checks
453476
matrix:
454477
params:
@@ -470,7 +493,8 @@ spec:
470493
when:
471494
- input: $(params.skip-checks)
472495
operator: in
473-
values: ["false"]
496+
values: [ "false" ]
497+
474498
- name: sast-shell-check
475499
params:
476500
- name: image-digest
@@ -493,7 +517,8 @@ spec:
493517
when:
494518
- input: $(params.skip-checks)
495519
operator: in
496-
values: ["false"]
520+
values: [ "false" ]
521+
497522
- name: sast-unicode-check
498523
params:
499524
- name: image-digest
@@ -516,7 +541,8 @@ spec:
516541
when:
517542
- input: $(params.skip-checks)
518543
operator: in
519-
values: ["false"]
544+
values: [ "false" ]
545+
520546
- name: sast-snyk-check
521547
params:
522548
- name: SOURCE_ARTIFACT
@@ -539,7 +565,8 @@ spec:
539565
when:
540566
- input: $(params.skip-checks)
541567
operator: in
542-
values: ["false"]
568+
values: [ "false" ]
569+
543570
- name: clamav-scan
544571
matrix:
545572
params:
@@ -563,7 +590,8 @@ spec:
563590
when:
564591
- input: $(params.skip-checks)
565592
operator: in
566-
values: ["false"]
593+
values: [ "false" ]
594+
567595
- name: rpms-signature-scan
568596
params:
569597
- name: image-digest
@@ -582,7 +610,8 @@ spec:
582610
when:
583611
- input: $(params.skip-checks)
584612
operator: in
585-
values: ["false"]
613+
values: [ "false" ]
614+
586615
- name: push-dockerfile
587616
params:
588617
- name: IMAGE

0 commit comments

Comments
 (0)