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

Update install tests for deprecated packages and site [skip ci] #7908

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion .github/workflows/install-instructions-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
distro: [ubuntu, rhel, amazon-linux, debian, centos]
distro: [ubuntu, rhel, amazon-linux, debian]
arch: ["linux/amd64", "linux/arm64"]
runs-on: ubuntu-latest
timeout-minutes: 60
Expand Down
8 changes: 2 additions & 6 deletions tools/install-tester/config/jobs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
distros:
- amazon-linux
- ubuntu
- rhel:7
- rhel:9
- debian
arch:
- linux/amd64
Expand All @@ -43,15 +43,11 @@
- enterprise
distros:
- ubuntu
- rhel:7
- rhel:8
- amazon-linux
- debian
- centos
arch:
- linux/amd64
skip:
- 2.8.x/centos/oss/package # No OSS package for 2.8
- 2.8.x/centos/oss/repository # No OSS package for 2.8
outputs:
enterprise: "Kong Enterprise {{ version }}"
oss: "{{ version }}"
10 changes: 2 additions & 8 deletions tools/install-tester/config/setup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ debian:
- useradd tester -m -p password
- usermod -aG sudo tester
- "echo 'ALL ALL = (ALL) NOPASSWD: ALL' > /etc/sudoers.d/tester"
"rhel:7":
image: "registry.access.redhat.com/ubi7/ubi-init:latest"
"rhel:8":
image: "registry.access.redhat.com/ubi8/ubi-init:latest"
setup:
- yum install -y curl gpg sudo
- useradd tester -m -p password
Expand All @@ -32,9 +32,3 @@ amazon-linux:
- yum install -y curl gpg sudo shadow-utils util-linux
- useradd tester -m -p password
- "echo 'ALL ALL = (ALL) NOPASSWD: ALL' > /etc/sudoers.d/tester"
centos:
image: "centos:centos7"
setup:
- yum install -y curl gpg sudo
- useradd tester -m -p password
- "echo 'ALL ALL = (ALL) NOPASSWD: ALL' > /etc/sudoers.d/tester"
28 changes: 1 addition & 27 deletions tools/install-tester/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,34 +134,8 @@ 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 = "❓";
const expectedParts = expected.split(" ");
const expectedVersion = expectedParts[expectedParts.length - 1];
let packageArch = arch.replace("linux/", "");

let packageName = "kong";
if (installOption.package == "enterprise") {
packageName = "kong-enterprise-edition";
}

if (distro === "rhel") {
// 2.x packages are noarch for enterprise on RHEL
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`;

const response = await fetch(url, { method: "HEAD" });
existsOnOldSite = response.status != 404 ? "✅" : "❌";
}

console.log(
`❌ ${summary} Expected: ${expected}, Got: ${version}, Exists on download.konghq.com: ${existsOnOldSite}`,
`❌ ${summary} Expected: ${expected}, Got: ${version}`,
);
process.exitCode = 1;

Expand Down
Loading