Skip to content

Commit

Permalink
Add lock file for RPMs to enable hermetic builds
Browse files Browse the repository at this point in the history
This commit introduces a lock file for RPMs so that we can produce
hermetic builds with Konflux, following the guidance in documentation:

  konflux-ci/docs#192
  • Loading branch information
rhmdnd committed Dec 12, 2024
1 parent 9bc9fc3 commit e82d92b
Show file tree
Hide file tree
Showing 9 changed files with 369 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .tekton/compliance-operator-must-gather-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ spec:
- name: dockerfile
value: images/must-gather/Containerfile
- name: hermetic
value: "false"
value: "true"
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
2 changes: 1 addition & 1 deletion .tekton/compliance-operator-must-gather-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ spec:
- name: dockerfile
value: images/must-gather/Containerfile
- name: hermetic
value: "false"
value: "true"
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
2 changes: 2 additions & 0 deletions .tekton/compliance-operator-openscap-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ spec:
value: images/openscap/Containerfile
- name: path-context
value: images/openscap
- name: hermetic
value: "true"
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
2 changes: 2 additions & 0 deletions .tekton/compliance-operator-openscap-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ spec:
value: images/openscap/Containerfile
- name: path-context
value: images/openscap
- name: hermetic
value: "true"
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
2 changes: 2 additions & 0 deletions .tekton/compliance-operator-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ spec:
- linux/x86_64
- name: dockerfile
value: images/operator/Dockerfile
- name: hermetic
value: "true"
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
2 changes: 2 additions & 0 deletions .tekton/compliance-operator-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ spec:
- linux/x86_64
- name: dockerfile
value: images/operator/Dockerfile
- name: hermetic
value: "true"
pipelineSpec:
description: |
This pipeline is ideal for building multi-arch container images from a Containerfile while maintaining trust after pipeline customization.
Expand Down
41 changes: 41 additions & 0 deletions redhat.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
[rhocp-4.16-for-rhel-9-$basearch-rpms]
name = Red Hat OpenShift Container Platform 4.16 for RHEL 9 $basearch (RPMs)
baseurl = https://cdn.redhat.com/content/dist/layered/rhel9/$basearch/rhocp/4.16/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm-host/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement-host/1063693491304658595-key.pem
sslclientcert = /etc/pki/entitlement-host/1063693491304658595.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 0

[rhel-9-for-$basearch-baseos-rpms]
name = Red Hat Enterprise Linux 9 for $basearch - BaseOS (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel9/$releasever/$basearch/baseos/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm-host/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement-host/1063693491304658595-key.pem
sslclientcert = /etc/pki/entitlement-host/1063693491304658595.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 1

[rhel-9-for-$basearch-appstream-rpms]
name = Red Hat Enterprise Linux 9 for $basearch - AppStream (RPMs)
baseurl = https://cdn.redhat.com/content/dist/rhel9/$releasever/$basearch/appstream/os
enabled = 1
gpgcheck = 1
gpgkey = file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify = 1
sslcacert = /etc/rhsm-host/ca/redhat-uep.pem
sslclientkey = /etc/pki/entitlement-host/1063693491304658595-key.pem
sslclientcert = /etc/pki/entitlement-host/1063693491304658595.pem
sslverifystatus = 1
metadata_expire = 86400
enabled_metadata = 1
18 changes: 18 additions & 0 deletions rpms.in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
contentOrigin:
repofiles:
- ./redhat.repo

packages:
- jq
- openshift-clients
- rsync
- tar

arches:
- aarch64
- x86_64
- s390x
- ppc64le

context:
containerfile: images/must-gather/Containerfile
Loading

0 comments on commit e82d92b

Please sign in to comment.