2021-11-20 18:29:01 +00:00
|
|
|
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
|
2022-10-15 04:09:45 +00:00
|
|
|
## Usage: Post an ISO for the specified FLAVOR. Defaults to boot-iso.
|
|
|
|
#
|
|
|
|
## Run the boot-iso FLAVOR
|
|
|
|
# scripts/run-openqa-tests.sh
|
|
|
|
#
|
|
|
|
## Run the package-set FLAVOR
|
|
|
|
# ROCKY_FLAVOR=package-set scripts/run-openqa-tests.sh
|
|
|
|
#
|
|
|
|
## Run the localization test suites
|
|
|
|
# ROCKY_FLAVOR ROCKY_EXTRA_ARGS=TEST=install_arabic_language,install_asian_language,install_european_language,install_cyrillic_language scripts/run-openqa-tests.sh
|
|
|
|
|
2023-05-17 20:53:13 +00:00
|
|
|
ROCKY_VERSION="9.2"
|
|
|
|
|
|
|
|
MAJOR_VERSION=${ROCKY_VERSION:0:1}
|
|
|
|
MINOR_VERSION=${ROCKY_VERSION:2:1}
|
2022-05-20 02:37:35 +00:00
|
|
|
ROCKY_FLAVOR="${ROCKY_FLAVOR:-boot-iso}"
|
|
|
|
ROCKY_ARCH="${ROCKY_ARCH:=x86_64}"
|
|
|
|
ROCKY_EXTRA_ARGS="${ROCKY_EXTRA_ARGS:-}"
|
2023-05-17 20:53:13 +00:00
|
|
|
BUILD_NAME="-$(date +%Y%m%d).0-$(git branch --show-current)-$ROCKY_VERSION"
|
2022-10-15 00:28:29 +00:00
|
|
|
ISO_PREFIX="Rocky-$ROCKY_VERSION-$ROCKY_ARCH"
|
2021-11-20 18:29:01 +00:00
|
|
|
|
|
|
|
if [[ "$ROCKY_FLAVOR" == "dvd-iso" || "$ROCKY_FLAVOR" == "universal" ]]; then
|
2022-10-15 00:28:29 +00:00
|
|
|
if [[ "$MAJOR_VERSION" -gt "8" ]]; then
|
|
|
|
ISO_TYPE=dvd
|
|
|
|
else
|
|
|
|
ISO_TYPE=dvd1
|
|
|
|
fi
|
2021-11-20 18:29:01 +00:00
|
|
|
elif [[ "$ROCKY_FLAVOR" == "minimal-iso" ]]; then
|
|
|
|
ISO_TYPE=minimal
|
2022-10-15 00:28:29 +00:00
|
|
|
elif [[ "$ROCKY_FLAVOR" == "boot-iso" || "$ROCKY_FLAVOR" == "package-set" ]]; then
|
|
|
|
# package-set also works with dvd image
|
2021-11-20 18:29:01 +00:00
|
|
|
ISO_TYPE=boot
|
|
|
|
else
|
2022-10-15 00:28:29 +00:00
|
|
|
echo "Usage: $0 [universal|dvd-iso|minimal-iso|package-set|boot-iso]"
|
2021-11-20 18:29:01 +00:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2022-10-15 00:28:29 +00:00
|
|
|
ROCKY_ISO="$ISO_PREFIX-$ISO_TYPE.iso"
|
|
|
|
|
|
|
|
# Update fif templates
|
|
|
|
./fifloader.py --clean --load templates.fif.json templates-updates.fif.json
|
|
|
|
|
|
|
|
# Run the tests
|
2022-05-20 02:37:35 +00:00
|
|
|
export PS4='# '
|
2021-11-20 18:29:01 +00:00
|
|
|
set -o xtrace
|
|
|
|
openqa-cli api \
|
|
|
|
-X POST isos \
|
2022-10-15 00:28:29 +00:00
|
|
|
ISO="$ROCKY_ISO" \
|
2021-11-20 18:29:01 +00:00
|
|
|
ARCH="$ROCKY_ARCH" \
|
|
|
|
DISTRI=rocky \
|
|
|
|
FLAVOR="$ROCKY_FLAVOR" \
|
|
|
|
VERSION="$ROCKY_VERSION" \
|
|
|
|
BUILD="$BUILD_NAME" \
|
2022-10-15 00:28:29 +00:00
|
|
|
"$ROCKY_EXTRA_ARGS"
|