Commit 8843dcb6 authored by Alexander's avatar Alexander

push Docker image only if build was successful

parent f7a072d8
......@@ -35,16 +35,18 @@ for command_arg in command_args:
os.remove(os.path.join(ROOT, DOCKER_COMPOSE_NAME))
res_str.append(f"{image_name} built with exit code {exit_val}")
if exit_val != 0:
error = exit_val
# push created Docker image
exit_val = os.system(f"docker push {image_name}")
res_str.append(f"{image_name} pushed with exit code {exit_val}")
if exit_val != 0:
error = exit_val
else:
# push created Docker image
exit_val = os.system(f"docker push {image_name}")
res_str.append(f"{image_name} pushed with exit code {exit_val}")
if exit_val != 0:
error = exit_val
print(f"Found {len(command_args)} images")
for s in res_str:
......
import unittest
import sys
sys.path.insert(1, './')
sys.path.insert(1, '../')
# python -m unittest discover -v tests
# python -m unittest discover
from db.entities.cluster import Cluster
from db.entities import TimeCluster, LocationCluster
......
......@@ -2,7 +2,7 @@ import unittest
import sys
sys.path.insert(1, '../')
# python -m unittest discover -v tests
# python -m unittest discover
from processing.clusterer import Clusterer
class TestClusterer(unittest.TestCase):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment