-
Notifications
You must be signed in to change notification settings - Fork 216
USHIFT-6072: Add releases scenario for ISO and RPM deployment methods #5385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
agullon
wants to merge
15
commits into
openshift:main
Choose a base branch
from
agullon:USHIFT-6072
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 9 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
018fee4
add releases scenarios: RPM installation and ISO installation
agullon a91b88d
move image-installer and image-bootc files to a next layer
agullon e6c6065
set temp s3 bucket for testing
agullon 7e90ac0
fix aws bucket name
agullon 303dde9
remove no needed image-installer files
agullon 1754d9e
fix set default var
agullon 02f3411
remove group 5 from ostree images
agullon 9c14ef6
modify rpm scenarios to install from RPM and run standard suites
agullon 814518d
set target version for rpm RF tests
agullon 83cc265
add BREW_LREL_RELEASE_VERSION var
agullon 5bfa622
split install and remove microshift into 2 RF tests
agullon eee238b
removed blank line
agullon a5b04b8
install rhel 9.6 VM
agullon 7cbb164
set correct target version for rpm-install-upgrade test
agullon 481eb0b
OCPBUGS-60833: Fix router access logs container name
agullon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions
3
.../image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-ec-with-optional.image-bootc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- if env.Getenv "BREW_EC_RELEASE_VERSION" "" -}} | ||
localhost/rhel96-bootc-brew-ec-with-optional:latest | ||
{{- end }} |
3 changes: 3 additions & 0 deletions
3
...e-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-nightly-with-optional.image-bootc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- if env.Getenv "BREW_NIGHTLY_RELEASE_VERSION" "" -}} | ||
localhost/rhel96-bootc-brew-nightly-with-optional:latest | ||
{{- end }} |
3 changes: 3 additions & 0 deletions
3
.../image-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-rc-with-optional.image-bootc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- if env.Getenv "BREW_RC_RELEASE_VERSION" "" -}} | ||
localhost/rhel96-bootc-brew-rc-with-optional:latest | ||
{{- end }} |
3 changes: 3 additions & 0 deletions
3
...e-blueprints-bootc/layer1-base/group3/rhel96-bootc-brew-zstream-with-optional.image-bootc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{{- if env.Getenv "BREW_Y0_RELEASE_VERSION" "" -}} | ||
localhost/rhel96-bootc-brew-zstream-with-optional:latest | ||
{{- end }} |
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
#!/bin/bash | ||
|
||
# Sourced from scenario.sh and uses functions defined there. | ||
|
||
# The RPM-based image used to create the VM for this test does not | ||
# include MicroShift or greenboot, so tell the framework not to wait | ||
# for greenboot to finish when creating the VM. | ||
export SKIP_GREENBOOT=true | ||
|
||
# NOTE: Unlike most suites, these tests rely on being run IN ORDER to | ||
# ensure the host is in a good state at the start of each test. We | ||
# could have separated them and run them as separate scenarios, but | ||
# did not want to spend the resources on a new VM. | ||
export TEST_RANDOMIZATION=none | ||
|
||
configure_microshift_mirror() { | ||
local -r repo=$1 | ||
|
||
# `repo` might be empty if we install microshift from rhocp | ||
if [[ -z "${repo}" ]] ; then | ||
return | ||
fi | ||
|
||
# `repo` might be an enabled repo from a released version instead | ||
# of a mirror. | ||
if [[ ! "${repo}" =~ ^http ]]; then | ||
return | ||
fi | ||
|
||
local -r tmp_file=$(mktemp) | ||
tee "${tmp_file}" >/dev/null <<EOF | ||
[microshift-mirror-rpms] | ||
name=MicroShift Mirror | ||
baseurl=${repo} | ||
enabled=1 | ||
gpgcheck=0 | ||
skip_if_unavailable=0 | ||
EOF | ||
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}" | ||
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/microshift-mirror-rpms.repo" | ||
rm -f "${tmp_file}" | ||
} | ||
|
||
configure_rhocp_repo() { | ||
local -r rhocp=$1 | ||
local -r version=$2 | ||
|
||
# The repository may be empty if the beta mirror is not up yet | ||
if [[ -z "${rhocp}" ]] ; then | ||
return | ||
fi | ||
|
||
if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then | ||
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms" | ||
elif [[ "${rhocp}" =~ ^http ]]; then | ||
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms" | ||
local -r tmp_file=$(mktemp) | ||
|
||
tee "${tmp_file}" >/dev/null <<EOF | ||
[${ocp_repo_name}] | ||
name=Beta rhocp RPMs for RHEL 9 | ||
baseurl=${rhocp} | ||
enabled=1 | ||
gpgcheck=0 | ||
skip_if_unavailable=0 | ||
EOF | ||
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}" | ||
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/${ocp_repo_name}.repo" | ||
rm -f "${tmp_file}" | ||
fi | ||
} | ||
|
||
scenario_create_vms() { | ||
prepare_kickstart host1 kickstart-liveimg.ks.template "" | ||
launch_vm | ||
|
||
# Open the firewall ports. Other scenarios get this behavior by | ||
# embedding settings in the blueprint, but there is no blueprint | ||
# for this scenario. We need do this step before running the RF | ||
# suite so that suite can assume it can reach all of the same | ||
# ports as for any other test. | ||
configure_vm_firewall host1 | ||
|
||
# Register the host with subscription manager so we can install | ||
# dependencies. | ||
subscription_manager_register host1 | ||
} | ||
|
||
scenario_remove_vms() { | ||
remove_vm host1 | ||
} | ||
|
||
scenario_run_tests() { | ||
local -r reponame=$(basename "${BREW_REPO}") | ||
local -r repo_url="${WEB_SERVER_URL}/rpm-repos/${reponame}" | ||
local -r target_version=$(local_rpm_version "${BREW_REPO}") | ||
|
||
# Enable the rhocp and dependency repositories. | ||
# | ||
# Note that rhocp or beta dependencies repository may not yet exist | ||
# for the current version. Then, just use whatever we can get for | ||
# the previous minor version. | ||
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MINOR_VERSION}" | ||
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}" | ||
configure_rhocp_repo "${RHOCP_MINOR_Y1}" "${PREVIOUS_MINOR_VERSION}" | ||
configure_rhocp_repo "${RHOCP_MINOR_Y1_BETA}" "${PREVIOUS_MINOR_VERSION}" | ||
configure_microshift_mirror "${PREVIOUS_RELEASE_REPO}" | ||
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms" | ||
|
||
run_tests host1 \ | ||
--exitonfailure \ | ||
--variable "SOURCE_REPO_URL:${repo_url}" \ | ||
--variable "TARGET_VERSION:${target_version}" \ | ||
--variable "PREVIOUS_MINOR_VERSION:${PREVIOUS_MINOR_VERSION}" \ | ||
suites/rpm/install-and-upgrade-successful.robot | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
|
||
# Sourced from scenario.sh and uses functions defined there. | ||
|
||
# The RPM-based image used to create the VM for this test does not | ||
# include MicroShift or greenboot, so tell the framework not to wait | ||
# for greenboot to finish when creating the VM. | ||
export SKIP_GREENBOOT=true | ||
|
||
# NOTE: Unlike most suites, these tests rely on being run IN ORDER to | ||
# ensure the host is in a good state at the start of each test. We | ||
# could have separated them and run them as separate scenarios, but | ||
# did not want to spend the resources on a new VM. | ||
export TEST_RANDOMIZATION=none | ||
|
||
configure_rhocp_repo() { | ||
local -r rhocp=$1 | ||
local -r version=$2 | ||
|
||
# The repository may be empty if the beta mirror is not up yet | ||
if [[ -z "${rhocp}" ]] ; then | ||
return | ||
fi | ||
|
||
if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then | ||
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms" | ||
elif [[ "${rhocp}" =~ ^http ]]; then | ||
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms" | ||
local -r tmp_file=$(mktemp) | ||
|
||
tee "${tmp_file}" >/dev/null <<EOF | ||
[${ocp_repo_name}] | ||
name=Beta rhocp RPMs for RHEL 9 | ||
baseurl=${rhocp} | ||
enabled=1 | ||
gpgcheck=0 | ||
skip_if_unavailable=0 | ||
EOF | ||
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}" | ||
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/${ocp_repo_name}.repo" | ||
rm -f "${tmp_file}" | ||
fi | ||
} | ||
|
||
scenario_create_vms() { | ||
prepare_kickstart host1 kickstart-liveimg.ks.template "" | ||
launch_vm | ||
|
||
# Open the firewall ports. Other scenarios get this behavior by | ||
# embedding settings in the blueprint, but there is no blueprint | ||
# for this scenario. We need do this step before running the RF | ||
# suite so that suite can assume it can reach all of the same | ||
# ports as for any other test. | ||
configure_vm_firewall host1 | ||
|
||
# Register the host with subscription manager so we can install | ||
# dependencies. | ||
subscription_manager_register host1 | ||
} | ||
|
||
scenario_remove_vms() { | ||
remove_vm host1 | ||
} | ||
|
||
scenario_run_tests() { | ||
local -r reponame=$(basename "${BREW_REPO}") | ||
local -r repo_url="${WEB_SERVER_URL}/rpm-repos/${reponame}" | ||
|
||
# Enable the rhocp and dependency repositories. | ||
# | ||
# Note that rhocp or beta dependencies repository may not yet exist | ||
# for the current version. Then, just use whatever we can get for | ||
# the previous minor version. | ||
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MINOR_VERSION}" | ||
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}" | ||
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms" | ||
|
||
run_tests host1 \ | ||
--exitonfailure \ | ||
--variable "SOURCE_REPO_URL:${repo_url}" \ | ||
--variable "TARGET_VERSION:${BREW_LREL_RELEASE_VERSION}" \ | ||
--variable "EXPECTED_OS_VERSION:9.6" \ | ||
suites/rpm/install.robot \ | ||
suites/standard1/ suites/selinux/validate-selinux-policy.robot | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
#!/bin/bash | ||
|
||
# Sourced from scenario.sh and uses functions defined there. | ||
|
||
# The RPM-based image used to create the VM for this test does not | ||
# include MicroShift or greenboot, so tell the framework not to wait | ||
# for greenboot to finish when creating the VM. | ||
export SKIP_GREENBOOT=true | ||
|
||
# NOTE: Unlike most suites, these tests rely on being run IN ORDER to | ||
# ensure the host is in a good state at the start of each test. We | ||
# could have separated them and run them as separate scenarios, but | ||
# did not want to spend the resources on a new VM. | ||
export TEST_RANDOMIZATION=none | ||
|
||
configure_rhocp_repo() { | ||
local -r rhocp=$1 | ||
local -r version=$2 | ||
|
||
# The repository may be empty if the beta mirror is not up yet | ||
if [[ -z "${rhocp}" ]] ; then | ||
return | ||
fi | ||
|
||
if [[ "${rhocp}" =~ ^[0-9]{2} ]]; then | ||
run_command_on_vm host1 "sudo subscription-manager repos --enable rhocp-4.${rhocp}-for-rhel-9-\$(uname -m)-rpms" | ||
elif [[ "${rhocp}" =~ ^http ]]; then | ||
local -r ocp_repo_name="rhocp-4.${version}-for-rhel-9-mirrorbeta-rpms" | ||
local -r tmp_file=$(mktemp) | ||
|
||
tee "${tmp_file}" >/dev/null <<EOF | ||
[${ocp_repo_name}] | ||
name=Beta rhocp RPMs for RHEL 9 | ||
baseurl=${rhocp} | ||
enabled=1 | ||
gpgcheck=0 | ||
skip_if_unavailable=0 | ||
EOF | ||
copy_file_to_vm host1 "${tmp_file}" "${tmp_file}" | ||
run_command_on_vm host1 "sudo cp ${tmp_file} /etc/yum.repos.d/${ocp_repo_name}.repo" | ||
rm -f "${tmp_file}" | ||
fi | ||
} | ||
|
||
scenario_create_vms() { | ||
prepare_kickstart host1 kickstart-liveimg.ks.template "" | ||
launch_vm | ||
|
||
# Open the firewall ports. Other scenarios get this behavior by | ||
# embedding settings in the blueprint, but there is no blueprint | ||
# for this scenario. We need do this step before running the RF | ||
# suite so that suite can assume it can reach all of the same | ||
# ports as for any other test. | ||
configure_vm_firewall host1 | ||
|
||
# Register the host with subscription manager so we can install | ||
# dependencies. | ||
subscription_manager_register host1 | ||
} | ||
|
||
scenario_remove_vms() { | ||
remove_vm host1 | ||
} | ||
|
||
scenario_run_tests() { | ||
local -r reponame=$(basename "${BREW_REPO}") | ||
local -r repo_url="${WEB_SERVER_URL}/rpm-repos/${reponame}" | ||
|
||
# Enable the rhocp and dependency repositories. | ||
# | ||
# Note that rhocp or beta dependencies repository may not yet exist | ||
# for the current version. Then, just use whatever we can get for | ||
# the previous minor version. | ||
configure_rhocp_repo "${RHOCP_MINOR_Y}" "${MINOR_VERSION}" | ||
configure_rhocp_repo "${RHOCP_MINOR_Y_BETA}" "${MINOR_VERSION}" | ||
run_command_on_vm host1 "sudo subscription-manager repos --enable fast-datapath-for-rhel-9-\$(uname -m)-rpms" | ||
|
||
run_tests host1 \ | ||
--exitonfailure \ | ||
--variable "SOURCE_REPO_URL:${repo_url}" \ | ||
--variable "TARGET_VERSION:${BREW_LREL_RELEASE_VERSION}" \ | ||
--variable "EXPECTED_OS_VERSION:9.6" \ | ||
suites/rpm/install.robot \ | ||
suites/standard2/ | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this line change will be removed before merging this PR, add it to speed up this PR testing changes