-
Notifications
You must be signed in to change notification settings - Fork 155
test: Update to work with OSCI gating test #1842
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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/" | ||
|
Comment on lines
+47
to
+48
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The filename If For better robustness and portability, you might consider copying all if $os.ID == "rhel" {
cp (glob /etc/yum.repos.d/*.repo) .
$repo_copy = "COPY *.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 | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The manual parsing of
/usr/lib/os-releasecan be simplified. Nushell'sfrom dotenvcommand can parse this file format directly, making the code more concise and readable.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one looks like a hallucination
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Haha, there's no
dotenvin my side.