Skip to content
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

test: add anaconda-iso build tests with signed containers #687

Merged
merged 1 commit into from
Nov 5, 2024

Conversation

mmartinv
Copy link
Contributor

Add anaconda-iso iso build tests with signed containers.
The rest of the images can be also added to the test once
[1] and [2] are merged

[1] osbuild/images#990
[2] osbuild/osbuild#1906

Signed-off-by: Miguel Martín [email protected]

@chunfuwen
Copy link

From user perspective, can we assume bib can now build out one anaconda-iso with signed bootc container image ?

@mmartinv
Copy link
Contributor Author

From user perspective, can we assume bib can now build out one anaconda-iso with signed bootc container image ?

Yes, since #676 was merged

@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch 4 times, most recently from ee6c346 to ab8e6d2 Compare October 24, 2024 08:00
Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this very nice test!

Some quick notes inline and maybe we can get away without skopeo copy in bib if we actually implement osbuild/osbuild#1907 - having the test is still good though.

I like the thoroughness of the test but it's expensive (timewise in CI) so I wonder if we can find a faster way (see my inline comment). Maybe not, but worth thinking about I feel.

test/testcases.py Show resolved Hide resolved
test/test_build.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testcases.py Outdated Show resolved Hide resolved
@chunfuwen
Copy link

In order to validate feature related to this, assuming I had one signed container image,e.g:registry.redhat.io/rhel9/rhel-bootc:9.4.
So do I have to execute sudo skopeo copy --remove-signatures registry.redhat.io/rhel9/rhel-bootc:9.4 registry.redhat.io/rhel9/rhel-bootc:9.4 before I call sudo podman run --rm -i --privileged --pull=newer --security-opt label=type:unconfined_t -v /var/lib/containers/storage:/var/lib/containers/storage quay.io/centos-bootc/bootc-image-builder:latest --type anaconda-iso --local registry.redhat.io/rhel9/rhel-bootc:9.4 ?

@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch 3 times, most recently from 5c38dc0 to efe9934 Compare October 25, 2024 17:43
@mmartinv mmartinv requested a review from mvo5 October 25, 2024 17:44
@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch 2 times, most recently from d954cd4 to da31052 Compare October 29, 2024 10:58
test/testutil.py Outdated Show resolved Hide resolved
@mmartinv
Copy link
Contributor Author

In order to validate feature related to this, assuming I had one signed container image,e.g:registry.redhat.io/rhel9/rhel-bootc:9.4. So do I have to execute sudo skopeo copy --remove-signatures registry.redhat.io/rhel9/rhel-bootc:9.4 registry.redhat.io/rhel9/rhel-bootc:9.4 before I call sudo podman run --rm -i --privileged --pull=newer --security-opt label=type:unconfined_t -v /var/lib/containers/storage:/var/lib/containers/storage quay.io/centos-bootc/bootc-image-builder:latest --type anaconda-iso --local registry.redhat.io/rhel9/rhel-bootc:9.4 ?

No, you don't need to copy anything, using the signed container directly should work as is. Not sure if the change is already available in quay.io/centos-bootc/bootc-image-builder:latest though.

@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch 2 times, most recently from 37417e2 to 867bd15 Compare November 4, 2024 09:02
Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the branch and the update. I added a bunch of small questions/suggestions (hope they are useful). The one bigger point that prevents me from approving is that it seems to modify the host system configuration which I would really love to avoid. If there is no way to avoid it, maybe we can add a pytest condition that skips the test unless e.g. an env like BIB_TEST_MODIFY_SYSTEM=1 is set (or a parameter to pytest with a similar name9 and then we set this for the GH action/testing farm tests but not for the default, wdyt?

test/test_build.py Outdated Show resolved Hide resolved
test/test_build.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
test/testutil.py Outdated Show resolved Hide resolved
@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch 3 times, most recently from 20ef0d9 to 742cf72 Compare November 5, 2024 08:26
@mmartinv mmartinv requested a review from mvo5 November 5, 2024 08:29
@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch from 742cf72 to dfe1089 Compare November 5, 2024 09:29
mvo5
mvo5 previously approved these changes Nov 5, 2024
Copy link
Collaborator

@mvo5 mvo5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! This is very nice now.

@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch from dfe1089 to 022b34b Compare November 5, 2024 12:28
Add anaconda-iso iso build tests with signed containers.
The rest of the images can be also added to the test once
[1] and [2] are merged

[1] osbuild/images#990
[2] osbuild/osbuild#1906

Signed-off-by: Miguel Martín <[email protected]>
@mmartinv mmartinv force-pushed the anaconda-iso-signed-container-tests branch from 022b34b to 2735bf8 Compare November 5, 2024 13:32
@mvo5 mvo5 added this pull request to the merge queue Nov 5, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 5, 2024
@mvo5 mvo5 added this pull request to the merge queue Nov 5, 2024
Merged via the queue into osbuild:main with commit 9c1f39b Nov 5, 2024
8 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants