Change build images condition

- Our registry by default is set to local registry so
condition like 'if not settings.registry' doesn't make sense.
Change it condition to compare with local registry address

Change-Id: I7c49be77f6cdee921116df18891809eab618f376
This commit is contained in:
asledzinskiy 2016-12-08 16:57:23 +02:00
parent 2cc97d84ab
commit 97989e87ae
4 changed files with 9 additions and 17 deletions

View File

@ -64,7 +64,7 @@ def galera_deployed(ccpcluster,
# Note: keep fixtures in strict dependences from each other!
if not config.os.running:
general_config = deepcopy(settings.CCP_CONF)
if settings.BUILD_IMAGES:
if settings.REGISTRY == "127.0.0.1:31500":
k8s_actions.create_registry()
ccpcluster.build()
topology_path = \

View File

@ -50,7 +50,7 @@ class OSManager(object):
Deploy openstack with stacklight topology
"""
LOG.info("Preparing openstack log collector fixture...")
if settings.BUILD_IMAGES:
if settings.REGISTRY == "127.0.0.1:31500":
LOG.info("Creating registry...")
self.__k8s_actions.create_registry()
LOG.info("Building images...")

View File

@ -46,14 +46,10 @@ class TestDeployOpenstack(base_test.SystemBaseTest):
Duration 35 min
"""
if settings.BUILD_IMAGES:
if settings.REGISTRY == "127.0.0.1:31500":
k8s_actions.create_registry()
ccpcluster.build()
else:
if not settings.REGISTRY:
raise ValueError("The REGISTRY variable should be set with "
"external registry address, "
"current value {0}".format(settings.REGISTRY))
ccpcluster.deploy()
post_os_deploy_checks.check_jobs_status(k8s_actions.api)
post_os_deploy_checks.check_pods_status(k8s_actions.api)
@ -82,14 +78,10 @@ class TestDeployOpenstack(base_test.SystemBaseTest):
Duration 35 min
"""
remote = underlay.remote(host=config.k8s.kube_host)
if settings.BUILD_IMAGES:
if settings.REGISTRY == "127.0.0.1:31500":
k8s_actions.create_registry()
ccpcluster.build()
else:
if not settings.REGISTRY:
raise ValueError("The REGISTRY variable should be set with "
"external registry address, "
"current value {0}".format(settings.REGISTRY))
ccpcluster.deploy()
post_os_deploy_checks.check_jobs_status(k8s_actions.api, timeout=4500)
post_os_deploy_checks.check_pods_status(k8s_actions.api, timeout=4500)

View File

@ -45,7 +45,7 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
Duration 90 min
"""
if not settings.REGISTRY:
if settings.REGISTRY == "127.0.0.1:31500":
k8s_actions.create_registry()
ccpcluster.build()
topology_path = \
@ -113,7 +113,7 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
Duration 90 min
"""
if not settings.REGISTRY:
if settings.REGISTRY == "127.0.0.1:31500":
k8s_actions.create_registry()
ccpcluster.build()
topology_path = \
@ -182,7 +182,7 @@ class TestDeployTwoOS(base_test.SystemBaseTest):
Duration 60 min
"""
if not settings.REGISTRY:
if settings.REGISTRY == "127.0.0.1:31500":
k8s_actions.create_registry()
ccpcluster.build()
topology_path = \