Set working cs9 defaults for image build
The current `openstack tripleo container image build` defaults result in a failed build for the following reasons: - The base image is ubi8 (rhel) - The default --distro is centos - tcib_release is a mandatory variable but is unset, resulting in a build failure This change does the following: - default --base is now centos:stream9 - new argument --release defaults to '9', which sets tcib_release This results in built cs9 container images without requiring any --base or --tcib-extras arguments. Change-Id: I69346aa10d734580ba66e0dd571a27e46e123fe8
This commit is contained in:
parent
2bd755822f
commit
54898e34f1
tripleoclient
@ -269,8 +269,8 @@ class TestContainerImages(deploy_fakes.TestDeployOvercloud):
|
|||||||
mock_find_image.return_value = rtn_value
|
mock_find_image.return_value = rtn_value
|
||||||
cfgs = self.cmd.process_images(expected_images, parsed_args,
|
cfgs = self.cmd.process_images(expected_images, parsed_args,
|
||||||
image_configs)
|
image_configs)
|
||||||
mock_find_image.assert_called_once_with(self.cmd, 'foo',
|
mock_find_image.assert_called_once_with(
|
||||||
'/foo/tcib', 'ubi8')
|
self.cmd, 'foo', '/foo/tcib', 'centos:stream9')
|
||||||
self.assertEqual(cfgs, {'foo': rtn_value})
|
self.assertEqual(cfgs, {'foo': rtn_value})
|
||||||
|
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ class Build(command.Command):
|
|||||||
"--base",
|
"--base",
|
||||||
dest="base",
|
dest="base",
|
||||||
metavar="<base-image>",
|
metavar="<base-image>",
|
||||||
default="ubi8",
|
default="centos:stream9",
|
||||||
help=_(
|
help=_(
|
||||||
"Base image name, with optional version. Can be 'centos:8', "
|
"Base image name, with optional version. Can be 'centos:8', "
|
||||||
"base name image will be 'centos' but 'centos:8' will be "
|
"base name image will be 'centos' but 'centos:8' will be "
|
||||||
@ -105,8 +105,19 @@ class Build(command.Command):
|
|||||||
default="centos",
|
default="centos",
|
||||||
metavar="<distro>",
|
metavar="<distro>",
|
||||||
help=_(
|
help=_(
|
||||||
"Distro name, if undefined the system will build using the "
|
"Distro name which sets tcib_distro, if undefined the "
|
||||||
"host distro. (default: %(default)s)"
|
"system will build using the host distro. "
|
||||||
|
"(default: %(default)s)"
|
||||||
|
),
|
||||||
|
)
|
||||||
|
parser.add_argument(
|
||||||
|
"--release",
|
||||||
|
dest="release",
|
||||||
|
default="9",
|
||||||
|
metavar="<release>",
|
||||||
|
help=_(
|
||||||
|
"Distro major release version which sets tcib_release. "
|
||||||
|
"(default: %(default)s)"
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
@ -577,6 +588,7 @@ class Build(command.Command):
|
|||||||
{
|
{
|
||||||
"workdir": self.image_paths.get(image, work_dir),
|
"workdir": self.image_paths.get(image, work_dir),
|
||||||
"tcib_distro": parsed_args.distro,
|
"tcib_distro": parsed_args.distro,
|
||||||
|
"tcib_release": parsed_args.release,
|
||||||
"tcib_path": self.image_paths.get(image, work_dir),
|
"tcib_path": self.image_paths.get(image, work_dir),
|
||||||
"tcib_meta": {"name": image_parsed_name},
|
"tcib_meta": {"name": image_parsed_name},
|
||||||
"ansible_connection": "local",
|
"ansible_connection": "local",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user