Skip to content

Commit

Permalink
Merge pull request #443 from jhadvig/bz1847323
Browse files Browse the repository at this point in the history
[release-4.4] Bug 1847323: Publish license file
  • Loading branch information
openshift-merge-robot committed Sep 19, 2020
2 parents a6f79b0 + 2a93c56 commit df1bd0b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions manifests/07-downloads-deployment.yaml
Expand Up @@ -93,6 +93,7 @@ spec:
os.mkdir(arch)
for operating_system in ['linux']:
os.mkdir(os.path.join(arch, operating_system))
os.symlink('/usr/share/openshift/LICENSE', 'oc-license')
for arch, operating_system, path in [
('amd64', 'linux', '/usr/share/openshift/linux_amd64/oc'),
Expand Down
5 changes: 5 additions & 0 deletions pkg/console/controllers/clidownloads/controller.go
Expand Up @@ -173,6 +173,11 @@ func PlatformBasedOCConsoleCLIDownloads(host, cliDownloadsName string) *v1.Conso
})
}

links = append(links, v1.CLIDownloadLink{
Href: fmt.Sprintf("%s/oc-license", baseURL),
Text: "LICENSE",
})

return &v1.ConsoleCLIDownload{
ObjectMeta: metav1.ObjectMeta{
Name: cliDownloadsName,
Expand Down
4 changes: 4 additions & 0 deletions pkg/console/controllers/clidownloads/controller_test.go
Expand Up @@ -135,6 +135,10 @@ The oc binary offers the same capabilities as the kubectl binary, but it is furt
Href: "https://www.example.com/s390x/linux/oc.tar",
Text: "Download oc for Linux for IBM Z (unsupported)",
},
{
Href: "https://www.example.com/oc-license",
Text: "LICENSE",
},
},
},
},
Expand Down

0 comments on commit df1bd0b

Please sign in to comment.