Skip to content

Commit

Permalink
Add explicit RHEL7 and RHEL9 test targets (#6826)
Browse files Browse the repository at this point in the history
* Add explicit RHEL7 and RHEL9 test targets
* RHEL7 builds exist for amd64. RHEL9 is only needed for arm64
* Skip RHEL 9 arm65 builds for < 3.4
  • Loading branch information
mheap committed Jan 24, 2024
1 parent 669973c commit 3e04e6b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
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

0 comments on commit 3e04e6b

Please sign in to comment.