-
Notifications
You must be signed in to change notification settings - Fork 154
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
kola/kernel-replace: Add OS_ID recogntion #3048
base: testing-devel
Are you sure you want to change the base?
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 |
---|---|---|
|
@@ -5,9 +5,7 @@ | |
## # We've seen some OOM when 1024M is used: | ||
## # https://github.com/coreos/fedora-coreos-tracker/issues/1506 | ||
## minMemory: 2048 | ||
## # This test only runs on FCOS due to a problem with skopeo copy on | ||
## # RHCOS. See: https://github.com/containers/skopeo/issues/1846 | ||
## distros: fcos | ||
## distros: "fcos rhcos scos" | ||
## # Needs internet access as we fetch files from koji | ||
## # We add the "reprovision" tag here even though we aren't | ||
## # reprovisioning as a hack so that in our pipeline the test | ||
|
@@ -43,10 +41,14 @@ set -euxo pipefail | |
cd $(mktemp -d) | ||
|
||
# TODO: It'd be much better to test this via a registry | ||
image_dir=/var/tmp/fcos | ||
image=oci:$image_dir | ||
|
||
# search for a line starting with ID, assign second field after delimiter | ||
OS_ID=$(grep '^ID=' /etc/os-release | cut -d "=" -f2 | cut -d '"' -f2) | ||
|
||
image_dir=/var/tmp/coreos | ||
image=oci:${image_dir} | ||
image_pull=ostree-unverified-image:$image | ||
tmp_imagedir=/var/tmp/fcos-tmp | ||
tmp_imagedir=${image_dir}-tmp | ||
arch=$(arch) | ||
kver="6.2.9-300.fc38.${arch}" | ||
|
||
|
@@ -80,13 +82,13 @@ case "${AUTOPKGTEST_REBOOT_MARK:-}" in | |
1) | ||
# Setup | ||
# copy the OCI dir to containers-storage for a local build | ||
skopeo copy $image containers-storage:localhost/fcos | ||
skopeo copy $image containers-storage:localhost/${OS_ID} | ||
rm "${image_dir}" -rf | ||
td=$(mktemp -d) | ||
cd ${td} | ||
version=$(rpm-ostree --version | grep Version) | ||
cat > Dockerfile << EOF | ||
FROM localhost/fcos | ||
cat > Containerfile << EOF | ||
FROM localhost/${OS_ID} | ||
RUN rpm-ostree cliwrap install-to-root / | ||
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. We should drop this now as per openshift/openshift-docs#77066. 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. I tried to drop this, and replace with the |
||
RUN rpm-ostree override replace \ | ||
https://koji.fedoraproject.org/koji/buildinfo?buildID=2178613 && \ | ||
|
@@ -101,12 +103,12 @@ EOF | |
3.*) touched_resolv_conf=1; touch /etc/resolv.conf;; | ||
esac | ||
fi | ||
podman build --net=host -t localhost/fcos-derived --squash . | ||
podman build --net=host -t localhost/${OS_ID}-derived --squash . | ||
if test "${touched_resolv_conf}" -eq 1; then | ||
rm -vf /etc/resolv.conf | ||
fi | ||
derived=oci:$image_dir:derived | ||
skopeo copy containers-storage:localhost/fcos-derived $derived | ||
skopeo copy containers-storage:localhost/${OS_ID}-derived $derived | ||
rpm-ostree --version | ||
rpm-ostree rebase ostree-unverified-image:$derived | ||
ostree container image list --repo=/ostree/repo | ||
|
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.
just omit the tag would work from what i understand ?
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.
Would it? I'm not sure to be completely honest.