Skip to content

Commit 0dece6e

Browse files
authored
Revert "CONSOLE-4523: Add rhel8 and rhel9 oc binaries for Linux OS in CLI downloads"
1 parent 7896a75 commit 0dece6e

File tree

4 files changed

+7
-55
lines changed

4 files changed

+7
-55
lines changed

bindata/assets/deployments/downloads-deployment.yaml

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -125,26 +125,19 @@ spec:
125125
126126
for arch, operating_system, path in [
127127
('amd64', 'linux', '/usr/share/openshift/linux_amd64/oc'),
128-
('amd64', 'linux', '/usr/share/openshift/linux_amd64/oc.rhel8'),
129-
('amd64', 'linux', '/usr/share/openshift/linux_amd64/oc.rhel9'),
130128
('amd64', 'mac', '/usr/share/openshift/mac/oc'),
131129
('amd64', 'windows', '/usr/share/openshift/windows/oc.exe'),
132130
('arm64', 'linux', '/usr/share/openshift/linux_arm64/oc'),
133-
('arm64', 'linux', '/usr/share/openshift/linux_arm64/oc.rhel8'),
134-
('arm64', 'linux', '/usr/share/openshift/linux_arm64/oc.rhel9'),
135131
('arm64', 'mac', '/usr/share/openshift/mac_arm64/oc'),
136132
('ppc64le', 'linux', '/usr/share/openshift/linux_ppc64le/oc'),
137-
('ppc64le', 'linux', '/usr/share/openshift/linux_ppc64le/oc.rhel8'),
138-
('ppc64le', 'linux', '/usr/share/openshift/linux_ppc64le/oc.rhel9'),
139133
('s390x', 'linux', '/usr/share/openshift/linux_s390x/oc'),
140-
('s390x', 'linux', '/usr/share/openshift/linux_s390x/oc.rhel8'),
141-
('s390x', 'linux', '/usr/share/openshift/linux_s390x/oc.rhel9'),
142134
]:
143135
basename = os.path.basename(path)
144136
target_path = os.path.join(arch, operating_system, basename)
145-
os.makedirs(os.path.join(arch, operating_system), exist_ok=True)
137+
os.mkdir(os.path.join(arch, operating_system))
146138
os.symlink(path, target_path)
147-
archive_path_root = os.path.join(arch, operating_system, basename)
139+
base_root, _ = os.path.splitext(basename)
140+
archive_path_root = os.path.join(arch, operating_system, base_root)
148141
with tarfile.open('{}.tar'.format(archive_path_root), 'w') as tar:
149142
tar.add(path, basename)
150143
with zipfile.ZipFile('{}.zip'.format(archive_path_root), 'w') as zip:

pkg/console/controllers/clidownloads/controller.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -184,20 +184,12 @@ func PlatformBasedOCConsoleCLIDownloads(host, cliDownloadsName string) *v1.Conso
184184
archType string
185185
}{
186186
{"Linux for x86_64", "amd64/linux", "oc.tar"},
187-
{"Linux for x86_64 - RHEL 8", "amd64/linux", "oc.rhel8.tar"},
188-
{"Linux for x86_64 - RHEL 9", "amd64/linux", "oc.rhel9.tar"},
189187
{"Mac for x86_64", "amd64/mac", "oc.zip"},
190-
{"Windows for x86_64", "amd64/windows", "oc.exe.zip"},
188+
{"Windows for x86_64", "amd64/windows", "oc.zip"},
191189
{"Linux for ARM 64", "arm64/linux", "oc.tar"},
192-
{"Linux for ARM 64 - RHEL 8", "arm64/linux", "oc.rhel8.tar"},
193-
{"Linux for ARM 64 - RHEL 9", "arm64/linux", "oc.rhel9.tar"},
194190
{"Mac for ARM 64", "arm64/mac", "oc.zip"},
195191
{"Linux for IBM Power, little endian", "ppc64le/linux", "oc.tar"},
196-
{"Linux for IBM Power, little endian - RHEL 8", "ppc64le/linux", "oc.rhel8.tar"},
197-
{"Linux for IBM Power, little endian - RHEL 9", "ppc64le/linux", "oc.rhel9.tar"},
198192
{"Linux for IBM Z", "s390x/linux", "oc.tar"},
199-
{"Linux for IBM Z - RHEL 8", "s390x/linux", "oc.rhel8.tar"},
200-
{"Linux for IBM Z - RHEL 9", "s390x/linux", "oc.rhel9.tar"},
201193
}
202194

203195
links := []v1.CLIDownloadLink{}
@@ -220,7 +212,7 @@ func PlatformBasedOCConsoleCLIDownloads(host, cliDownloadsName string) *v1.Conso
220212
Spec: v1.ConsoleCLIDownloadSpec{
221213
Description: `With the OpenShift command line interface, you can create applications and manage OpenShift projects from a terminal.
222214
223-
The oc binary offers the same capabilities as the kubectl binary, but it is further extended to natively support OpenShift Container Platform features. You can download oc using the following links.
215+
The oc binary offers the same capabilities as the kubectl binary, but it is further extended to natively support OpenShift Container Platform features.
224216
`,
225217
DisplayName: "oc - OpenShift Command Line Interface (CLI)",
226218
Links: links,

pkg/console/controllers/clidownloads/controller_test.go

Lines changed: 2 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -116,42 +116,26 @@ func TestPlatformBasedOCConsoleCLIDownloads(t *testing.T) {
116116
Spec: v1.ConsoleCLIDownloadSpec{
117117
Description: `With the OpenShift command line interface, you can create applications and manage OpenShift projects from a terminal.
118118
119-
The oc binary offers the same capabilities as the kubectl binary, but it is further extended to natively support OpenShift Container Platform features. You can download oc using the following links.
119+
The oc binary offers the same capabilities as the kubectl binary, but it is further extended to natively support OpenShift Container Platform features.
120120
`,
121121
DisplayName: "oc - OpenShift Command Line Interface (CLI)",
122122
Links: []v1.CLIDownloadLink{
123123
{
124124
Href: "https://www.example.com/amd64/linux/oc.tar",
125125
Text: "Download oc for Linux for x86_64",
126126
},
127-
{
128-
Href: "https://www.example.com/amd64/linux/oc.rhel8.tar",
129-
Text: "Download oc for Linux for x86_64 - RHEL 8",
130-
},
131-
{
132-
Href: "https://www.example.com/amd64/linux/oc.rhel9.tar",
133-
Text: "Download oc for Linux for x86_64 - RHEL 9",
134-
},
135127
{
136128
Href: "https://www.example.com/amd64/mac/oc.zip",
137129
Text: "Download oc for Mac for x86_64",
138130
},
139131
{
140-
Href: "https://www.example.com/amd64/windows/oc.exe.zip",
132+
Href: "https://www.example.com/amd64/windows/oc.zip",
141133
Text: "Download oc for Windows for x86_64",
142134
},
143135
{
144136
Href: "https://www.example.com/arm64/linux/oc.tar",
145137
Text: "Download oc for Linux for ARM 64",
146138
},
147-
{
148-
Href: "https://www.example.com/arm64/linux/oc.rhel8.tar",
149-
Text: "Download oc for Linux for ARM 64 - RHEL 8",
150-
},
151-
{
152-
Href: "https://www.example.com/arm64/linux/oc.rhel9.tar",
153-
Text: "Download oc for Linux for ARM 64 - RHEL 9",
154-
},
155139
{
156140
Href: "https://www.example.com/arm64/mac/oc.zip",
157141
Text: "Download oc for Mac for ARM 64",
@@ -160,26 +144,10 @@ The oc binary offers the same capabilities as the kubectl binary, but it is furt
160144
Href: "https://www.example.com/ppc64le/linux/oc.tar",
161145
Text: "Download oc for Linux for IBM Power, little endian",
162146
},
163-
{
164-
Href: "https://www.example.com/ppc64le/linux/oc.rhel8.tar",
165-
Text: "Download oc for Linux for IBM Power, little endian - RHEL 8",
166-
},
167-
{
168-
Href: "https://www.example.com/ppc64le/linux/oc.rhel9.tar",
169-
Text: "Download oc for Linux for IBM Power, little endian - RHEL 9",
170-
},
171147
{
172148
Href: "https://www.example.com/s390x/linux/oc.tar",
173149
Text: "Download oc for Linux for IBM Z",
174150
},
175-
{
176-
Href: "https://www.example.com/s390x/linux/oc.rhel8.tar",
177-
Text: "Download oc for Linux for IBM Z - RHEL 8",
178-
},
179-
{
180-
Href: "https://www.example.com/s390x/linux/oc.rhel9.tar",
181-
Text: "Download oc for Linux for IBM Z - RHEL 9",
182-
},
183151
{
184152
Href: "https://www.example.com/oc-license",
185153
Text: "LICENSE",

test/e2e/downloads_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ func TestDownloadsEndpoint(t *testing.T) {
4242
req := getRequest(t, link.Href)
4343
client := getInsecureClient()
4444
resp, err := client.Do(req)
45-
t.Logf("Requesting %s at %s\n", link.Text, link.Href)
4645

4746
if err != nil {
4847
t.Fatalf("http error getting %s at %s: %s", link.Text, link.Href, err)

0 commit comments

Comments
 (0)