From 49bad21c45f1bdcbb0a3b771193e62425ebca164 Mon Sep 17 00:00:00 2001 From: Xiaofeng Wang Date: Thu, 25 May 2023 09:34:19 +0800 Subject: [PATCH] CI: Move RHEL for Edge CI into osbuild/rhel-edge-ci repo 1. Run RHEL for Edge CI on osbuild/rhel-edge-ci repo 2. Use released RHEL 8.8 and 9.2 boot ISO 3. Extend VM memory to 3072 on ostree.sh to fix error "Overriding memory to 3072 MiB needed for centos-stream9 network install." 4. Install and start firewalld, configure VM network as trusted zone --- .gitlab-ci.yml | 107 ++----------------------------- test/cases/ostree-ng.sh | 7 +- test/cases/ostree-raw-image.sh | 7 +- test/cases/ostree-rebase-uefi.sh | 7 +- test/cases/ostree.sh | 13 ++-- 5 files changed, 32 insertions(+), 109 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b565e0850..3e984e8b2 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -338,110 +338,13 @@ Image Tests: - aws/rhel-9.2-nightly-aarch64 INTERNAL_NETWORK: ["true"] -OSTree: +Trigger-rhel-edge-ci: stage: test - extends: .terraform/openstack - rules: - - !reference [.upstream_rules_all, rules] + interruptible: true + tags: + - shell script: - - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/ostree.sh - parallel: - matrix: - - RUNNER: - - rhos-01/fedora-37-x86_64 - - rhos-01/rhel-8.4-ga-x86_64 - - rhos-01/rhel-8.7-ga-x86_64 - - rhos-01/rhel-9.1-ga-x86_64 - - rhos-01/rhel-8.8-nightly-x86_64 - - rhos-01/rhel-9.2-nightly-x86_64 - - rhos-01/centos-stream-8-x86_64 - - rhos-01/centos-stream-9-x86_64 - -New OSTree: - stage: test - extends: OSTree - script: - - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/ostree-ng.sh - parallel: - matrix: - - RUNNER: - - rhos-01/fedora-37-x86_64 - - rhos-01/rhel-8.8-nightly-x86_64 - - rhos-01/rhel-9.2-nightly-x86_64 - - rhos-01/centos-stream-8-x86_64 - - rhos-01/centos-stream-9-x86_64 - -OSTree simplified installer: - stage: test - extends: OSTree - script: - - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/ostree-simplified-installer.sh - parallel: - matrix: - - RUNNER: - - rhos-01/rhel-8.8-nightly-x86_64 - - rhos-01/centos-stream-8-x86_64 - - rhos-01/rhel-9.2-nightly-x86_64 - - rhos-01/centos-stream-9-x86_64 - -OSTree raw image: - stage: test - extends: OSTree - rules: - - !reference [.upstream_rules_all, rules] - script: - - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/ostree-raw-image.sh - parallel: - matrix: - - RUNNER: - - rhos-01/rhel-8.8-nightly-x86_64 - - rhos-01/centos-stream-8-x86_64 - - rhos-01/rhel-9.2-nightly-x86_64 - - rhos-01/centos-stream-9-x86_64 - - rhos-01/fedora-37-x86_64 - -Rebase OSTree BIOS: - stage: test - extends: OSTree - script: - - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/ostree-rebase-bios.sh - parallel: - matrix: - - RUNNER: - - rhos-01/rhel-8.8-nightly-x86_64 - - rhos-01/rhel-9.2-nightly-x86_64 - - rhos-01/centos-stream-8-x86_64 - - rhos-01/centos-stream-9-x86_64 - -Rebase OSTree UEFI: - stage: test - extends: OSTree - script: - - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/ostree-rebase-uefi.sh - parallel: - matrix: - - RUNNER: - - rhos-01/rhel-8.8-nightly-x86_64 - - rhos-01/rhel-9.2-nightly-x86_64 - - rhos-01/centos-stream-8-x86_64 - - rhos-01/centos-stream-9-x86_64 - -Minimal raw: - stage: test - extends: OSTree - script: - - schutzbot/deploy.sh - - /usr/libexec/tests/osbuild-composer/minimal-raw.sh - parallel: - matrix: - - RUNNER: - - rhos-01/fedora-37-x86_64 + - 'curl -u "${SCHUTZBOT_LOGIN}" -X POST -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/osbuild/rhel-edge-ci/dispatches -d "{\"event_type\":\"osbuild-composer-ci\",\"client_payload\":{\"pr_number\":\"${CI_COMMIT_BRANCH}\"}}"' .integration_base: stage: test diff --git a/test/cases/ostree-ng.sh b/test/cases/ostree-ng.sh index ed8e2a024..92629de88 100755 --- a/test/cases/ostree-ng.sh +++ b/test/cases/ostree-ng.sh @@ -18,6 +18,11 @@ greenprint "🚀 Starting libvirt daemon" sudo systemctl start libvirtd sudo virsh list --all > /dev/null +# Install and start firewalld +greenprint "🔧 Install and start firewalld" +sudo dnf install -y firewalld +sudo systemctl enable --now firewalld + # Set a customized dnsmasq configuration for libvirt so we always get the # same address on bootup. sudo tee /tmp/integration.xml > /dev/null << EOF @@ -29,7 +34,7 @@ sudo tee /tmp/integration.xml > /dev/null << EOF - + diff --git a/test/cases/ostree-raw-image.sh b/test/cases/ostree-raw-image.sh index 901537f28..940470d99 100755 --- a/test/cases/ostree-raw-image.sh +++ b/test/cases/ostree-raw-image.sh @@ -16,6 +16,11 @@ greenprint "🚀 Starting libvirt daemon" sudo systemctl start libvirtd sudo virsh list --all > /dev/null +# Install and start firewalld +greenprint "🔧 Install and start firewalld" +sudo dnf install -y firewalld +sudo systemctl enable --now firewalld + # Set a customized dnsmasq configuration for libvirt so we always get the # same address on bootup. sudo tee /tmp/integration.xml > /dev/null << EOF @@ -27,7 +32,7 @@ sudo tee /tmp/integration.xml > /dev/null << EOF - + diff --git a/test/cases/ostree-rebase-uefi.sh b/test/cases/ostree-rebase-uefi.sh index 7ea694298..35e538f51 100755 --- a/test/cases/ostree-rebase-uefi.sh +++ b/test/cases/ostree-rebase-uefi.sh @@ -18,6 +18,11 @@ greenprint "🚀 Starting libvirt daemon" sudo systemctl start libvirtd sudo virsh list --all > /dev/null +# Install and start firewalld +greenprint "🔧 Install and start firewalld" +sudo dnf install -y firewalld +sudo systemctl enable --now firewalld + # Set a customized dnsmasq configuration for libvirt so we always get the # same address on bootup. sudo tee /tmp/integration.xml > /dev/null << EOF @@ -29,7 +34,7 @@ sudo tee /tmp/integration.xml > /dev/null << EOF - + diff --git a/test/cases/ostree.sh b/test/cases/ostree.sh index 9f858f86d..f553ff718 100755 --- a/test/cases/ostree.sh +++ b/test/cases/ostree.sh @@ -72,7 +72,7 @@ case "${ID}-${VERSION_ID}" in # Use a stable installer image unless it's the nightly pipeline - BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.6.0/BaseOS/x86_64/os/" + BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-8/RHEL-8/8.8.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then BOOT_LOCATION="${COMPOSE_URL:-}/compose/BaseOS/x86_64/os/" fi @@ -98,7 +98,7 @@ case "${ID}-${VERSION_ID}" in SYSROOT_RO="true" # Use a stable installer image unless it's the nightly pipeline - BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-9/RHEL-9/9.0.0/BaseOS/x86_64/os/" + BOOT_LOCATION="http://download.devel.redhat.com/released/rhel-9/RHEL-9/9.2.0/BaseOS/x86_64/os/" if [ "${NIGHTLY:=false}" == "true" ]; then BOOT_LOCATION="${COMPOSE_URL:-}/compose/BaseOS/x86_64/os/" fi @@ -135,6 +135,11 @@ greenprint "🚀 Starting libvirt daemon" sudo systemctl start libvirtd sudo virsh list --all > /dev/null +# Install and start firewalld +greenprint "🔧 Install and start firewalld" +sudo dnf install -y firewalld +sudo systemctl enable --now firewalld + # Set a customized dnsmasq configuration for libvirt so we always get the # same address on bootup. sudo tee /tmp/integration.xml > /dev/null << EOF @@ -146,7 +151,7 @@ sudo tee /tmp/integration.xml > /dev/null << EOF - + @@ -514,7 +519,7 @@ sudo virt-install --initrd-inject="${KS_FILE}" \ --extra-args="inst.ks=file:/ks.cfg console=ttyS0,115200" \ --name="${IMAGE_KEY}"\ --disk path="${LIBVIRT_IMAGE_PATH}",format=qcow2 \ - --ram 2048 \ + --ram 3072 \ --vcpus 2 \ --network network=integration,mac=34:49:22:B0:83:30 \ --os-type linux \