Skip to content
Draft
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
16 changes: 11 additions & 5 deletions test/bin/ci_phase_boot_and_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ source "${SCRIPTDIR}/common.sh"
SCENARIO_SOURCES="${SCENARIO_SOURCES:-${TESTDIR}/scenarios}"
# Directory where all the scenarios will be copied for execution, preserving
# the original scenario type derived from its directory name.
SCENARIOS_TO_RUN="${OUTPUTDIR}/scenarios-$(get_scenario_type_from_path "${SCENARIO_SOURCES}")"
SCENARIO_TYPE="$(get_scenario_type_from_path "${SCENARIO_SOURCES}")"
SCENARIOS_TO_RUN="${OUTPUTDIR}/scenarios-${SCENARIO_TYPE}"

# Copy the scenario definition files to a temporary location from
# which they will be read. This allows filtering the tests from a
Expand Down Expand Up @@ -43,17 +44,22 @@ cd "${ROOTDIR}"
# other scripts use virsh.
bash -x ./scripts/devenv-builder/manage-vm.sh config

# Clean up the image builder cache to free disk for virtual machines
bash -x ./scripts/devenv-builder/cleanup-composer.sh -full
# Clean up the image builder cache to free disk for virtual machines.
# RPM scenarios never set up composer, so there is nothing to clean.
if [[ "${SCENARIO_TYPE}" != "rpm" ]]; then
bash -x ./scripts/devenv-builder/cleanup-composer.sh -full
fi

cd "${ROOTDIR}/test"

# Set up the hypervisor configuration for the tests and start webserver, prometheus and loki
bash -x ./bin/manage_hypervisor_config.sh create

# Setup a container registry and mirror images.
# Release jobs need to also mirror the images from the brew RPMs.
if [[ "${SCENARIO_SOURCES:-}" =~ .*releases.* ]]; then
# RPM scenarios pull directly from upstream registries — no mirror needed.
if [[ "${SCENARIO_TYPE}" == "rpm" ]]; then
echo "Skipping mirror registry for RPM scenarios"
elif [[ "${SCENARIO_SOURCES:-}" =~ .*releases.* ]]; then
bash -x ./bin/mirror_registry.sh -ri "${BREW_RPM_SOURCE}"
else
bash -x ./bin/mirror_registry.sh
Expand Down
104 changes: 69 additions & 35 deletions test/bin/ci_phase_iso_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,14 @@ exec &> >(tee >(awk '{ print strftime("%Y-%m-%d %H:%M:%S"), $0; fflush() }' >"${

PULL_SECRET=${PULL_SECRET:-${HOME}/.pull-secret.json}

# Detect a bootc build mode based on the job name
# Detect build mode based on the job name
COMPOSER_CLI_BUILDS=true
RPM_BUILDS=false
if [ -v CI_JOB_NAME ] && [[ "${CI_JOB_NAME}" =~ .*bootc.* ]]; then
COMPOSER_CLI_BUILDS=false
elif [ -v CI_JOB_NAME ] && [[ "${CI_JOB_NAME}" =~ .*rpm.* ]]; then
RPM_BUILDS=true
COMPOSER_CLI_BUILDS=false
fi

# Allow for a dry-run option to save on testing time
Expand Down Expand Up @@ -205,7 +209,15 @@ cd "${ROOTDIR}"
# Get firewalld and repos in place. Use scripts to get the right repos
# for each branch.
$(dry_run) bash -x ./scripts/devenv-builder/configure-vm.sh --skip-dnf-update --no-build --force-firewall "${PULL_SECRET}"
$(dry_run) bash -x ./test/bin/manage_composer_config.sh create

# RPM builds skip composer entirely — install required packages and start the web server.
if ${RPM_BUILDS} ; then
$(dry_run) sudo dnf install -y "https://dl.fedoraproject.org/pub/epel/epel-release-latest-$(rpm -E %{rhel}).noarch.rpm" || true

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🩺 Stability & Availability | 🟡 Minor | ⚡ Quick win

Do not suppress EPEL installation failures.

|| true allows the required EPEL setup to fail silently. If the repository installation fails, Line 216 may fail later because parallel depends on EPEL. Remove || true, or handle only the already-installed case explicitly.

🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 215-215: This { is literal. Check expression (missing ;/\n?) or quote it.

(SC1083)


[warning] 215-215: This } is literal. Check expression (missing ;/\n?) or quote it.

(SC1083)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/bin/ci_phase_iso_build.sh` at line 215, Remove the unconditional “||
true” from the EPEL installation command in the CI setup flow so failures stop
the build. If idempotency is required, explicitly handle only the
already-installed case while propagating all other installation errors before
the subsequent parallel dependency setup.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/usr/bin/bash
set -euo pipefail
shellcheck test/bin/ci_phase_iso_build.sh

Repository: openshift/microshift

Length of output: 1114


🏁 Script executed:

#!/usr/bin/bash
set -euo pipefail

printf '%s\n' '--- file header ---'
sed -n '1,35p' test/bin/ci_phase_iso_build.sh

printf '%s\n' '--- target and nearby commands ---'
sed -n '205,232p' test/bin/ci_phase_iso_build.sh

printf '%s\n' '--- shellcheck target diagnostics ---'
shellcheck test/bin/ci_phase_iso_build.sh || true

Repository: openshift/microshift

Length of output: 3437


🏁 Script executed:

#!/usr/bin/bash
set -euo pipefail

printf '%s\n' '--- EPEL and RPM build references ---'
rg -n -C 3 'epel|RPM_BUILDS|ci_phase_iso_build|dnf install.*nginx|dnf install.*parallel' \
  --glob '!_output/**' .

printf '%s\n' '--- ShellCheck on an in-memory quoted variant ---'
python3 - <<'PY'
from pathlib import Path
import subprocess

path = Path("test/bin/ci_phase_iso_build.sh")
source = path.read_text()
old = "rpm -E %{rhel}"
new = "rpm -E '%{rhel}'"
if old not in source:
    raise SystemExit("target text not found")
result = subprocess.run(
    ["shellcheck", "-s", "bash", "-"],
    input=source.replace(old, new),
    text=True,
    capture_output=True,
)
print(result.stdout, end="")
print(result.stderr, end="")
print(f"shellcheck_exit={result.returncode}")
PY

Repository: openshift/microshift

Length of output: 11518


🏁 Script executed:

#!/usr/bin/bash
set -euo pipefail

printf '%s\n' '--- dry_run definition and call sites ---'
rg -n -C 8 'dry_run[[:space:]]*\(|function[[:space:]]+dry_run|dry_run=' test/bin/ci_phase_iso_build.sh test/bin

printf '%s\n' '--- source directive and common.sh header ---'
sed -n '220,230p' test/bin/ci_phase_iso_build.sh
sed -n '1,45p' test/bin/common.sh

printf '%s\n' '--- ShellCheck with external sources enabled ---'
shellcheck -x test/bin/ci_phase_iso_build.sh || true

Repository: openshift/microshift

Length of output: 11787


🏁 Script executed:

#!/usr/bin/bash
set -euo pipefail

printf '%s\n' '--- dry_run definition and call sites ---'
rg -n -C 8 'dry_run[[:space:]]*\(|function[[:space:]]+dry_run|dry_run=' \
  test/bin/ci_phase_iso_build.sh test/bin

printf '%s\n' '--- source directive and common.sh header ---'
sed -n '220,230p' test/bin/ci_phase_iso_build.sh
sed -n '1,45p' test/bin/common.sh

printf '%s\n' '--- ShellCheck with external sources enabled ---'
shellcheck -x test/bin/ci_phase_iso_build.sh || true

Repository: openshift/microshift

Length of output: 11787


🏁 Script executed:

#!/usr/bin/bash
set -euo pipefail

printf '%s\n' '--- ShellCheck configuration and invocations ---'
rg -n -C 3 'shellcheck|SC1091|external-sources' \
  --glob '!.git/**' \
  --glob '!vendor/**' \
  --glob '!deps/**' \
  --glob '!etcd/**' \
  .

printf '%s\n' '--- relevant tracked configuration files ---'
git ls-files '*shellcheck*' '.shellcheckrc' '.github/**' '.ci/**' | head -80

Repository: openshift/microshift

Length of output: 50377


Use the required shebang and fix the RPM macro quoting.

  • Change line 1 to #!/usr/bin/bash.
  • Change rpm -E %{rhel} to rpm -E '%{rhel}' to remove SC1083.
  • Validate with shellcheck --external-sources test/bin/ci_phase_iso_build.sh.
🧰 Tools
🪛 Shellcheck (0.11.0)

[warning] 215-215: This { is literal. Check expression (missing ;/\n?) or quote it.

(SC1083)


[warning] 215-215: This } is literal. Check expression (missing ;/\n?) or quote it.

(SC1083)

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/bin/ci_phase_iso_build.sh` at line 215, Update
test/bin/ci_phase_iso_build.sh to use the required #!/usr/bin/bash shebang and
quote the %{rhel} RPM macro in the dnf installation command as rpm -E '%{rhel}'.
Validate the script with shellcheck --external-sources.

Sources: Coding guidelines, Linters/SAST tools

$(dry_run) sudo dnf install -y nginx parallel
$(dry_run) bash -x ./test/bin/manage_webserver.sh start
else
$(dry_run) bash -x ./test/bin/manage_composer_config.sh create
fi

cd "${ROOTDIR}/test/"

Expand All @@ -216,46 +228,68 @@ source "${SCRIPTDIR}/common.sh"
# shellcheck source=test/bin/manage_common_versions.sh
$(dry_run) bash -x "${SCRIPTDIR}/manage_common_versions.sh" verify

if ${COMPOSER_CLI_BUILDS} ; then
# Determine and create the ideal number of workers
$(dry_run) bash -x ./bin/manage_composer_config.sh create-workers
fi

# Check if cache can be used for builds
# This may fail when AWS S3 connection is not configured, or there is no cache bucket
HAS_CACHE_ACCESS=false
if ./bin/manage_build_cache.sh getlast -b "${SCENARIO_BUILD_BRANCH}" -t "${SCENARIO_BUILD_TAG}" ; then
HAS_CACHE_ACCESS=true
fi

# Check the build mode: "try using cache" (default) or "update cache"
if [ $# -gt 0 ] && [ "$1" = "-update_cache" ] ; then
if ${HAS_CACHE_ACCESS} ; then
update_build_cache
else
echo "ERROR: Access to the build cache is not available"
# RPM builds: download installer ISOs from the S3 build cache and build RPMs
# from source. No composer, no image builds.
if ${RPM_BUILDS} ; then
local_cache_tag=$(\
./bin/manage_build_cache.sh getlast \
-b "${SCENARIO_BUILD_BRANCH}" -t "${SCENARIO_BUILD_TAG}" | \
awk '/LAST:/ {print $NF}' \
)
if [[ -z "${local_cache_tag}" ]]; then
echo "ERROR: Cannot determine build cache tag for downloading installer ISOs"
exit 1
fi
else
GOT_CACHED_DATA=false
if ${HAS_CACHE_ACCESS} ; then
if download_build_cache ; then
GOT_CACHED_DATA=true
fi
if [ ! -e "${AWSCLI}" ] ; then
"${ROOTDIR}/scripts/fetch_tools.sh" awscli
fi
if ! ${GOT_CACHED_DATA} ; then
echo "WARNING: Build cache is not available, rebuilding all the artifacts"
local_s3_prefix="s3://${AWS_BUCKET_NAME}/${SCENARIO_BUILD_BRANCH}/$(uname -m)/${local_cache_tag}/vm-storage"
mkdir -p "${IMAGEDIR}/vm-storage"
$(dry_run) "${AWSCLI}" s3 cp "${local_s3_prefix}/rhel98-installer.iso" "${IMAGEDIR}/vm-storage/" --profile "${AWS_PROFILE}"
$(dry_run) "${AWSCLI}" s3 cp "${local_s3_prefix}/rhel102-installer.iso" "${IMAGEDIR}/vm-storage/" --profile "${AWS_PROFILE}"
$(dry_run) bash -x ./bin/build_rpms.sh
else
if ${COMPOSER_CLI_BUILDS} ; then
# Determine and create the ideal number of workers
$(dry_run) bash -x ./bin/manage_composer_config.sh create-workers
fi

# Re-build from source after downloading the cache because
# the build may depend on some cached artifacts
$(dry_run) bash -x ./bin/build_rpms.sh
# Check if cache can be used for builds
# This may fail when AWS S3 connection is not configured, or there is no cache bucket
HAS_CACHE_ACCESS=false
if ./bin/manage_build_cache.sh getlast -b "${SCENARIO_BUILD_BRANCH}" -t "${SCENARIO_BUILD_TAG}" ; then
HAS_CACHE_ACCESS=true
fi

# Optionally run bootc image builds
if ${COMPOSER_CLI_BUILDS} ; then
run_image_build
# Check the build mode: "try using cache" (default) or "update cache"
if [ $# -gt 0 ] && [ "$1" = "-update_cache" ] ; then
if ${HAS_CACHE_ACCESS} ; then
update_build_cache
else
echo "ERROR: Access to the build cache is not available"
exit 1
fi
else
run_bootc_image_build
GOT_CACHED_DATA=false
if ${HAS_CACHE_ACCESS} ; then
if download_build_cache ; then
GOT_CACHED_DATA=true
fi
fi
if ! ${GOT_CACHED_DATA} ; then
echo "WARNING: Build cache is not available, rebuilding all the artifacts"
fi

# Re-build from source after downloading the cache because
# the build may depend on some cached artifacts
$(dry_run) bash -x ./bin/build_rpms.sh

# Optionally run bootc image builds
if ${COMPOSER_CLI_BUILDS} ; then
run_image_build
else
run_bootc_image_build
fi
fi
fi

Expand Down
3 changes: 3 additions & 0 deletions test/bin/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,9 @@ get_scenario_type_from_path() {
*/scenarios-bootc/*)
type="bootc"
;;
*/scenarios-rpm/*)
type="rpm"
;;
*/scenarios-bootc-containers/*)
type="bootc-containers"
;;
Expand Down
3 changes: 2 additions & 1 deletion test/bin/scenario.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1791,7 +1791,8 @@ check_dependencies() {
"${TESTDIR}/bin/manage_webserver.sh" "start"
fi

if ! sudo podman ps --format '{{.Names}}' | grep -q ^microshift-quay ; then
local -r scenario_type="$(get_scenario_type_from_path "${SCENARIO_SCRIPT}")"
if [[ "${scenario_type}" != "rpm" ]] && ! sudo podman ps --format '{{.Names}}' | grep -q ^microshift-quay ; then
"${TESTDIR}/bin/mirror_registry.sh"
fi
}
Expand Down
42 changes: 42 additions & 0 deletions test/scenarios-rpm/presubmits/el102-src@standard1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.
Comment on lines +1 to +3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

📐 Maintainability & Code Quality | 🟠 Major | ⚡ Quick win

Use the required shell initialization in every scenario.

  • test/scenarios-rpm/presubmits/el102-src@standard1.sh#L1-L3: use #!/usr/bin/bash and add set -euo pipefail.
  • test/scenarios-rpm/presubmits/el102-src@standard2.sh#L1-L3: use #!/usr/bin/bash and add set -euo pipefail.
  • test/scenarios-rpm/presubmits/el98-src@standard1.sh#L1-L3: use #!/usr/bin/bash and add set -euo pipefail.
  • test/scenarios-rpm/presubmits/el98-src@standard2.sh#L1-L3: use #!/usr/bin/bash and add set -euo pipefail.
Proposed fix
-#!/bin/bash
+#!/usr/bin/bash
+
+set -euo pipefail

As per coding guidelines, Shell scripts must use the #!/usr/bin/bash shebang and set -euo pipefail.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
#!/bin/bash
# Sourced from scenario.sh and uses functions defined there.
#!/usr/bin/bash
set -euo pipefail
# Sourced from scenario.sh and uses functions defined there.
📍 Affects 4 files
  • test/scenarios-rpm/presubmits/el102-src@standard1.sh#L1-L3 (this comment)
  • test/scenarios-rpm/presubmits/el102-src@standard2.sh#L1-L3
  • test/scenarios-rpm/presubmits/el98-src@standard1.sh#L1-L3
  • test/scenarios-rpm/presubmits/el98-src@standard2.sh#L1-L3
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/scenarios-rpm/presubmits/el102-src`@standard1.sh around lines 1 - 3,
Update the shell initialization in
test/scenarios-rpm/presubmits/el102-src@standard1.sh lines 1-3,
test/scenarios-rpm/presubmits/el102-src@standard2.sh lines 1-3,
test/scenarios-rpm/presubmits/el98-src@standard1.sh lines 1-3, and
test/scenarios-rpm/presubmits/el98-src@standard2.sh lines 1-3: use the
/usr/bin/bash shebang and add set -euo pipefail immediately afterward in each
scenario script.

Source: Coding guidelines


# The installer ISO creates a bare RHEL VM without MicroShift or greenboot.
export SKIP_GREENBOOT=true

# Tests must run in order: install, test, remove.
export TEST_RANDOMIZATION=none

scenario_create_vms() {
prepare_kickstart host1 kickstart-liveimg.ks.template ""
launch_vm rhel102-installer
configure_vm_firewall host1
subscription_manager_register host1
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
local -r source_reponame=$(basename "${LOCAL_REPO}")
local -r source_repo_url="${WEB_SERVER_URL}/rpm-repos/${source_reponame}"
local -r target_version=$(local_rpm_version)
Comment on lines +23 to +25

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Do not mask command failures with local.

local -r name=$(command) masks the command exit status. A failed RPM version lookup can continue with an empty TARGET_VERSION.

  • test/scenarios-rpm/presubmits/el102-src@standard1.sh#L23-L25: declare and assign source_reponame and target_version separately.
  • test/scenarios-rpm/presubmits/el102-src@standard2.sh#L23-L25: declare and assign source_reponame and target_version separately.
  • test/scenarios-rpm/presubmits/el98-src@standard1.sh#L23-L25: declare and assign source_reponame and target_version separately.
  • test/scenarios-rpm/presubmits/el98-src@standard2.sh#L23-L25: declare and assign source_reponame and target_version separately.
Proposed fix
-    local -r source_reponame=$(basename "${LOCAL_REPO}")
+    local source_reponame
+    source_reponame="$(basename -- "${LOCAL_REPO}")"
+    readonly source_reponame
     local -r source_repo_url="${WEB_SERVER_URL}/rpm-repos/${source_reponame}"
-    local -r target_version=$(local_rpm_version)
+    local target_version
+    target_version="$(local_rpm_version)"
+    readonly target_version

As per coding guidelines, Shell scripts must pass shellcheck.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
local -r source_reponame=$(basename "${LOCAL_REPO}")
local -r source_repo_url="${WEB_SERVER_URL}/rpm-repos/${source_reponame}"
local -r target_version=$(local_rpm_version)
local source_reponame
source_reponame="$(basename -- "${LOCAL_REPO}")"
readonly source_reponame
local -r source_repo_url="${WEB_SERVER_URL}/rpm-repos/${source_reponame}"
local target_version
target_version="$(local_rpm_version)"
readonly target_version
📍 Affects 4 files
  • test/scenarios-rpm/presubmits/el102-src@standard1.sh#L23-L25 (this comment)
  • test/scenarios-rpm/presubmits/el102-src@standard2.sh#L23-L25
  • test/scenarios-rpm/presubmits/el98-src@standard1.sh#L23-L25
  • test/scenarios-rpm/presubmits/el98-src@standard2.sh#L23-L25
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/scenarios-rpm/presubmits/el102-src`@standard1.sh around lines 23 - 25,
In test/scenarios-rpm/presubmits/el102-src@standard1.sh lines 23-25, declare
source_reponame and target_version separately from their command substitutions
so failures from basename and local_rpm_version propagate; preserve
source_repo_url and existing readonly behavior. Apply the same change to
test/scenarios-rpm/presubmits/el102-src@standard2.sh lines 23-25,
test/scenarios-rpm/presubmits/el98-src@standard1.sh lines 23-25, and
test/scenarios-rpm/presubmits/el98-src@standard2.sh lines 23-25, ensuring all
scripts pass shellcheck.

Source: Coding guidelines


configure_rhocp_repo "${RHOCP_MINOR_Y}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1}" 4 "${PREVIOUS_MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" 4 "${PREVIOUS_MINOR_VERSION}"
run_command_on_vm host1 "sudo subscription-manager release --set 10.2"
configure_fast_datapath_repo

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift

Configure a RHEL 10 Fast Datapath repository.

On RHEL 10, configure_fast_datapath_repo takes its non-9 branch. That branch configures a RHEL 9 CDN path. Update the helper for RHEL 10, or skip this repository when it is unsupported.

  • test/scenarios-rpm/presubmits/el102-src@standard1.sh#L32-L32: use a RHEL 10-compatible Fast Datapath configuration.
  • test/scenarios-rpm/presubmits/el102-src@standard2.sh#L32-L32: use a RHEL 10-compatible Fast Datapath configuration.
📍 Affects 2 files
  • test/scenarios-rpm/presubmits/el102-src@standard1.sh#L32-L32 (this comment)
  • test/scenarios-rpm/presubmits/el102-src@standard2.sh#L32-L32
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@test/scenarios-rpm/presubmits/el102-src`@standard1.sh at line 32, Update
configure_fast_datapath_repo usage in
test/scenarios-rpm/presubmits/el102-src@standard1.sh lines 32-32 and
test/scenarios-rpm/presubmits/el102-src@standard2.sh lines 32-32 to use a RHEL
10-compatible Fast Datapath configuration, or skip the repository when
unsupported; do not allow the helper’s non-9 branch to configure the RHEL 9 CDN
path.


run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${source_repo_url}" \
--variable "TARGET_VERSION:${target_version}" \
--variable "EXPECTED_OS_VERSION:10.2" \
suites/rpm/install.robot \
suites/standard1/ \
suites/rpm/remove.robot
}
41 changes: 41 additions & 0 deletions test/scenarios-rpm/presubmits/el102-src@standard2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.

# The installer ISO creates a bare RHEL VM without MicroShift or greenboot.
export SKIP_GREENBOOT=true

# Tests must run in order: install, test, remove.
export TEST_RANDOMIZATION=none

scenario_create_vms() {
prepare_kickstart host1 kickstart-liveimg.ks.template ""
launch_vm rhel102-installer
configure_vm_firewall host1
subscription_manager_register host1
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
local -r source_reponame=$(basename "${LOCAL_REPO}")
local -r source_repo_url="${WEB_SERVER_URL}/rpm-repos/${source_reponame}"
local -r target_version=$(local_rpm_version)

configure_rhocp_repo "${RHOCP_MINOR_Y}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1}" 4 "${PREVIOUS_MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" 4 "${PREVIOUS_MINOR_VERSION}"
run_command_on_vm host1 "sudo subscription-manager release --set 10.2"
configure_fast_datapath_repo

run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${source_repo_url}" \
--variable "TARGET_VERSION:${target_version}" \
suites/rpm/install.robot \
suites/standard2/ \
suites/rpm/remove.robot
}
42 changes: 42 additions & 0 deletions test/scenarios-rpm/presubmits/el98-src@standard1.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.

# The installer ISO creates a bare RHEL VM without MicroShift or greenboot.
export SKIP_GREENBOOT=true

# Tests must run in order: install, test, remove.
export TEST_RANDOMIZATION=none

scenario_create_vms() {
prepare_kickstart host1 kickstart-liveimg.ks.template ""
launch_vm rhel98-installer
configure_vm_firewall host1
subscription_manager_register host1
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
local -r source_reponame=$(basename "${LOCAL_REPO}")
local -r source_repo_url="${WEB_SERVER_URL}/rpm-repos/${source_reponame}"
local -r target_version=$(local_rpm_version)

configure_rhocp_repo "${RHOCP_MINOR_Y}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1}" 4 "${PREVIOUS_MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" 4 "${PREVIOUS_MINOR_VERSION}"
run_command_on_vm host1 "sudo subscription-manager release --set 9.8"
configure_fast_datapath_repo

run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${source_repo_url}" \
--variable "TARGET_VERSION:${target_version}" \
--variable "EXPECTED_OS_VERSION:9.8" \
suites/rpm/install.robot \
suites/standard1/ \
suites/rpm/remove.robot
}
41 changes: 41 additions & 0 deletions test/scenarios-rpm/presubmits/el98-src@standard2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
#!/bin/bash

# Sourced from scenario.sh and uses functions defined there.

# The installer ISO creates a bare RHEL VM without MicroShift or greenboot.
export SKIP_GREENBOOT=true

# Tests must run in order: install, test, remove.
export TEST_RANDOMIZATION=none

scenario_create_vms() {
prepare_kickstart host1 kickstart-liveimg.ks.template ""
launch_vm rhel98-installer
configure_vm_firewall host1
subscription_manager_register host1
}

scenario_remove_vms() {
remove_vm host1
}

scenario_run_tests() {
local -r source_reponame=$(basename "${LOCAL_REPO}")
local -r source_repo_url="${WEB_SERVER_URL}/rpm-repos/${source_reponame}"
local -r target_version=$(local_rpm_version)

configure_rhocp_repo "${RHOCP_MINOR_Y}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" 4 "${MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1}" 4 "${PREVIOUS_MINOR_VERSION}"
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" 4 "${PREVIOUS_MINOR_VERSION}"
run_command_on_vm host1 "sudo subscription-manager release --set 9.8"
configure_fast_datapath_repo

run_tests host1 \
--exitonfailure \
--variable "SOURCE_REPO_URL:${source_repo_url}" \
--variable "TARGET_VERSION:${target_version}" \
suites/rpm/install.robot \
suites/standard2/ \
suites/rpm/remove.robot
}