Skip to content
Open
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
51 changes: 51 additions & 0 deletions pkg/cli/admin/release/extract_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,27 @@ var (
program is [located on github](https://github.com/openshift/cloud-credential-operator).
`)

readmeOCMirror = heredoc.Doc(`
# OC Mirror Utility

The oc-mirror tool assists with mirroring OpenShift release content from a target
registry to another for disconnected install scenarios.

To learn more about OpenShift, visit [docs.openshift.com](https://docs.openshift.com)
and select the version of OpenShift you are using.

# Installing the tools
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO this should be Installing the Tools

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I copied from the other instances which are all "Installing the tools" but I can change it, no problem.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a nit, anyway. You can just keep it to be consistent.


After extracting this archive, move the \u0060oc-mirror\u0060 binary to a location on your
PATH such as \u0060/usr/local/bin\u0060, or keep it in a temporary directory and
reference it via \u0060./oc-mirror\u0060.

## License

OpenShift is licensed under the Apache Public License 2.0. The source code for this
program is [located on github](https://github.com/openshift/oc-mirror).
`)

// indicates that the architecture of the binary matches the release payload
targetReleaseArch = "release-arch"
)
Expand Down Expand Up @@ -526,6 +547,36 @@ func (o *ExtractOptions) extractCommand(command string) error {
ArchiveFormat: "ccoctl-linux-rhel9-%s.tar.gz",
TargetCommandName: "ccoctl",
},
{
OS: "linux",
Arch: targetReleaseArch,
Command: "oc-mirror.rhel9",
InjectReleaseVersion: true,
Mapping: extract.Mapping{Image: "oc-mirror", From: "usr/bin/oc-mirror.rhel9"},
Readme: readmeOCMirror,
ArchiveFormat: "oc-mirror.rhel9-%s.tar.gz",
TargetCommandName: "oc-mirror",
},
{
OS: "linux",
Arch: targetReleaseArch,
Command: "oc-mirror.rhel8",
InjectReleaseVersion: true,
Mapping: extract.Mapping{Image: "oc-mirror", From: "usr/bin/oc-mirror.rhel8"},
Readme: readmeOCMirror,
ArchiveFormat: "oc-mirror.rhel8-%s.tar.gz",
TargetCommandName: "oc-mirror",
},
{
OS: "linux",
Arch: targetReleaseArch,
Command: "oc-mirror",
InjectReleaseVersion: true,
Mapping: extract.Mapping{Image: "oc-mirror", From: "usr/bin/oc-mirror"},
Readme: readmeOCMirror,
ArchiveFormat: "oc-mirror-%s.tar.gz",
TargetCommandName: "oc-mirror",
},
}

currentArch := runtime.GOARCH
Expand Down