Skip to content
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

Add explicit RHEL7 and RHEL9 test targets #6826

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions tools/install-tester/config/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,16 @@
- amazon-linux
- ubuntu
- debian
- rhel
- rhel:9
skip:
- 3.2.x/debian/enterprise/package
- 3.2.x/debian/enterprise/repository
- 3.3.x/debian/enterprise/package
- 3.3.x/debian/enterprise/repository
- 3.2.x/rhel/enterprise/package
- 3.2.x/rhel/enterprise/repository
- 3.3.x/rhel/enterprise/package
- 3.3.x/rhel/enterprise/repository
- 3.2.x/rhel:9/enterprise/package
- 3.2.x/rhel:9/enterprise/repository
- 3.3.x/rhel:9/enterprise/package
- 3.3.x/rhel:9/enterprise/repository
arch:
- linux/arm64
outputs:
Expand All @@ -29,7 +29,7 @@
distros:
- amazon-linux
- ubuntu
- rhel
- rhel:7
- debian
arch:
- linux/amd64
Expand All @@ -43,7 +43,7 @@
- enterprise
distros:
- ubuntu
- rhel
- rhel:7
- amazon-linux
- debian
- centos
Expand Down
8 changes: 7 additions & 1 deletion tools/install-tester/config/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@ debian:
- useradd tester -m -p password
- usermod -aG sudo tester
- "echo 'ALL ALL = (ALL) NOPASSWD: ALL' > /etc/sudoers.d/tester"
rhel:
"rhel:7":
image: "registry.access.redhat.com/ubi7/ubi-init:latest"
setup:
- yum install -y curl gpg sudo
- useradd tester -m -p password
- "echo 'ALL ALL = (ALL) NOPASSWD: ALL' > /etc/sudoers.d/tester"
"rhel:9":
image: "registry.access.redhat.com/ubi9/ubi-init:latest"
setup:
- yum install -y gpg sudo
Expand Down
15 changes: 10 additions & 5 deletions tools/install-tester/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,13 @@ const expectedFailures = yaml.load(
const config = loadConfig();
for (let job of config) {
for (let distro of job.distros) {
const osOnly = distro.split(":")[0];
for (let arch of job.arch) {
let installOptions;
if (job.version.slice(0, 2) === "2.") {
installOptions = await extractV2(job.version, distro);
installOptions = await extractV2(job.version, osOnly);
} else {
installOptions = await extractV3(job.version, distro);
installOptions = await extractV3(job.version, osOnly);
}
for (let installOption of installOptions) {
await runSingleJob(distro, job, arch, installOption, conditions);
Expand All @@ -72,6 +73,7 @@ async function runSingleJob2(distro, job, arch, installOption, conditions) {
}

async function runSingleJob(distro, job, arch, installOption, conditions) {
const osOnly = distro.split(":")[0];
const marker = `${installOption.package}@${job.version} via ${installOption.type}`;
const ref = `${job.version}/${distro}/${
installOption.package
Expand Down Expand Up @@ -132,7 +134,6 @@ async function runSingleJob(distro, job, arch, installOption, conditions) {
);

if (expected !== version) {

// Check if the package exists on download.konghq.com
// Only supports RHEL at the moment
let existsOnOldSite = "❓";
Expand All @@ -147,7 +148,10 @@ async function runSingleJob(distro, job, arch, installOption, conditions) {

if (distro === "rhel") {
// 2.x packages are noarch for enterprise on RHEL
if (installOption.package == "enterprise" && expectedVersion[0] == "2") {
if (
installOption.package == "enterprise" &&
expectedVersion[0] == "2"
) {
packageArch = "noarch";
}
url = `https://download.konghq.com/gateway-${expectedVersion[0]}.x-rhel-7/Packages/k/${packageName}-${expectedVersion}.rhel7.${packageArch}.rpm`;
Expand Down Expand Up @@ -203,7 +207,8 @@ function shouldSkip(
} not in [${conditions.version.join(", ")}]`;
}

if (conditions.distro.length && !conditions.distro.includes(distro)) {
const osOnly = distro.split(":")[0];
if (conditions.distro.length && !conditions.distro.includes(distro) && !conditions.distro.includes(osOnly)) {
return `⌛ ${summary} skipped | Distro ${distro} not in [${conditions.distro.join(
", ",
)}]`;
Expand Down