diff --git a/.github/workflows/scenarios-permian.yml b/.github/workflows/scenarios-permian.yml index ea528a44..8fa9ff77 100644 --- a/.github/workflows/scenarios-permian.yml +++ b/.github/workflows/scenarios-permian.yml @@ -15,7 +15,7 @@ jobs: runs-on: [self-hosted, kstest] strategy: matrix: - scenario: [daily-iso, rhel8, rhel9] + scenario: [daily-iso, rhel8, rhel9, rhel10] fail-fast: false # these settings depend on the infrastructure; on upshift ocp-master-xxl they take about 4 hours @@ -57,6 +57,8 @@ jobs: VARIABLE="SKIP_TESTTYPES_RHEL8" elif [ "${{ matrix.scenario }}" == "rhel9" ]; then VARIABLE="SKIP_TESTTYPES_RHEL9" + elif [ "${{ matrix.scenario }}" == "rhel10" ]; then + VARIABLE="SKIP_TESTTYPES_RHEL10" fi if [ -e ${TEMPLATE} ] && [ -n ${VARIABLE} ]; then scripts/generate-testplan.py \ @@ -100,6 +102,8 @@ jobs: echo "platform=rhel8" >> $GITHUB_OUTPUT elif [ "${{ matrix.scenario }}" == "rhel9" ]; then echo "platform=rhel9" >> $GITHUB_OUTPUT + elif [ "${{ matrix.scenario }}" == "rhel10" ]; then + echo "platform=rhel10" >> $GITHUB_OUTPUT else echo "Scenario ${{ matrix.scenario }} can't be mapped to platform" exit 1 @@ -133,6 +137,9 @@ jobs: elif [ "${{ matrix.scenario }}" == "rhel9" ]; then echo "installation_tree=http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/BaseOS/x86_64/os" >> $GITHUB_OUTPUT echo "modular_url=http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/AppStream/x86_64/os" >> $GITHUB_OUTPUT + elif [ "${{ matrix.scenario }}" == "rhel10" ]; then + echo "installation_tree=http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/BaseOS/x86_64/os" >> $GITHUB_OUTPUT + echo "modular_url=http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/AppStream/x86_64/os" >> $GITHUB_OUTPUT else echo "Installation tree location for ${{ matrix.scenario }} not configured" if [ -z "${{ steps.boot_iso_from_scenario.outputs.boot_iso }}" ]; then diff --git a/.github/workflows/test-platforms.yml b/.github/workflows/test-platforms.yml new file mode 100644 index 00000000..4beeb27f --- /dev/null +++ b/.github/workflows/test-platforms.yml @@ -0,0 +1,345 @@ +# Run kickstart tests in a PR triggered by a "/test-platforms" command from an organization member +# +# /test-platforms - execute all tests affected by the PR or smoke tests if there is no such. +# Or specify tests by combination of test names and/or options: +# /test-platforms --testtype TESTTYPE --skip-testtypes TYPE[,TYPE..] TEST1 TEST2 +# +# For dry run use: +# /test-platforms-dry +name: test-platforms +on: + issue_comment: + types: [created] + +permissions: + contents: read + statuses: write + +jobs: + pr-info: + if: startsWith(github.event.comment.body, '/test-platforms') + runs-on: ubuntu-latest + steps: + - name: Query comment author repository permissions + uses: octokit/request-action@v2.x + id: user_permission + with: + route: GET /repos/${{ github.repository }}/collaborators/${{ github.event.sender.login }}/permission + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # restrict running of tests to users with admin or write permission for the repository + # see https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-repository-permissions-for-a-user + # store output if user is allowed in allowed_user job output so it has to be checked in downstream job + - name: Check if user does have correct permissions + if: contains('admin write', fromJson(steps.user_permission.outputs.data).permission) + id: check_user_perm + run: | + echo "User '${{ github.event.sender.login }}' has permission '${{ fromJson(steps.user_permission.outputs.data).permission }}' allowed values: 'admin', 'write'" + echo "allowed_user=true" >> $GITHUB_OUTPUT + + - name: Get information for pull request + uses: octokit/request-action@v2.x + id: pr_api + with: + route: GET /repos/${{ github.repository }}/pulls/${{ github.event.issue.number }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + - name: Parse launch arguments + id: parse_launch_args + # Do not use comment body directly in the shell command to avoid possible code injection. + env: + BODY: ${{ github.event.comment.body }} + run: | + # extract first line and cut out the "/test-platforms" first word + LAUNCH_ARGS=$(echo "$BODY" | sed -n '1 s/^[^ ]* *//p' | sed 's/[[:space:]]*$//') + echo "launch arguments are: $LAUNCH_ARGS" + echo "launch_args=${LAUNCH_ARGS}" >> $GITHUB_OUTPUT + # check for dry run mode + DRY_RUN=False + echo "$BODY" | grep -q "/test-platforms-dry" && DRY_RUN=True + echo "Dry run: ${DRY_RUN}" + echo "dry_run=${DRY_RUN}" >> $GITHUB_OUTPUT + + outputs: + allowed_user: ${{ steps.check_user_perm.outputs.allowed_user }} + base_ref: ${{ fromJson(steps.pr_api.outputs.data).base.ref }} + sha: ${{ fromJson(steps.pr_api.outputs.data).head.sha }} + launch_args: ${{ steps.parse_launch_args.outputs.launch_args }} + dry_run: ${{ steps.parse_launch_args.outputs.dry_run }} + + + platform: + needs: pr-info + if: needs.pr-info.outputs.allowed_user == 'true' + name: Run tests on the platform + runs-on: [self-hosted, kstest-test] + env: + STATUS_NAME: test-platforms + TARGET_BRANCH: ${{ needs.pr-info.outputs.base_ref }} + TEST_JOBS: 16 + GITHUB_TOKEN: /home/github/github-token + strategy: + matrix: + platform: [daily-iso, rawhide, rhel8, rhel9] + fail-fast: false + + steps: + # self-hosted runners don't do this automatically; also useful to keep stuff around for debugging + # need to run sudo as the launch script and the container create root/other user owned files + - name: Clean up previous run + run: | + sudo podman ps -q --all --filter='ancestor=kstest-runner' | xargs -tr sudo podman rm -f + sudo podman volume rm --all || true + sudo rm -rf * .git + + - name: Check out kickstart-tests + uses: actions/checkout@v4 + with: + ref: ${{ needs.pr-info.outputs.sha }} + fetch-depth: 0 + #repository: rhinstaller/kickstart-tests + repository: rvykydal/kickstart-tests + path: kickstart-tests + + - name: Generate test cases + working-directory: ./kickstart-tests + run: scripts/generate-testcases.py -t ./testlib/test_cases/kstest-template.tc.yaml.j2 . -o ./testlib/test_cases + + - name: Clone Permian repository + uses: actions/checkout@v4 + with: + repository: rhinstaller/permian + path: permian + ref: main + + - name: Clone tplib repository + uses: actions/checkout@v4 + with: + repository: rhinstaller/tplib + path: tplib + + - name: Ensure http proxy is running + run: sudo containers/squid.sh start + working-directory: ./kickstart-tests + + - name: Update container images used here + run: | + sudo podman pull quay.io/rhinstaller/kstest-runner:latest + + - name: Get changed tests + working-directory: ./kickstart-tests + id: get_changed_tests + run: | + set -eux + + #git fetch origin + #git config user.name github-actions + #git config user.email github-actions@github.com + #git log --oneline -1 origin/${{ env.TARGET_BRANCH }} + BASE_COMMIT=$(git merge-base ${{ needs.pr-info.outputs.sha }} origin/${{ env.TARGET_BRANCH }}) + CHANGED_TESTS=$(git diff --name-only $BASE_COMMIT HEAD -- *.ks.in $(find -maxdepth 1 -name '*.sh' -perm -u+x) | sed 's/\.ks\.in$//; s/\.sh$//' | sort -u | tr '\n' ' ') + echo "changed_tests=${CHANGED_TESTS}" >> $GITHUB_OUTPUT + + - name: Get skipped tests for platform ${{ matrix.platform }} + id: get_platform_specs + working-directory: ./kickstart-tests + run: | + set -eux + + source ./containers/runner/skip-testtypes + if [ ${{ matrix.platform }} == "daily-iso" ]; then + echo "skip_tests=skip-on-fedora" >> $GITHUB_OUTPUT + echo "disabled_testtypes=$SKIP_TESTTYPES_DAILY_ISO" >> $GITHUB_OUTPUT + echo "platform=fedora_rawhide" >> $GITHUB_OUTPUT + elif [ ${{ matrix.platform }} == "rawhide" ]; then + echo "skip_tests=skip-on-fedora" >> $GITHUB_OUTPUT + echo "disabled_testtypes=$SKIP_TESTTYPES_RAWHIDE" >> $GITHUB_OUTPUT + echo "platform=fedora_rawhide" >> $GITHUB_OUTPUT + elif [ ${{ matrix.platform }} == "rhel8" ]; then + echo "skip_tests=skip-on-rhel,skip-on-rhel-8" >> $GITHUB_OUTPUT + echo "disabled_testtypes=$SKIP_TESTTYPES_RHEL8" >> $GITHUB_OUTPUT + echo "platform=rhel8" >> $GITHUB_OUTPUT + elif [ ${{ matrix.platform }} == "rhel9" ]; then + echo "skip_tests=skip-on-rhel,skip-on-rhel-9" >> $GITHUB_OUTPUT + echo "disabled_testtypes=$SKIP_TESTTYPES_RHEL9" >> $GITHUB_OUTPUT + echo "platform=rhel9" >> $GITHUB_OUTPUT + else + echo "Platform is not supported by kickstart tests yet!" + exit 1 + fi + + - name: Generate test selection + id: generate_query + working-directory: ./kickstart-tests + run: | + set -eux + + CHANGED_TESTS="${{ steps.get_changed_tests.outputs.changed_tests }}" + DISABLED_TESTTYPES="${{ steps.get_platform_specs.outputs.disabled_testtypes }}" + LAUNCH_ARGS="${{ needs.pr-info.outputs.launch_args }}" + + if [ -n "${LAUNCH_ARGS}" ]; then + echo "description=Running tests required by the PR comment explicitly." >> $GITHUB_OUTPUT + elif [ -n "${CHANGED_TESTS}" ]; then + echo "description=Running tests affected by changes (excluding disabled)." >> $GITHUB_OUTPUT + LAUNCH_ARGS="${CHANGED_TESTS}" + if [ -n "${DISABLED_TESTTYPES}" ]; then + LAUNCH_ARGS="--skip-testtypes ${DISABLED_TESTTYPES} ${LAUNCH_ARGS}" + fi + else + echo "description=Running smoke tests (no affected tests found)." >> $GITHUB_OUTPUT + LAUNCH_ARGS="--testtype smoke" + fi + + source ./containers/runner/skip-testtypes + PERMIAN_QUERY=$(scripts/generate-permian-query.py \ + --skip-testtypes $SKIP_TESTTYPES_ANACONDA_PR \ + --skip-testtypes ${{ steps.get_platform_specs.outputs.skip_tests }} \ + ${LAUNCH_ARGS} ) + if [ $? == 0 ]; then + echo "launch_args=$LAUNCH_ARGS" >> $GITHUB_OUTPUT + echo "query=$PERMIAN_QUERY" >> $GITHUB_OUTPUT + else + echo "Parsing of the request arguments failed" + exit 1 + fi + + # we post statuses manually as this does not run from a pull_request event + # https://developer.github.com/v3/repos/statuses/#create-a-status + - name: Create in-progress status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' + context: '${{ env.STATUS_NAME }} ${{ needs.pr-info.outputs.launch_args }}' + description: '${{ steps.generate_query.outputs.description }}' + state: pending + target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + + # # Fetch boot.iso and configure its local location + # - name: Fetch boot.iso if available for platform ${{ matrix.platform }} + # id: boot_iso_for_platform + # run: | + # set -eux + # BOOT_ISO_PATH="${{ github.workspace }}/${{ matrix.platform }}.boot.iso" + # BOOT_ISO_URL="file://$BOOT_ISO_PATH" + # if [ "${{ matrix.platform }}" == "daily-iso" ]; then + # ${{ github.workspace }}/kickstart-tests/containers/runner/fetch_daily_iso.sh $GITHUB_TOKEN $BOOT_ISO_PATH + # echo "boot_iso=\"bootIso\":{\"x86_64\":\"${BOOT_ISO_URL}\"}," >> $GITHUB_OUTPUT + # elif [ "${{ matrix.platform }}" == "rawhide" ]; then + # curl -L https://download.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/os/images/boot.iso --output $BOOT_ISO_PATH + # echo "boot_iso=\"bootIso\":{\"x86_64\":\"${BOOT_ISO_URL}\"}," >> $GITHUB_OUTPUT + # else + # echo "Boot.iso for ${{ matrix.platform }} can't be fetched." + # echo "boot_iso=" >> $GITHUB_OUTPUT + # fi + # + # # Configure location of installation repositories for the platform + # # Also default boot.iso is defined by the value of urls.installation_tree + # # of kstestParams event structure. + # - name: Set installation tree for the platform + # id: set_installation_urls + # run: | + # set -eux + # if [ "${{ matrix.platform }}" == "rhel8" ]; then + # echo "installation_tree=http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.10.0/compose/BaseOS/x86_64/os" >> $GITHUB_OUTPUT + # echo "modular_url=http://download.eng.bos.redhat.com/rhel-8/nightly/RHEL-8/latest-RHEL-8.10.0/compose/AppStream/x86_64/os" >> $GITHUB_OUTPUT + # elif [ "${{ matrix.platform }}" == "rhel9" ]; then + # echo "installation_tree=http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/BaseOS/x86_64/os" >> $GITHUB_OUTPUT + # echo "modular_url=http://download.eng.bos.redhat.com/rhel-9/nightly/RHEL-9/latest-RHEL-9.4.0/compose/AppStream/x86_64/os" >> $GITHUB_OUTPUT + # else + # echo "Installation tree location for ${{ matrix.platform }} not configured" + # if [ -z "${{ steps.boot_iso_for_platform.outputs.boot_iso }}" ]; then + # echo "No boot.iso source is defined" + # exit 2 + # fi + # echo "installation_tree=" >> $GITHUB_OUTPUT + # echo "modular_url=" >> $GITHUB_OUTPUT + # fi + # + # - name: Create Permian settings file + # working-directory: ./permian + # run: | + # cat < settings.ini + # [kickstart_test] + # kstest_local_repo=${{ github.workspace }}/kickstart-tests + # [library] + # directPath=${{ github.workspace }}/kickstart-tests/testlib + # EOF + # + # - name: Run kickstart tests in container + # working-directory: ./permian + # run: | + # sudo --preserve-env=TEST_JOBS \ + # PYTHONPATH=${PYTHONPATH:-}:${{ github.workspace }}/tplib \ + # ./run_subset --debug-log permian.log \ + # --settings settings.ini \ + # --override workflows.dry_run=${{ needs.pr-info.outputs.dry_run }} \ + # --testcase-query '${{ steps.generate_query.outputs.query }}' \ + # run_event '{ + # "type":"everything", + # "everything_testplan":{ + # "configurations":[{"architecture":"x86_64"}], + # "point_person":"rvykydal@redhat.com" + # }, + # ${{ steps.boot_iso_for_platform.outputs.boot_iso }} + # "kstestParams":{ + # "platform":"${{ steps.get_platform_specs.outputs.platform }}", + # "urls":{ + # "x86_64":{ + # "installation_tree":"${{ steps.set_installation_urls.outputs.installation_tree }}", + # "modular_url":"${{ steps.set_installation_urls.outputs.modular_url }}" + # } + # } + # } + # }' + # + # # Permian hides the exit code of launcher, so error out this step manually based on logs + # rc=$( awk '/Runner return code: /{ print $4 }' permian.log) + # if [ -n "$rc" ]; then + # exit $rc + # else + # grep -q "All execution and reporting is done" permian.log || exit 111 + # fi + # + # - name: Collect anaconda logs + # if: always() + # uses: actions/upload-artifact@v4 + # with: + # name: 'logs-${{ matrix.platform }}' + # # skip the /anaconda subdirectories, too large + # path: | + # kickstart-tests/data/logs/kstest*.log + # kickstart-tests/data/logs/kstest.log.json + # kickstart-tests/data/logs/kstest-*/*.log + # kickstart-tests/data/logs/kstest-*/anaconda/lorax-packages.log + # + # - name: Collect Permian logs + # if: always() + # uses: actions/upload-artifact@v4 + # with: + # name: 'logs-permian-${{ matrix.platform }}' + # path: | + # permian/permian.log + # + result: + if: ${{ always() }} + name: Set result status + runs-on: ubuntu-latest + env: + STATUS_NAME: test-platforms + needs: [platform, pr-info] + steps: + - name: Show overall status + uses: octokit/request-action@v2.x + with: + route: 'POST /repos/${{ github.repository }}/statuses/${{ needs.pr-info.outputs.sha }}' + context: '${{ env.STATUS_NAME }} ${{ needs.pr-info.outputs.launch_args }}' + description: 'finished' + state: ${{ needs.platform.result }} + target_url: 'https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/weekly-summary.yml b/.github/workflows/weekly-summary.yml index 27855340..d708c49a 100644 --- a/.github/workflows/weekly-summary.yml +++ b/.github/workflows/weekly-summary.yml @@ -24,7 +24,7 @@ jobs: run: | PATH=./scripts/:$PATH \ ./scripts/weekly-summary --rebuild --flake-details \ - --artifacts=logs-daily-iso,logs-rhel9,logs-rhel8 \ + --artifacts=logs-daily-iso,logs-rhel9,logs-rhel8,logs-rhel10 \ --archive-logs /var/tmp/kstest-archive/ - name: Collect logs diff --git a/README.rst b/README.rst index abe704a4..3a13bfcb 100644 --- a/README.rst +++ b/README.rst @@ -368,6 +368,10 @@ PR runs do *not* auto-retry test failures. This avoids introducing unstable tests, and PRs usually just run a few tests so that flakes are much less likely to ruin the result. +To test a PR on all supported platforms (including rhel) there is a +`test-platforms`_ workflow running the tests on a comment in a PR. +Running it requires admin repository permissions. + Service jobs ------------ * The `container-autoupdate`_ workflow refreshes the runner container @@ -391,5 +395,6 @@ GitHub's infrastructure and can be run manually by a developer. .. _Travis: https://travis-ci.com/ .. _.travis.yml: ./.travis.yml .. _container-autoupdate: ./.github/workflows/container-autoupdate.yml +.. _test-platforms: ./.github/workflows/test-platforms.yml .. _quay.io/rhinstaller/kstest-runner: https://quay.io/repository/rhinstaller/kstest-runner .. _daily-boot-iso: ./.github/workflows/daily-boot-iso.yml diff --git a/container.sh b/container.sh index 265d9d63..848db173 100755 --- a/container.sh +++ b/container.sh @@ -21,4 +21,6 @@ # shellcheck disable=SC2034 TESTTYPE="bootloader packaging coverage skip-on-rhel" +# modify container + . ${KSTESTDIR}/functions.sh diff --git a/containers/runner/skip-testtypes b/containers/runner/skip-testtypes index 01f794c4..957f3eb3 100644 --- a/containers/runner/skip-testtypes +++ b/containers/runner/skip-testtypes @@ -10,7 +10,21 @@ common_skip_array=( rawhide_skip_array=( skip-on-fedora + gh576 # clearpart-4 test is flaky on all scenarios + gh595 # proxy-cmdline failing on all scenarios + gh640 # authselect-not-set failing + gh641 # packages-multilib failing on systemd conflict + gh680 # proxy-kickstart and proxy-auth failing + gh740 # fedora-live-image-build fails on comps changes + gh769 # nodejs:16 and swig:4 missing in module-X tests + gh774 # autopart-luks-1 failing + gh777 # raid-1 failing + gh910 # stage2-from-ks test needs to be fixed for daily-iso + gh890 # default-systemd-target-vnc-graphical-provides flaking too much + gh871 # basic-ftp failing due to mirror rhbz1853668 # multipath device not constructed back after installation + gh975 # packages-default failing + gh1023 # rpm-ostree failing ) rawhide_text_skip_array=( @@ -60,6 +74,11 @@ rhel9_skip_array=( gh970 # selinux-contexts failing ) +rhel10_skip_array=( + skip-on-rhel + skip-on-rhel-10 +) + # used in workflows/daily-boot-iso-rhel8.yml rhel8_daily_skip_array=( skip-on-rhel @@ -77,6 +96,7 @@ SKIP_TESTTYPES_RAWHIDE_TEXT=$(_join_args_by_comma "${common_skip_array[@]}" "${r SKIP_TESTTYPES_DAILY_ISO=$(_join_args_by_comma "${common_skip_array[@]}" "${daily_iso_skip_array[@]}") SKIP_TESTTYPES_RHEL8=$(_join_args_by_comma "${common_skip_array[@]}" "${rhel8_skip_array[@]}") SKIP_TESTTYPES_RHEL9=$(_join_args_by_comma "${common_skip_array[@]}" "${rhel9_skip_array[@]}") +SKIP_TESTTYPES_RHEL10=$(_join_args_by_comma "${common_skip_array[@]}" "${rhel10_skip_array[@]}") SKIP_TESTTYPES_RHEL8_DAILY=$(_join_args_by_comma "${common_skip_array[@]}" "${rhel8_daily_skip_array[@]}") # Tests run on an anaconda pull request by comment SKIP_TESTTYPES_ANACONDA_PR=$(_join_args_by_comma "${common_skip_array[@]}") diff --git a/fragments/platform/rhel10/payload/default_packages.ks b/fragments/platform/rhel10/payload/default_packages.ks new file mode 100644 index 00000000..8f7f3599 --- /dev/null +++ b/fragments/platform/rhel10/payload/default_packages.ks @@ -0,0 +1,3 @@ +# Default RHEL10 packages section (empty) +%packages +%end diff --git a/fragments/platform/rhel10/payload/ostreecontainer.ks b/fragments/platform/rhel10/payload/ostreecontainer.ks new file mode 100644 index 00000000..3869cff0 --- /dev/null +++ b/fragments/platform/rhel10/payload/ostreecontainer.ks @@ -0,0 +1 @@ +ostreecontainer --no-signature-verification --transport=registry --url=quay.io/centos-bootc/centos-bootc:stream10 diff --git a/fragments/platform/rhel10/payload/unified_packages.ks b/fragments/platform/rhel10/payload/unified_packages.ks new file mode 100644 index 00000000..be6b85e4 --- /dev/null +++ b/fragments/platform/rhel10/payload/unified_packages.ks @@ -0,0 +1,7 @@ +# RHEL 10 packages section from unified DVD. +# The unified DVD should contain under one link both BaseOS and AppStream so install AppStream specific package. + +%packages +# Anaconda package is part of the AppStream repository. It is not contained in the BaseOS. +anaconda +%end diff --git a/fragments/platform/rhel10/repos/default.ks b/fragments/platform/rhel10/repos/default.ks new file mode 100644 index 00000000..4b28c8fa --- /dev/null +++ b/fragments/platform/rhel10/repos/default.ks @@ -0,0 +1,3 @@ +# Default RHEL10 repositories - BeseOS + AppStream or unified repo can be used +url --url @KSTEST_URL@ +repo --name=appstream --baseurl @KSTEST_MODULAR_URL@ diff --git a/fragments/platform/rhel10/repos/unified-nfs.ks b/fragments/platform/rhel10/repos/unified-nfs.ks new file mode 100644 index 00000000..925587d4 --- /dev/null +++ b/fragments/platform/rhel10/repos/unified-nfs.ks @@ -0,0 +1,2 @@ +# Unified ISO for RHEL-10 served on NFS server +nfs --server NFS_SERVER --dir NFS_DIR diff --git a/fragments/platform/rhel10/repos/unified.ks b/fragments/platform/rhel10/repos/unified.ks new file mode 100644 index 00000000..821a98d4 --- /dev/null +++ b/fragments/platform/rhel10/repos/unified.ks @@ -0,0 +1,3 @@ +# Unified ISO for RHEL 10 served on http server +# BaseOS and AppStream repositories should be loaded automatically from the unified repo +url RHEL10_UNIFIED_REPO_URL_GOES_HERE diff --git a/fragments/platform/rhel10/section-data/hello-world.ks b/fragments/platform/rhel10/section-data/hello-world.ks new file mode 100644 index 00000000..8055a22a --- /dev/null +++ b/fragments/platform/rhel10/section-data/hello-world.ks @@ -0,0 +1,3 @@ +# Create a variable in the %pre section with a link to the archived repository of Hello Word. +# The curl tool will download this archive and unpack it in the system. +ADDON_SOURCE="https://github.com/rhinstaller/hello-world-anaconda-addon/archive/master.tar.gz" diff --git a/fragments/platform/rhel10/section-data/server-dvd-link.ks b/fragments/platform/rhel10/section-data/server-dvd-link.ks new file mode 100644 index 00000000..5fdbeaf8 --- /dev/null +++ b/fragments/platform/rhel10/section-data/server-dvd-link.ks @@ -0,0 +1,7 @@ +# Create a variable in the pre/post section with link to a RHEL DVD. +# The curl tool will download this ISO and it will be processed later in the section. +_LINK= +ISO_LOCATION="$(curl -L $_LINK | grep -Po "RHEL-10.*?-x86_64-dvd1.iso" | head -n 1)" +ISO_LOCATION="${_LINK}/${ISO_LOCATION}" + +echo $ISO_LOCATION diff --git a/fragments/platform/rhel10/section-data/unified-iso.ks b/fragments/platform/rhel10/section-data/unified-iso.ks new file mode 100644 index 00000000..65d372b1 --- /dev/null +++ b/fragments/platform/rhel10/section-data/unified-iso.ks @@ -0,0 +1,3 @@ +# Create a variable in the pre/post section with link to a RHEL-10 unified ISO +# The curl tool will download this ISO and it will be processed later in the section. +ISO_LOCATION= diff --git a/fragments/platform/rhel10/timezone/ntp_disabled.ks b/fragments/platform/rhel10/timezone/ntp_disabled.ks new file mode 100644 index 00000000..72ea7736 --- /dev/null +++ b/fragments/platform/rhel10/timezone/ntp_disabled.ks @@ -0,0 +1,5 @@ +# Set up the timezone. +timezone --utc Europe/Prague + +# Disable NTP. +timesource --ntp-disable diff --git a/fragments/platform/rhel10/timezone/ntp_enabled.ks b/fragments/platform/rhel10/timezone/ntp_enabled.ks new file mode 100644 index 00000000..a1115ebd --- /dev/null +++ b/fragments/platform/rhel10/timezone/ntp_enabled.ks @@ -0,0 +1,5 @@ +# Set up the timezone. +timezone --utc Europe/Prague + +# Enable NTP. +timesource --ntp-server ntp.cesnet.cz diff --git a/fragments/platform/rhel10/validation/unified.ks b/fragments/platform/rhel10/validation/unified.ks new file mode 100644 index 00000000..84bde765 --- /dev/null +++ b/fragments/platform/rhel10/validation/unified.ks @@ -0,0 +1,6 @@ +# Validate installed packages on RHEL 10 system. + +# Check that the anaconda package was correctly installed. +if ! rpm -q anaconda ; then + echo '*** anaconda package was not installed!' >> /root/RESULT +fi diff --git a/lang.sh b/lang.sh index 34b0cf53..854a706a 100755 --- a/lang.sh +++ b/lang.sh @@ -17,6 +17,8 @@ # # Red Hat Author(s): Chris Lumens +# modified on master + # Ignore unused variable parsed out by tooling scripts as test tags metadata # shellcheck disable=SC2034 TESTTYPE="language i18n coverage" diff --git a/onboot-activate.sh b/onboot-activate.sh index 682ceeba..50da5951 100755 --- a/onboot-activate.sh +++ b/onboot-activate.sh @@ -30,6 +30,7 @@ TESTTYPE="network coverage" . ${KSTESTDIR}/functions.sh +# modify kernel_args() { echo ${DEFAULT_BOOTOPTS} ip=${KSTEST_NETDEV1}:dhcp diff --git a/scripts/defaults-rhel10.sh b/scripts/defaults-rhel10.sh new file mode 100644 index 00000000..ba0d9af7 --- /dev/null +++ b/scripts/defaults-rhel10.sh @@ -0,0 +1,6 @@ +# Default settings for testing RHEL 10. This requires being inside the Red Hat VPN. + +source network-device-names.cfg +export KSTEST_URL='http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/BaseOS/x86_64/os/' +export KSTEST_MODULAR_URL='http://download.eng.bos.redhat.com/rhel-10/nightly/RHEL-10-Public-Beta/latest-RHEL-10.0/compose/AppStream/x86_64/os/' +export KSTEST_FTP_URL='ftp://ftp.tu-chemnitz.de/pub/linux/fedora/linux/development/rawhide/Everything/$basearch/os/' diff --git a/scripts/generate-permian-query.py b/scripts/generate-permian-query.py index 46f891b7..51156ea4 100755 --- a/scripts/generate-permian-query.py +++ b/scripts/generate-permian-query.py @@ -29,6 +29,9 @@ def parse_args(): + " or ".join(['tc.name == "{}"'.format(test) for test in args.tests]) + ")" ] + if args.skip_testtypes: + skiptypes = ','.join(itertools.chain(*args.skip_testtypes)).split(',') + conditions.extend(['"{}" not in tc.tags'.format(skiptype) for skiptype in skiptypes]) else: if args.testtype: conditions.extend(['"{}" in tc.tags'.format(args.testtype), '"knownfailure" not in tc.tags']) diff --git a/scripts/launcher/lib/log_monitor/log_handler.py b/scripts/launcher/lib/log_monitor/log_handler.py index 5fdac614..0129e89b 100644 --- a/scripts/launcher/lib/log_monitor/log_handler.py +++ b/scripts/launcher/lib/log_monitor/log_handler.py @@ -36,6 +36,9 @@ class VirtualLogRequestHandler(LogRequestHandler): # Team networking is deprecated "CRIT kernel:Warning: Deprecated Driver is detected: team ", + # qla4xxx driver is deprecated (gh#1077) + "CRIT kernel:Warning: Deprecated Driver is detected: qla4xxx ", + # Ignore a call trace during debugging. # Ignoring permanently for gh768. # https://github.com/rhinstaller/kickstart-tests/issues/768 diff --git a/scripts/weekly-summary b/scripts/weekly-summary index 91082475..061b5fbb 100755 --- a/scripts/weekly-summary +++ b/scripts/weekly-summary @@ -43,7 +43,7 @@ URL = "https://api.github.com/repos/rhinstaller/kickstart-tests/actions/artifact # Defaults list of artifacts # For now use the full log artifacts, eventually this will be the json summaries -ARTIFACT_NAMES = ["logs-daily-iso", "logs-rhel9", "logs-rhel8"] +ARTIFACT_NAMES = ["logs-daily-iso", "logs-rhel9", "logs-rhel8", "logs-rhel10"] # We should ignore SIGPIPE when using pycurl.NOSIGNAL - see # the libcurl tutorial for more info. diff --git a/testlib/test_plans/daily-rhel10.plan.yaml.j2 b/testlib/test_plans/daily-rhel10.plan.yaml.j2 new file mode 100644 index 00000000..7a8631fa --- /dev/null +++ b/testlib/test_plans/daily-rhel10.plan.yaml.j2 @@ -0,0 +1,15 @@ +name: daily rhel10 +description: Daily run on a RHEL 10 compose +point_person: rvykydal@redhat.com +artifact_type: github.scheduled.daily.kstest.rhel10 +verified_by: + test_cases: + query: ' +{% for tag in skiptags %} + "{{ tag }}" not in tc.tags and +{% endfor %} + True' +configurations: + - architecture: x86_64 +reporting: + - type: xunit diff --git a/testlib/test_plans/daily-rhel8.plan.yaml.j2 b/testlib/test_plans/daily-rhel8.plan.yaml.j2 index ee415001..d0f262c9 100644 --- a/testlib/test_plans/daily-rhel8.plan.yaml.j2 +++ b/testlib/test_plans/daily-rhel8.plan.yaml.j2 @@ -1,5 +1,5 @@ name: daily rhel8 -description: Daily run on current RHEL 8 development compose +description: Daily run on a RHEL 8 compose point_person: rvykydal@redhat.com artifact_type: github.scheduled.daily.kstest.rhel8 verified_by: diff --git a/testlib/test_plans/daily-rhel9.plan.yaml.j2 b/testlib/test_plans/daily-rhel9.plan.yaml.j2 index dce4e5a7..4ef5a720 100644 --- a/testlib/test_plans/daily-rhel9.plan.yaml.j2 +++ b/testlib/test_plans/daily-rhel9.plan.yaml.j2 @@ -1,5 +1,5 @@ name: daily rhel9 -description: Daily run on current RHEL 9 development compose +description: Daily run on a RHEL 9 compose point_person: rvykydal@redhat.com artifact_type: github.scheduled.daily.kstest.rhel9 verified_by: