Enable gating test
Signed-off-by: Xiaofeng Wang <xiaofwan@redhat.com>
This commit is contained in:
parent
f6b10aeab6
commit
d2e3fb6896
1
.fmf/version
Normal file
1
.fmf/version
Normal file
@ -0,0 +1 @@
|
||||
1
|
||||
65
0000-bootc-inistall-provision.patch
Normal file
65
0000-bootc-inistall-provision.patch
Normal file
@ -0,0 +1,65 @@
|
||||
diff --git i/tmt/tests/bootc-install-provision.sh w/tmt/tests/bootc-install-provision.sh
|
||||
index c4c884b..29df30c 100755
|
||||
--- i/tmt/tests/bootc-install-provision.sh
|
||||
+++ w/tmt/tests/bootc-install-provision.sh
|
||||
@@ -4,6 +4,8 @@ set -exuo pipefail
|
||||
BOOTC_TEMPDIR=$(mktemp -d)
|
||||
trap 'rm -rf -- "$BOOTC_TEMPDIR"' EXIT
|
||||
|
||||
+ARCH=$(uname -m)
|
||||
+
|
||||
# LBI only enabled for test-22-logically-bound-install
|
||||
LBI="${LBI:-disabled}"
|
||||
|
||||
@@ -16,6 +18,28 @@ case "$ID" in
|
||||
"fedora")
|
||||
TIER1_IMAGE_URL="${TIER1_IMAGE_URL:-quay.io/fedora/fedora-bootc:${VERSION_ID}}"
|
||||
;;
|
||||
+ "rhel")
|
||||
+ TIER1_IMAGE_URL="${TIER1_IMAGE_URL:-images.paas.redhat.com/bootc/rhel-bootc:latest-${VERSION_ID}}"
|
||||
+
|
||||
+ CURRENT_COMPOSE_ID=$(skopeo inspect --no-tags --retry-times=5 --tls-verify=false "docker://${TIER1_IMAGE_URL}" | jq -r '.Labels."redhat.compose-id"')
|
||||
+
|
||||
+ if [[ -n ${CURRENT_COMPOSE_ID} ]]; then
|
||||
+ if [[ ${CURRENT_COMPOSE_ID} == *-updates-* ]]; then
|
||||
+ BATCH_COMPOSE="updates/"
|
||||
+ else
|
||||
+ BATCH_COMPOSE=""
|
||||
+ fi
|
||||
+ else
|
||||
+ BATCH_COMPOSE="updates/"
|
||||
+ CURRENT_COMPOSE_ID=latest-RHEL-$VERSION_ID
|
||||
+ fi
|
||||
+
|
||||
+ # use latest compose if specific compose is not accessible
|
||||
+ RC=$(curl -skIw '%{http_code}' -o /dev/null "http://download.eng.bos.redhat.com/rhel-${VERSION_ID%%.*}/nightly/${BATCH_COMPOSE}RHEL-${VERSION_ID%%.*}/${CURRENT_COMPOSE_ID}/STATUS")
|
||||
+ if [[ $RC != "200" ]]; then
|
||||
+ CURRENT_COMPOSE_ID=latest-RHEL-${VERSION_ID%%}
|
||||
+ fi
|
||||
+ ;;
|
||||
esac
|
||||
|
||||
if [ "$TMT_REBOOT_COUNT" -eq 0 ]; then
|
||||
@@ -93,6 +117,22 @@ COMMONEOF
|
||||
tee "$FEDORA_CI_CONTAINERFILE" > /dev/null << FEDORACIEOF
|
||||
FROM $TIER1_IMAGE_URL
|
||||
|
||||
+RUN <<REPORUN
|
||||
+tee "/etc/yum.repos.d/rhel.repo" >/dev/null <<RHELREPOEOF
|
||||
+[rhel-baseos]
|
||||
+name=baseos
|
||||
+baseurl=http://download.eng.bos.redhat.com/rhel-${VERSION_ID%%.*}/nightly/${BATCH_COMPOSE}RHEL-${VERSION_ID%%.*}/${CURRENT_COMPOSE_ID}/compose/BaseOS/${ARCH}/os/
|
||||
+enabled=1
|
||||
+gpgcheck=0
|
||||
+
|
||||
+[rhel-appstream]
|
||||
+name=appstream
|
||||
+baseurl=http://download.eng.bos.redhat.com/rhel-${VERSION_ID%%.*}/nightly/${BATCH_COMPOSE}RHEL-${VERSION_ID%%.*}/${CURRENT_COMPOSE_ID}/compose/AppStream/${ARCH}/os/
|
||||
+enabled=1
|
||||
+gpgcheck=0
|
||||
+RHELREPOEOF
|
||||
+REPORUN
|
||||
+
|
||||
RUN dnf -y upgrade /rpms/*.rpm
|
||||
FEDORACIEOF
|
||||
cat >"$CONTAINERFILE" <<REALEOF
|
||||
@ -29,6 +29,9 @@ URL: https://github.com/containers/bootc
|
||||
Source0: %{url}/releases/download/v%{version}/bootc-%{version}.tar.zstd
|
||||
Source1: %{url}/releases/download/v%{version}/bootc-%{version}-vendor.tar.zstd
|
||||
|
||||
# Patch for integration test RHEL 9.x and 10.x support
|
||||
Patch0: 0000-bootc-inistall-provision.patch
|
||||
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
|
||||
13
gating.yaml
13
gating.yaml
@ -1,6 +1,17 @@
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- fedora-*
|
||||
decision_contexts:
|
||||
- bodhi_update_push_stable
|
||||
- bodhi_update_push_testing
|
||||
subject_type: koji_build
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
|
||||
|
||||
--- !Policy
|
||||
product_versions:
|
||||
- rhel-9
|
||||
- rhel-10
|
||||
decision_context: osci_compose_gate
|
||||
rules:
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional} # this is the testcase identifier, which OSCI pipeline uses
|
||||
- !PassingTestCaseRule {test_case_name: osci.brew-build.tier0.functional}
|
||||
|
||||
43
plans/all.fmf
Normal file
43
plans/all.fmf
Normal file
@ -0,0 +1,43 @@
|
||||
discover:
|
||||
how: fmf
|
||||
dist-git-source: true
|
||||
dist-git-install-builddeps: true
|
||||
execute:
|
||||
how: tmt
|
||||
|
||||
/test-01-readonly:
|
||||
summary: Execute booted readonly/nondestructive tests
|
||||
discover+:
|
||||
test:
|
||||
- /tmt/tests/bootc-install-provision
|
||||
- test-01-readonly
|
||||
|
||||
/test-20-local-upgrade:
|
||||
summary: Execute local upgrade tests
|
||||
discover+:
|
||||
test:
|
||||
- /tmt/tests/bootc-install-provision
|
||||
- test-20-local-upgrade
|
||||
|
||||
/test-21-logically-bound-switch:
|
||||
summary: Execute logically bound images tests for switching images
|
||||
discover+:
|
||||
test:
|
||||
- /tmt/tests/bootc-install-provision
|
||||
- test-21-logically-bound-switch
|
||||
|
||||
/test-22-logically-bound-install:
|
||||
summary: Execute logically bound images tests for switching images
|
||||
environment+:
|
||||
LBI: enabled
|
||||
discover+:
|
||||
test:
|
||||
- /tmt/tests/bootc-install-provision
|
||||
- test-22-logically-bound-install
|
||||
|
||||
/test-23-install-outside-container:
|
||||
summary: Execute tests for installing outside of a container
|
||||
discover+:
|
||||
test:
|
||||
- /tmt/tests/bootc-install-provision
|
||||
- test-23-install-outside-container
|
||||
@ -1,9 +0,0 @@
|
||||
- hosts: localhost
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
tests:
|
||||
- simple:
|
||||
dir: .
|
||||
run: "bootc --help"
|
||||
Loading…
Reference in New Issue
Block a user