Waits for a pattern to match output of a command or docker container logs.
Project description
Wait For Output
Waits for a pattern to match output of a command or docker container logs.
Features:
- Waiting for a pattern to appear in docker container logs
- Waiting for a generic command output to appear
- Finding container name by regexp pattern
- Returns result as a exit code and message
- Output of checked command/container log is passed through to the console
Installing
pip install waitforoutput
Usage with docker
$ waitforoutput 'Configuration complete; ready for start up' --container 'nginx_*' --timeout 5
/docker-entrypoint.sh: /docker-entrypoint.d/ is not empty, will attempt to perform configuration
/docker-entrypoint.sh: Looking for shell scripts in /docker-entrypoint.d/
/docker-entrypoint.sh: Launching /docker-entrypoint.d/10-listen-on-ipv6-by-default.sh
10-listen-on-ipv6-by-default.sh: info: Getting the checksum of /etc/nginx/conf.d/default.conf
10-listen-on-ipv6-by-default.sh: info: Enabled listen on IPv6 in /etc/nginx/conf.d/default.conf
/docker-entrypoint.sh: Launching /docker-entrypoint.d/20-envsubst-on-templates.sh
/docker-entrypoint.sh: Launching /docker-entrypoint.d/30-tune-worker-processes.sh
/docker-entrypoint.sh: Configuration complete; ready for start up
Match found
Usage with any shell command
$ waitforoutput 'Linux' --command 'uname -a'
Linux riotkit-dev 5.10.23-1-MANJARO #1 SMP PREEMPT Thu Mar 11 18:47:18 UTC 2021 x86_64 GNU/Linux
Match found
Authors
Created by Riotkit anarchist tech-collective.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for waitforoutput-0.0.1.dev11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | abb06122dec2c304d81f8bffeb2a63ffe8c974fe7efe2d81cb197bbfbc9e4470 |
|
MD5 | 3e2ca48c1ecca9e568cf3adc99f92a79 |
|
BLAKE2b-256 | 5923c02edec7747393d0aab3f226d0ff9e7fb83844c6d804834e88a4c5e43e9a |
Close
Hashes for waitforoutput-0.0.1.dev11-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 156488098c37cf8bf11e8f6e2dfc3ccc950bcfdcb7e7461144cb1af3c3e44b04 |
|
MD5 | 3ef0fac9aaf62591d1358839e2c21bef |
|
BLAKE2b-256 | b7874fd6cc4ca54a7721d65ef11e06f81dfada10191267fb9457cd8da4f3e758 |