Build timeout as CLI arg for container image build
In https://review.opendev.org/#/c/678907/ it was suggested that the timeout be a CLI arg. And at present the ppc64le RDO container build job needs quite a big timeout. Change-Id: I6bf5238864228c54c84b22b567d873cf29f0e82c
This commit is contained in:
parent
42a10178c7
commit
02e851fe2b
@ -145,7 +145,7 @@ testscenarios===0.4
|
||||
testtools==2.2.0
|
||||
tooz==1.58.0
|
||||
traceback2==1.4.0
|
||||
tripleo-common==12.4.0
|
||||
tripleo-common==12.6.0
|
||||
ujson==1.35
|
||||
unittest2==1.1.0
|
||||
validations-libs==1.0.0
|
||||
|
@ -14,7 +14,7 @@ simplejson>=3.5.1 # MIT
|
||||
six>=1.10.0 # MIT
|
||||
osc-lib>=1.8.0 # Apache-2.0
|
||||
websocket-client>=0.44.0 # LGPLv2+
|
||||
tripleo-common>=12.4.0 # Apache-2.0
|
||||
tripleo-common>=12.6.0 # Apache-2.0
|
||||
cryptography>=2.1 # BSD/Apache-2.0
|
||||
ansible-runner>=1.4.5 # Apache 2.0
|
||||
validations-libs>=1.0.0
|
||||
|
@ -193,6 +193,14 @@ class BuildImage(command.Command):
|
||||
help=_("TripleO container builds directory, storing configs and "
|
||||
"logs for each image and its dependencies.")
|
||||
)
|
||||
parser.add_argument(
|
||||
"--build-timeout",
|
||||
dest="build_timeout",
|
||||
default=None,
|
||||
type=int,
|
||||
metavar="<build timeout in seconds>",
|
||||
help=_("Build timeout in seconds.")
|
||||
)
|
||||
return parser
|
||||
|
||||
def take_action(self, parsed_args):
|
||||
@ -233,7 +241,8 @@ class BuildImage(command.Command):
|
||||
utils.get_from_cfg(kolla_cfg, "tag"),
|
||||
utils.get_from_cfg(kolla_cfg, "namespace"),
|
||||
utils.get_from_cfg(kolla_cfg, "registry"),
|
||||
utils.getboolean_from_cfg(kolla_cfg, "push"))
|
||||
utils.getboolean_from_cfg(kolla_cfg, "push"),
|
||||
build_timeout=parsed_args.build_timeout)
|
||||
bb.build_all()
|
||||
elif parsed_args.list_dependencies:
|
||||
deps = json.loads(result)
|
||||
|
@ -217,6 +217,14 @@ class Build(command.Command):
|
||||
help=_("A comma separated list of RHEL modules to enable with "
|
||||
"their version. Example: 'mariadb:10.3,virt:8.3'."),
|
||||
)
|
||||
parser.add_argument(
|
||||
"--build-timeout",
|
||||
dest="build_timeout",
|
||||
metavar="<build timeout in seconds>",
|
||||
default=None,
|
||||
type=int,
|
||||
help=_("Build timeout in seconds.")
|
||||
)
|
||||
return parser
|
||||
|
||||
def imagename_to_regex(self, imagename):
|
||||
@ -639,6 +647,7 @@ class Build(command.Command):
|
||||
push_containers=parsed_args.push,
|
||||
volumes=parsed_args.volumes,
|
||||
excludes=list(set(excludes)),
|
||||
build_timeout=parsed_args.build_timeout
|
||||
)
|
||||
try:
|
||||
bb.build_all()
|
||||
|
Loading…
Reference in New Issue
Block a user