Commit 3b3a13ad authored by Tulio Ruiz's avatar Tulio Ruiz Committed by José Ángel Fentánez
Browse files

[IMP] test if the base packages can be installed before the tagging

[IMP]  test if the base packages can be installed before the tagging

[ADD] Dependency for wheel
parent c50adcab
Pipeline #49387 passed with stage
in 33 seconds
......@@ -14,12 +14,22 @@ import click
import logging
import json
import requests
import signal
from urllib3.exceptions import ReadTimeoutError
logger = logging.getLogger('deployv.' + __name__) # pylint: disable=C0103
_cli = Client(timeout=7200)
def reciveSignal(signalNumber, frame):
signal.signal(signal.SIGTERM, reciveSignal)
signal.signal(signal.SIGINT, reciveSignal)
def generate_image_name(name):
""" Generate the base image name usig the ref name but cleaning it before,
......@@ -67,8 +77,11 @@ def clean_containers():
""" Cleans any running container related to the same build to avoid any conflicts """
containers = _cli.containers(all=True, filters={'name': environ['_BASE_NAME']})
for container in containers:'Removing container %s', container.get('Name', container.get('Names')[0]))
_cli.remove_container(container['Id'], force=True)
try:'Removing container %s', container.get('Name', container.get('Names')[0]))
_cli.remove_container(container['Id'], force=True)
except errors.NotFound:'Container %s does not exist', container.get('Name', container.get('Names')[0]))
def clear_images():
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