Skip to content

Commit 43a276f

Browse files
authored
ROX-28955: Konflux Patches for 4.7 (#1947)
1 parent f1df572 commit 43a276f

13 files changed

+317
-71
lines changed

.github/CODEOWNERS

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@
22
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#about-code-owners
33
# This will automatically assign a team / people as reviewers for PRs based on the files changed within the PR.
44

5-
# The RHTAP maintainers for ACS review all changes related to the Konflux/RHTAP pipelines, such as new pipelines,
6-
# parameter changes or automated task updates.
7-
/.tekton/ @stackrox/rhtap-maintainers
5+
# The RHTAP maintainers for ACS review all changes related to the Konflux (f.k.a. RHTAP) pipelines, such as new
6+
# pipelines, parameter changes or automated task updates as well as Dockerfile updates.
7+
**/konflux.*Dockerfile @stackrox/rhtap-maintainers
8+
/.konflux/ @stackrox/rhtap-maintainers
9+
/.tekton/ @stackrox/rhtap-maintainers
10+
rpms.* @stackrox/rhtap-maintainers

.github/renovate.json5

Lines changed: 34 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,18 @@
33

44
// After making changes to this file, you can validate it by running something like this in the root of the repo:
55
// $ docker run --rm -it --entrypoint=renovate-config-validator -v "$(pwd)":/mnt -w /mnt renovate/renovate --strict
6+
// Note: ignore errors about the config for `rpm`. This is to be addressed with https://issues.redhat.com/browse/CWFHEALTH-4117
67
// There are more validation options, see https://docs.renovatebot.com/config-validation/
78

89
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
910
"extends": [
10-
// This inherits the base Konflux config.
11-
// Clickable link https://github.com/konflux-ci/mintmaker/blob/main/config/renovate/renovate.json
12-
// The following was used as example (we may want to check it if the base config gets suddenly moved):
11+
// Note that the base Konflux's MintMaker config gets inherited/included automatically per
12+
// https://redhat-internal.slack.com/archives/C04PZ7H0VA8/p1745492139282819?thread_ts=1745309786.090319&cid=C04PZ7H0VA8
13+
// The config is: https://github.com/konflux-ci/mintmaker/blob/main/config/renovate/renovate.json
14+
// We found out about it here (we may want to check that location if the base config gets suddenly moved):
1315
// https://github.com/enterprise-contract/ec-cli/blob/407847910ad420850385eea1db78e2a2e49c7e25/renovate.json#L1C1-L7C2
14-
"github>konflux-ci/mintmaker//config/renovate/renovate.json",
15-
// This tells Renovate to combine all updates in one PR so that we have less PRs to deal with.
16+
17+
// This tells Renovate to combine all updates in one PR so that we have fewer PRs to deal with.
1618
"group:all",
1719
],
1820
"timezone": "Etc/UTC",
@@ -27,21 +29,46 @@
2729
"updateNotScheduled": false,
2830
"tekton": {
2931
"schedule": [
30-
// For some reason, Konflux config defines custom schedule on each type of dependency manager and that takes
31-
// precedence over the global/default schedule. We want our own schedule and hence need to make this override.
32+
// Override Konflux custom schedule for this manager to our intended one.
3233
"after 3am and before 7am",
3334
],
35+
"packageRules": [
36+
// Note: the packageRules from the Konflux config (find URL in comments above) get merged with these.
37+
{
38+
"groupName": "StackRox custom Konflux Tasks",
39+
"matchPackageNames": [
40+
"/^quay.io/rhacs-eng/konflux-tasks/",
41+
],
42+
},
43+
],
3444
},
3545
"dockerfile": {
3646
"includePaths": [
3747
// Instruct Renovate not try to update Dockerfiles other than konflux.Dockerfile (or konflux.anything.Dockerfile)
3848
// to have less PR noise.
3949
"**/*konflux*.Dockerfile",
4050
],
51+
"schedule": [
52+
// Override Konflux custom schedule for this manager to our intended one.
53+
"after 3am and before 7am",
54+
],
55+
"postUpgradeTasks": {
56+
"commands": [
57+
// Refresh the rpm lockfile after updating image references in the dockerfile.
58+
"rpm-lockfile-prototype rpms.in.yaml",
59+
],
60+
},
61+
},
62+
"rpm": {
63+
"schedule": [
64+
// Override Konflux custom schedule for this manager to our intended one.
65+
"after 3am and before 7am",
66+
],
4167
},
4268
"enabledManagers": [
4369
// Restrict Renovate focus on Konflux things since we rely on GitHub's dependabot for everything else.
4470
"tekton",
4571
"dockerfile",
72+
"rpm",
4673
],
4774
}

.syft.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Konflux uses Syft to generate container SBOMs.
2+
# Syft config docs https://github.com/anchore/syft/wiki/configuration
3+
4+
# Here we exclude files checked in this repo for testing purposes from being parsed and merged into SBOM.
5+
# This is in particular to prevent rpm packages from `./pkg/rhelv2/rpm/testdata/rpmdb.sqlite` and similar to be included
6+
# in the SBOMs of built containers.
7+
exclude:
8+
- ./**/testdata/**

.tekton/scanner-build.yaml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,21 @@ spec:
3636
- name: image-expires-after
3737
value: '13w'
3838
- name: output-image-repo
39-
value: quay.io/rhacs-eng/scanner
39+
value: quay.io/rhacs-eng/release-scanner
4040
- name: path-context
4141
value: .
4242
- name: revision
4343
value: '{{revision}}'
4444
- name: rebuild
4545
value: 'true'
46-
# TODO(ROX-20234): Enable hermetic builds
47-
# - name: hermetic
48-
# value: "true"
46+
- name: hermetic
47+
value: "true"
4948
- name: prefetch-input
50-
value: '{"type": "gomod", "path": "."}'
49+
value: |
50+
[
51+
{ "type": "gomod", "path": "." },
52+
{ "type": "rpm", "path": "." }
53+
]
5154
- name: build-source-image
5255
value: 'true'
5356
- name: build-target-stage
@@ -76,6 +79,9 @@ spec:
7679
requests:
7780
cpu: 2
7881

82+
taskRunTemplate:
83+
serviceAccountName: build-pipeline-scanner
84+
7985
# Multiarch builds sometimes make the pipeline timeout after 1h.
8086
# Tagged builds wait for blobs to be published which takes about 1h.
8187
timeouts:

0 commit comments

Comments
 (0)