Commit 0077d219 authored by Robert Schmidt's avatar Robert Schmidt

CI DeployObject: don't grep, just give service name

With the capabilities now given as part of this MR, it happens that when
checking the "docker compose config", the container_name might not be
close to the service name. Something like

  service:
    cap_drop:
      ...
    cap_add:
      ...
    container_name:

This is inconvenient, as the previous grep for the service name + 3
lines might not cover the service name. To circumvent this, give the
service name directly in "docker compose config". (no clue why it has
not been done like this from the start)
parent a87df905
......@@ -897,9 +897,7 @@ class Containerize():
mySSH.command(f'docker compose --file ci-docker-compose.yml up -d -- {svcName}', '\$', 30)
# Checking Status
grep = ''
if svcName != '': grep = f' | grep -A3 --color=never {svcName}'
mySSH.command(f'docker compose --file ci-docker-compose.yml config {grep}', '\$', 5)
mySSH.command(f'docker compose --file ci-docker-compose.yml config {svcName}', '\$', 5)
result = re.search('container_name: (?P<container_name>[a-zA-Z0-9\-\_]+)', mySSH.getBefore())
unhealthyNb = 0
healthyNb = 0
......
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