Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

henrywang
Copy link
Collaborator

Use 'system-reinstall-bootc' to re-install TF runner from package mode to image mode

@bootc-bot bootc-bot bot requested a review from jeckersb September 24, 2025 07:17
@henrywang henrywang force-pushed the gating branch 9 times, most recently from cde5644 to 61205f8 Compare September 24, 2025 16:25
Copy link
Collaborator

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

Thanks for picking this up!

source /etc/os-release
case "$ID" in
"centos")
BASE="quay.io/centos-bootc/centos-bootc:stream${VERSION_ID}"
Copy link
Collaborator

Choose a reason for hiding this comment

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

We keep adding new copies of this...I'd like to consolidate that. here's an random idea. How about we add a field BOOTC_IMAGE into os-release?

But in the intermediate term, I think we could probably have a lib.sh or something that's shared with build.sh too that we use here?

A different idea: Move all the tmt stuff into tests/ and have this "image mapping helper" live in tests?

Copy link
Collaborator Author

@henrywang henrywang Sep 24, 2025

Choose a reason for hiding this comment

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

Thinking... Create a file with content like BASE_CENOTS_10=quay.io/centos-bootc/centos-bootc:stream10 and source it?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@henrywang henrywang force-pushed the gating branch 8 times, most recently from 4fe2142 to b246f67 Compare September 26, 2025 09:10
@henrywang henrywang changed the title [WIP] test: Add Packit and gating test test: Add Packit and gating test Sep 26, 2025
@henrywang henrywang force-pushed the gating branch 3 times, most recently from cfea8f4 to 138dc6b Compare September 26, 2025 12:50
discover+:
how: fmf
test:
- /tmt/tests/test-00-system-reinstall-bootc
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can't we do this step not as a test but as a "provision phase" step?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm trying to run this in tmt prepare https://github.com/bootc-dev/bootc/pull/1642/files#diff-bbbfb45ca8f2b20a0985a7efd1f2d17bda0102fb40dcee7f43b6db2ef32a4433R16, and it'll not be a tmt test any more. And it's possible to share same tmt plan (only package mode VM, Packit and gating in this case, run this provision script, github and local run is running on image mode VM) to avoid duplicate plan issue.

how: tmt
exit-first: true

/test-01-readonly:
Copy link
Collaborator

Choose a reason for hiding this comment

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

We had an existing problem where "add a new test" requires a lot of ceremony (write the code as a file, write the fmf file, then add it to the plan) - it'd be really great to fix this (can't we use the tmt discover stuff).

But this takes that problem and makes it worse as now all the tests are listed twice more in this file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Same as above comment.

trap 'rm -rf -- "$BOOTC_TEMPDIR"' EXIT

# Copy files and folders in hack to TEMPDIR
cp -a ../../hack/* "$BOOTC_TEMPDIR"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think it's a lot cleaner to do cd $BOOTC_TMPDIR and then everything can just reference . below

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The tmt test running folder is at tmt test fmf file folder. The folder id not identical every tmt/testing farm run. So I can't leave this folder before copy all files into $BOOTC_TMPDIR.

@henrywang henrywang force-pushed the gating branch 6 times, most recently from 8e6d931 to 62cd486 Compare September 28, 2025 16:13
@henrywang henrywang force-pushed the gating branch 6 times, most recently from ab58996 to 8f1f5e0 Compare September 29, 2025 05:43
Use 'system-reinstall-bootc' to re-install TF runner from package mode
to image mode

Signed-off-by: Xiaofeng Wang <[email protected]>
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.

2 participants