Skip to content

Commit cdc74b6

Browse files
authored
ROX-31146: Reduce spam of Konflux PRs, releasers can approve (#2693) (#2705)
1 parent 114ee78 commit cdc74b6

File tree

5 files changed

+84
-31
lines changed

5 files changed

+84
-31
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
RELEASED_VERSIONS @stackrox/collector-team
99
RELEASED_VERSIONS.unsupported @stackrox/collector-team
1010

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

.github/workflows/add-new-pr-to-oss-triaging.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env:
99
jobs:
1010
check-pr-if-external:
1111
name: Add external label to pull request if outside StackRox
12-
runs-on: ubuntu-latest
12+
runs-on: ubuntu-24.04
1313
env:
1414
GH_TOKEN: ${{ github.token }}
1515
BASE_REPO: ${{ github.repository }}

.github/workflows/auto-approve.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
name: auto-merge
22

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

88
jobs:
99
auto-approve:
1010
name: Auto-approve Konflux updates for default branch
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-24.04
1212
if: github.actor == 'red-hat-konflux[bot]' && github.event.label.name == 'auto-approve' && github.event.pull_request.base.ref == github.event.pull_request.base.repo.default_branch
1313
steps:
1414
- env:
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
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-24.04
22+
steps:
23+
- name: Tag Konflux Maintainers for review
24+
run: |
25+
gh pr --repo "${{ github.repository }}" edit "${{ github.event.pull_request.number }}" \
26+
--add-reviewer stackrox/konflux-maintainers

.tekton/collector-component-pipeline.yaml

Lines changed: 48 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,22 @@ apiVersion: tekton.dev/v1
22
kind: Pipeline
33
metadata:
44
name: collector-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
@@ -125,6 +131,7 @@ spec:
125131
on the cluster: https://konflux.pages.redhat.com/docs/users/getting-started/multi-platform-builds.html
126132
name: build-platforms
127133
type: array
134+
128135
results:
129136
- description: ""
130137
name: IMAGE_URL
@@ -138,17 +145,20 @@ spec:
138145
- description: ""
139146
name: CHAINS-GIT_COMMIT
140147
value: $(tasks.clone-repository.results.commit)
148+
141149
workspaces:
142150
- name: git-auth
151+
143152
tasks:
153+
144154
- name: post-metric-start
145155
taskRef: *post-bigquery-metrics-ref
146156
- name: init
147157
params:
148158
- name: image-url
149-
# We can't provide a StackRox-style tag because it is not known at this time (requires cloning source, etc.)
150-
# As a workaround, we still provide a unique tag that's based on a revision in order for this task to comply with
151-
# its expected input. We later actually add this tag on a built image with the apply-index-image-tag task.
159+
# We can't provide a StackRox-style tag because it is not known at this time (requires cloning source, etc.)
160+
# As a workaround, we still provide a unique tag that's based on a revision in order for this task to comply with
161+
# its expected input. We later actually add this tag on a built image with the apply-index-image-tag task.
152162
value: $(params.output-image-repo):konflux-$(params.revision)
153163
- name: rebuild
154164
value: $(params.rebuild)
@@ -161,6 +171,7 @@ spec:
161171
- name: kind
162172
value: task
163173
resolver: bundles
174+
164175
- name: clone-repository
165176
params:
166177
- name: url
@@ -189,10 +200,11 @@ spec:
189200
when:
190201
- input: $(tasks.init.results.build)
191202
operator: in
192-
values: ["true"]
203+
values: [ "true" ]
193204
workspaces:
194205
- name: basic-auth
195206
workspace: git-auth
207+
196208
- name: determine-image-expiration
197209
params:
198210
- name: DEFAULT_IMAGE_EXPIRES_AFTER
@@ -208,6 +220,7 @@ spec:
208220
- name: kind
209221
value: task
210222
resolver: bundles
223+
211224
- name: determine-image-tag
212225
params:
213226
- name: TAG_SUFFIX
@@ -223,6 +236,7 @@ spec:
223236
- name: kind
224237
value: task
225238
resolver: bundles
239+
226240
- name: prefetch-dependencies
227241
params:
228242
- name: input
@@ -235,7 +249,7 @@ spec:
235249
value: $(params.oci-artifact-expires-after)
236250
- name: ACTIVATION_KEY
237251
value: subscription-manager-activation-key-prod
238-
# Required for the RPM prefetching support.
252+
# Required for the RPM prefetching support.
239253
- name: dev-package-managers
240254
value: "true"
241255
taskRef:
@@ -250,6 +264,7 @@ spec:
250264
workspaces:
251265
- name: git-basic-auth
252266
workspace: git-auth
267+
253268
- name: build-images
254269
matrix:
255270
params:
@@ -285,7 +300,7 @@ spec:
285300
- name: BUILDAH_FORMAT
286301
value: $(params.buildah-format)
287302
- name: LABELS
288-
value: ["$(params.extra-labels[*])"]
303+
value: [ "$(params.extra-labels[*])" ]
289304
- name: BUILD_TIMESTAMP
290305
value: "$(tasks.clone-repository.results.commit-timestamp)"
291306
taskRef:
@@ -300,8 +315,9 @@ spec:
300315
when:
301316
- input: $(tasks.init.results.build)
302317
operator: in
303-
values: ["true"]
318+
values: [ "true" ]
304319
timeout: 1h30m0s
320+
305321
- name: build-image-index
306322
params:
307323
- name: IMAGE
@@ -328,7 +344,8 @@ spec:
328344
when:
329345
- input: $(tasks.init.results.build)
330346
operator: in
331-
values: ["true"]
347+
values: [ "true" ]
348+
332349
- name: apply-index-image-tag
333350
params:
334351
- name: IMAGE_URL
@@ -350,7 +367,8 @@ spec:
350367
when:
351368
- input: $(tasks.init.results.build)
352369
operator: in
353-
values: ["true"]
370+
values: [ "true" ]
371+
354372
- name: build-source-image
355373
params:
356374
- name: BINARY_IMAGE
@@ -373,10 +391,11 @@ spec:
373391
when:
374392
- input: $(tasks.init.results.build)
375393
operator: in
376-
values: ["true"]
394+
values: [ "true" ]
377395
- input: $(params.build-source-image)
378396
operator: in
379-
values: ["true"]
397+
values: [ "true" ]
398+
380399
- name: deprecated-base-image-check
381400
params:
382401
- name: IMAGE_URL
@@ -395,7 +414,8 @@ spec:
395414
when:
396415
- input: $(params.skip-checks)
397416
operator: in
398-
values: ["false"]
417+
values: [ "false" ]
418+
399419
- name: clair-scan
400420
matrix:
401421
params:
@@ -419,7 +439,8 @@ spec:
419439
when:
420440
- input: $(params.skip-checks)
421441
operator: in
422-
values: ["false"]
442+
values: [ "false" ]
443+
423444
- name: ecosystem-cert-preflight-checks
424445
matrix:
425446
params:
@@ -441,7 +462,8 @@ spec:
441462
when:
442463
- input: $(params.skip-checks)
443464
operator: in
444-
values: ["false"]
465+
values: [ "false" ]
466+
445467
- name: sast-shell-check
446468
params:
447469
- name: image-digest
@@ -464,7 +486,8 @@ spec:
464486
when:
465487
- input: $(params.skip-checks)
466488
operator: in
467-
values: ["false"]
489+
values: [ "false" ]
490+
468491
- name: sast-unicode-check
469492
params:
470493
- name: image-digest
@@ -487,7 +510,8 @@ spec:
487510
when:
488511
- input: $(params.skip-checks)
489512
operator: in
490-
values: ["false"]
513+
values: [ "false" ]
514+
491515
- name: sast-snyk-check
492516
params:
493517
- name: SOURCE_ARTIFACT
@@ -510,7 +534,8 @@ spec:
510534
when:
511535
- input: $(params.skip-checks)
512536
operator: in
513-
values: ["false"]
537+
values: [ "false" ]
538+
514539
- name: clamav-scan
515540
matrix:
516541
params:
@@ -534,7 +559,8 @@ spec:
534559
when:
535560
- input: $(params.skip-checks)
536561
operator: in
537-
values: ["false"]
562+
values: [ "false" ]
563+
538564
- name: rpms-signature-scan
539565
params:
540566
- name: image-digest
@@ -553,7 +579,8 @@ spec:
553579
when:
554580
- input: $(params.skip-checks)
555581
operator: in
556-
values: ["false"]
582+
values: [ "false" ]
583+
557584
- name: push-dockerfile
558585
params:
559586
- name: IMAGE

0 commit comments

Comments
 (0)