mirror of
https://github.com/containers/bootc.git
synced 2026-02-05 06:45:13 +01:00
test: Update to work with OSCI gating test
Signed-off-by: Xiaofeng Wang <henrywangxf@me.com>
This commit is contained in:
committed by
Colin Walters
parent
8c0c2f6299
commit
3a7dd85ff1
@@ -1,5 +1,7 @@
|
||||
{
|
||||
"base": {
|
||||
"rhel-10.2": "images.paas.redhat.com/bootc/rhel-bootc:latest-10.2",
|
||||
"rhel-9.8": "images.paas.redhat.com/bootc/rhel-bootc:latest-9.8",
|
||||
"centos-9": "quay.io/centos-bootc/centos-bootc:stream9",
|
||||
"centos-10": "quay.io/centos-bootc/centos-bootc:stream10",
|
||||
"fedora-42": "quay.io/fedora/fedora-bootc:42",
|
||||
|
||||
@@ -32,11 +32,30 @@ def initial_build [] {
|
||||
|
||||
bootc image copy-to-storage
|
||||
|
||||
# copy-to-storage does not copy repo file
|
||||
# but OSCI gating test needs repo to install package
|
||||
let os = open /usr/lib/os-release
|
||||
| lines
|
||||
| filter {|l| $l != "" and not ($l | str starts-with "#") }
|
||||
| parse "{key}={value}"
|
||||
| reduce {|it, acc|
|
||||
$acc | upsert $it.key ($it.value | str trim -c '"')
|
||||
}
|
||||
mut repo_copy = ""
|
||||
|
||||
if $os.ID == "rhel" {
|
||||
cp /etc/yum.repos.d/rhel.repo .
|
||||
$repo_copy = "COPY rhel.repo /etc/yum.repos.d/"
|
||||
}
|
||||
|
||||
# Create a derived container that installs a custom SELinux policy module
|
||||
# Installing a policy module will change the compiled policy checksum
|
||||
# Following Colin's suggestion and the composefs-rs example
|
||||
# We create a minimal policy module and install it
|
||||
"FROM localhost/bootc
|
||||
$"
|
||||
FROM localhost/bootc
|
||||
($repo_copy)
|
||||
|
||||
# Install tools needed to build and install SELinux policy modules
|
||||
RUN dnf install -y selinux-policy-devel checkpolicy policycoreutils
|
||||
|
||||
|
||||
Reference in New Issue
Block a user