Reduce noise from app-json.py
continuous-integration/drone/pr Build is failing Details

This commit is contained in:
3wc 2021-04-05 12:31:45 +02:00
parent 028c7dbde5
commit a26a0d27d7
1 changed files with 6 additions and 4 deletions

View File

@ -13,7 +13,7 @@ from os.path import basename, exists, expanduser
from pathlib import Path
from re import findall, search
from shlex import split
from subprocess import check_output
from subprocess import check_output, DEVNULL
from sys import exit
from requests import get
@ -31,6 +31,8 @@ REPOS_TO_SKIP = (
"organising",
"pyabra",
"stack-ssh-deploy",
"radicle-seed-node",
"coturn"
)
log = getLogger(__name__)
@ -38,10 +40,9 @@ basicConfig()
log.setLevel(DEBUG)
def _run_cmd(cmd, shell=False):
def _run_cmd(cmd, shell=False, **kwargs):
"""Run a shell command."""
args = [split(cmd)]
kwargs = {}
if shell:
args = [cmd]
@ -187,7 +188,8 @@ def get_app_versions(app_path, cached_apps_json):
existing_tags = []
for tag in tags:
_run_cmd(f"git checkout {tag}")
_run_cmd(f"git checkout {tag}",
stderr=DEVNULL)
services_cmd = f"{YQ_PATH} e '.services | keys | .[]' compose*.yml"
services = _run_cmd(services_cmd, shell=True).split()