Closed samuelbernardolip closed 3 years ago
@samuelbernardolip we are running one docker-compose exec
per command in the list:
https://github.com/indigo-dc/jenkins-pipeline-library/blob/126d0c2792c8f7338429862de09bc986b0ca4ae4/src/eu/indigo/compose/DockerCompose.groovy#L165-L169
We might support the concatenation of the list of commands (e.g. with '&&' or ';') and run just one docker-compose exec
, if this preserves the context. Hence, library users don't have to create ad-hoc scripts.
This functionality might be handy since most app building process entail multiple commands within the same shell context.
@samuelbernardolip we are running one
docker-compose exec
per command in the list:We might support the concatenation of the list of commands (e.g. with '&&' or ';') and run just one
docker-compose exec
, if this preserves the context. Hence, library users don't have to create ad-hoc scripts.This functionality might be handy since most app building process entail multiple commands within the same shell context.
That is the issue I found with sqaaas-web tests... Command parameter for docker-compose exec can't be a string, but a sequence of strings splited by spaces, where the first is the command we want to run. I think that will not worth the effort to debug or find a solution for this. As I propose in this issue is better to the users place all required commands inside a script and pass after that the required arguments. This is a cleaner approach. This also keeps the pattern of using the supported tools such as tox or maven. Lets keep it simple and keep out unnecessary bugs.
Also add to the note that all required white spaces for files or arguments must be escaped, so is possible to distinguish the docker-compose exec
Must place a warning in config.yml documentation that commands run as independent processes. If a user needs to run a set of commands in same context he should create a script and pass it to command.