You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
release: Support extracting the 'oc' and 'openshift-install' binaries
The payload is the authoritative source of tools. To support the
openshift-install binary being transformed to lock against a particular
version, add support for:
oc adm release extract --command=oc|openshift-install ...
The command attempts to extract the binary appropriate for the current
os or respects --command-os=mac|windows|linux. We do not support
alternative architectures yet but those will be handled by extending
the os field if necessary. We hardcode the lookup locations for now,
assuming that a future release may make this more generic.
The 'cli-artifacts' and 'installer-artifacts' images will descend
from 'cli' and 'installer' and offer the mac/windows and mac variants
of their respective commands.
A more general purpose variant of this command is:
oc adm release extract --tools ... --to=DIR
which creates in DIR an archive for each tool+OS combination
(right now, oc win/mac/linux and openshift-install mac/linux) as
well as a sha256sum.txt.asc file that can be used to verify the
output.
flags.StringVarP(&o.RegistryConfig, "registry-config", "a", o.RegistryConfig, "Path to your registry credentials (defaults to ~/.docker/config.json)")
61
-
flags.StringVar(&o.GitExtractDir, "git", o.GitExtractDir, "Check out the sources that created this release into the provided dir. Repos will be created at <dir>/<host>/<path>. Requires 'git' on your path.")
63
+
62
64
flags.StringVar(&o.From, "from", o.From, "Image containing the release payload.")
63
65
flags.StringVar(&o.File, "file", o.File, "Extract a single file from the payload to standard output.")
64
66
flags.StringVar(&o.Directory, "to", o.Directory, "Directory to write release contents to, defaults to the current directory.")
67
+
68
+
flags.StringVar(&o.GitExtractDir, "git", o.GitExtractDir, "Check out the sources that created this release into the provided dir. Repos will be created at <dir>/<host>/<path>. Requires 'git' on your path.")
69
+
flags.BoolVar(&o.Tools, "tools", o.Tools, "Extract the tools archives from the release image. Implies --command=*")
70
+
71
+
flags.StringVar(&o.Command, "command", o.Command, "Specify 'oc' or 'openshift-install' to extract the client for your operating system.")
72
+
flags.StringVar(&o.CommandOperatingSystem, "command-os", o.CommandOperatingSystem, "Override which operating system command is extracted (mac, windows, linux). You map specify '*' to extract all tool archives.")
65
73
returncmd
66
74
}
67
75
@@ -70,6 +78,10 @@ type ExtractOptions struct {
70
78
71
79
Fromstring
72
80
81
+
Toolsbool
82
+
Commandstring
83
+
CommandOperatingSystemstring
84
+
73
85
// GitExtractDir is the path of a root directory to extract the source of a release to.
0 commit comments