Skip to content

ci: add Image Mode test automation without Packit #770

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mcattamoredhat
Copy link
Collaborator

This is an approach to add Image Mode RHEL-10 ci tests without using Packit, and making rpm packages within the testing farm spawned VM instead.

The reason to proceed without Packit is to circumvent the difficulty of handling environment secrets, that implies encrypting needed secrets in every fork that opens a pull request against upstream repository.

@mcattamoredhat mcattamoredhat self-assigned this May 27, 2025
@mcattamoredhat mcattamoredhat requested review from mmartinv and runcom May 27, 2025 14:03
@mcattamoredhat mcattamoredhat marked this pull request as ready for review May 27, 2025 14:04
@miabbott
Copy link
Contributor

@yih-redhat can you review this please?


# Manufacturing server setup
# Clone downstream repo custom branch (fdo simplified installer setup skipping disk encryption)
git clone -b fdo-man-server-infra https://github.com/mcattamoredhat/rhel-edge.git && cd rhel-edge
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't like using personal git repos as place to host code we are using more broadly.

Could we create a specific branch under https://github.com/virt-s1/rhel-edge that could contain these modifications?

Longer term, I also worry about keeping the modified version of the test in sync with the main version. Can we explore a way to not have to use this fork/modified version as a future piece of work?

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed, ultimately anything forked for the short term should have a route back upstream to reduce ongoing rebasing, but in the short term we could also have a repo in this org if a PR to get it back upstream isn't possible. It would be good to have the details of the options documented in this ticket or somewhere public.

Comment on lines 146 to 147
user --name=admin --groups=wheel --iscrypted --password=\$6\$1LgwKw9aOoAi/Zy9\$Pn3ErY1E8/yEanJ98evqKEW.DZp24HTuqXPJl6GYCm8uuobAmwxLv7rGCvTRZhxtcYdmC0.XnYRSR9Sh6de3p0
sshkey --username=admin "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCzxo5dEcS+LDK/OFAfHo6740EyoDM8aYaCkBala0FnWfMMTOq7PQe04ahB0eFLS3IlQtK5bpgzxBdFGVqF6uT5z4hhaPjQec0G3+BD5Pxo6V+SxShKZo+ZNGU3HVrF9p2V7QH0YFQj5B8F6AicA3fYh2BVUFECTPuMpy5A52ufWu0r4xOFmbU7SIhRQRAQz2u4yjXqBsrpYptAvyzzoN4gjUhNnwOHSPsvFpWoBFkWmqn0ytgHg3Vv9DlHW+45P02QH1UFedXR2MqLnwRI30qqtaOkVS+9rE/dhnR+XPpHHG+hv2TgMDAuQ3IK7Ab5m/yCbN73cxFifH4LST0vVG3Jx45xn+GTeHHhfkAfBSCtya6191jixbqyovpRunCBKexI5cfRPtWOitM3m7Mq26r7LpobMM+oOLUm4p0KKNIthWcmK9tYwXWSuGGfUQ+Y8gt7E0G06ZGbCPHOrxJ8lYQqXsif04piONPA/c9Hq43O99KPNGShONCS9oPFdOLRT3U= ostree-image-test"
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to configure the password and ssh key as secrets that can be injected when the test is run?

Copy link
Contributor

Choose a reason for hiding this comment

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

Personally, I would generate the ssh key pair for each test unless the SSH_KEY var is defined but we can leave that for a follow up PR.

Copy link
Contributor

@djach7 djach7 left a comment

Choose a reason for hiding this comment

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

Reviewed manually and with github copilot, no syntactical or semantic issues found. I have one very minor nit just for consistency.

@yih-redhat
Copy link

@mcattamoredhat Hi, I am not familiar with the tmt structure in this pr (it's different than what I did before), just wondering if the workflow can find the tmt plan/tests and trigger test script properly?

@mcattamoredhat
Copy link
Collaborator Author

@mcattamoredhat Hi, I am not familiar with the tmt structure in this pr (it's different than what I did before), just wondering if the workflow can find the tmt plan/tests and trigger test script properly?

@yih-redhat This is because .fmf folder location is different than greenboot ci code or downstream ci code.

The workflow is able to discover tmt plans/tests thanks to tmt_path input https://github.com/fdo-rs/fido-device-onboard-rs/pull/770/files#diff-ce39f44ea7732d0fbb4f2cecba1ead3eab68c156e4114244c167b1ca9d842be4R56 where the location of .fmf folder is specified. This is enough for the workflow to be able to find tests/plans.

@djach7
Copy link
Contributor

djach7 commented Jun 9, 2025

Pulled this down and built successfully on my local machine. Thanks for fixing that minor nit too. It looks like there's a couple of clippy/spelling issues but otherwise LGTM. (I see the dev container and triage failures too but I think those are unrelated, someone please correct me if I'm wrong though.)

Copy link
Contributor

@mmartinv mmartinv left a comment

Choose a reason for hiding this comment

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

Failing tests have nothing to do with the proposed changes and overall it LGTM

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.

6 participants