Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions hack/Containerfile.packit
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ FROM quay.io/centos-bootc/centos-bootc:stream10

WORKDIR /bootc-test

# Some rhts-*, rstrnt-* and tmt-* commands are in /usr/local/bin
COPY bin /usr/local/bin
# Save testing farm run files
COPY ARTIFACTS /var/ARTIFACTS
# Copy bootc repo
Expand All @@ -19,8 +17,18 @@ set -xeuo pipefail
if [[ $ID == "rhel" ]]; then
cp rhel.repo /etc/yum.repos.d/
fi
# OSCI uses /var/lib/tmt/scripts to save tmt-* commands
# Fedora CI and Packit use /usr/local/bin
if [[ -d scripts ]]; then
mkdir -p /var/lib/tmt
cp -r scripts /var/lib/tmt/
else
cp -r bin /usr/local
fi
cp test-artifacts.repo /etc/yum.repos.d/
dnf -y update bootc
# Required by tmt avc checking after test
dnf -y install audit
./provision-derived.sh

# For test-22-logically-bound-install
Expand Down
3 changes: 3 additions & 0 deletions hack/packit-reboot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@
tasks:
- name: Reboot system to image mode
reboot:
reboot_timeout: 1200
connect_timeout: 30
pre_reboot_delay: 15

- name: Wait for connection to become reachable/usable
wait_for_connection:
Expand Down
6 changes: 4 additions & 2 deletions hack/provision-packit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ source /etc/os-release
# Some rhts-*, rstrnt-* and tmt-* commands are in /usr/local/bin
if [[ -d /var/lib/tmt/scripts ]]; then
cp -r /var/lib/tmt/scripts "$BOOTC_TEMPDIR"
ls -al "${BOOTC_TEMPDIR}/scripts"
else
cp -r /usr/local/bin "$BOOTC_TEMPDIR"
ls -al "${BOOTC_TEMPDIR}/bin"
fi
Comment on lines 25 to 31
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The ls -al commands on lines 27 and 30 seem to be for debugging. It's best to remove them to keep the script and its output clean.

Suggested change
if [[ -d /var/lib/tmt/scripts ]]; then
cp -r /var/lib/tmt/scripts "$BOOTC_TEMPDIR"
ls -al "${BOOTC_TEMPDIR}/scripts"
else
cp -r /usr/local/bin "$BOOTC_TEMPDIR"
ls -al "${BOOTC_TEMPDIR}/bin"
fi
if [[ -d /var/lib/tmt/scripts ]]; then
cp -r /var/lib/tmt/scripts "$BOOTC_TEMPDIR"
else
cp -r /usr/local/bin "$BOOTC_TEMPDIR"
fi


# Get base image URL
TEST_OS="${ID}-${VERSION_ID}"
BASE=$(cat os-image-map.json | jq --arg v "$TEST_OS" '.[$v]')
BASE=$(jq -r --arg v "$TEST_OS" '.[$v]' < os-image-map.json)

if [[ "$ID" == "rhel" ]]; then
# OSCI gating only
Expand Down Expand Up @@ -78,7 +80,7 @@ ls -al /var/share/test-artifacts
cp /etc/yum.repos.d/test-artifacts.repo "$BOOTC_TEMPDIR"

# Let's check things in hack folder
ls -al "$BOOTC_TEMPDIR" "${BOOTC_TEMPDIR}/bin"
ls -al "$BOOTC_TEMPDIR"
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

This ls command appears to be for debugging. It should be removed to keep the script's output clean.


# Do not use just because it's only available on Fedora, not on CS and RHEL
podman build --jobs=4 --from "$BASE" -v "$BOOTC_TEMPDIR":/bootc-test:z -t localhost/bootc-integration -f "${BOOTC_TEMPDIR}/Containerfile.packit" "$BOOTC_TEMPDIR"
Expand Down