log before container command
continuous-integration/drone/push Build is failing
Details
continuous-integration/drone/push Build is failing
Details
This commit is contained in:
parent
fe5d846c5f
commit
a3f27fa6ba
|
@ -131,9 +131,9 @@ def run_commands(commands):
|
||||||
command = command.removeprefix('bash -c \'').removeprefix('sh -c \'')
|
command = command.removeprefix('bash -c \'').removeprefix('sh -c \'')
|
||||||
command = command.removesuffix('\'')
|
command = command.removesuffix('\'')
|
||||||
command = f"bash -c 'set -o pipefail;{command}'"
|
command = f"bash -c 'set -o pipefail;{command}'"
|
||||||
result = container.exec_run(command)
|
logging.info(f"run command in {container.name}:")
|
||||||
logging.info(f"run command in {container.name}")
|
|
||||||
logging.info(command)
|
logging.info(command)
|
||||||
|
result = container.exec_run(command)
|
||||||
if result.exit_code:
|
if result.exit_code:
|
||||||
logging.error(
|
logging.error(
|
||||||
f"Failed to run command {command} in {container.name}: {result.output.decode()}")
|
f"Failed to run command {command} in {container.name}: {result.output.decode()}")
|
||||||
|
|
Loading…
Reference in New Issue