Anatoli Babenia
ca55415659
Check docker logs
with unbuffered Python again
2020-07-31 15:12:56 +03:00
Anatoli Babenia
f62fb51d3f
View container log without docker-compose
2020-07-31 14:54:52 +03:00
Anatoli Babenia
2e1d8041c9
Try docker-compose
logs with no color
2020-07-31 14:46:44 +03:00
Anatoli Babenia
10bfaab38c
Modern DevOps is a PITA
...
Run Python 3 in unbuffered mode to see lines in `docker logs` as
soon as they appear. When Python 3 is not attached to a terminal,
it turns on the buffering, like when `docker` runs in a background.
2020-07-31 13:31:31 +03:00
Anatoli Babenia
5dab632e21
Try --no-color to avoid log output being stripped by Travis
2020-07-31 10:09:19 +03:00
Anatoli Babenia
9a495a7615
Try to show container log in case of error on Travis
2020-07-31 09:57:20 +03:00
Anatoli Babenia
6be6a25c2a
docker-compose run
requires explicit port permission
2020-07-31 09:34:00 +03:00
Anatoli Babenia
be9d3a70fe
Run cheat.sh service (app) by docker-compose
in debug mode
...
This would allow later inspection of stdout.
Assigned names to image and container to avoid confusion.
Build is done separately to clean up the output.
2020-07-31 09:25:04 +03:00
Anatoli Babenia
10326234ff
Fix btrfs
test drift as trailing whitespaces were fixed
...
d7473ac185 (diff-8d0f560b012648accbca6af7a3356d61)
2020-07-31 04:57:12 +03:00
Anatoli Babenia
e0f84e8b3a
Pipe colored diffs
2020-07-30 23:17:01 +03:00
Anatoli Babenia
a0d344c38d
Use http://localhost:8002 for default tests CHTSH_URL
2020-07-30 23:03:44 +03:00
Anatoli Babenia
5737a1606a
Use unified diff format
2020-07-30 22:43:32 +03:00
Anatoli Babenia
1387f8b6f8
Show test command executed when $show_details == YES
2020-07-30 22:37:34 +03:00
Anatoli Babenia
4610690ec3
Travis doesn't support bright colors, use 8 colors palette
...
And remove temporary `curl cht.sh` call
2020-07-30 22:20:58 +03:00
Anatoli Babenia
c0bbc245df
Run curl
https://cht.sh to pinpoint Travis problems with ANSI
2020-07-30 17:51:12 +03:00
Anatoli Babenia
09dff20c9c
Add color to printed test names
2020-07-30 02:47:18 +03:00
Anatoli Babenia
60ae85e031
Show which test is being run
2020-07-30 02:24:54 +03:00
Anatoli Babenia
1a5aa6408f
Turn off standalone mode to run tests against remote server
2020-07-29 23:21:47 +03:00
Anatoli Babenia
1a1624e2e0
Detect Python version using Python
2020-07-29 22:59:09 +03:00
Anatoli Babenia
c515c56454
Use python3
command if virtualenv doesn't exist
2020-07-29 22:44:18 +03:00
Anatoli Babenia
3905047d62
Wait 3 seconds to let server to start
...
Because `docker-compose` is not capable of checking open ports
https://github.com/docker/compose/issues/374
2020-07-29 20:40:18 +03:00
Anatoli Babenia
06d8fa7fbd
cd
to tests/ dir when runner is executed with relpath
2020-07-29 20:12:02 +03:00
Anatoli Babenia
40d18da4f7
Test server is up with curl
before running tests
2020-07-29 20:06:31 +03:00
Anatoli Babenia
ce7b4c8ba3
Run tests on Travis CI
2020-07-29 19:56:36 +03:00
Igor Chubin
c17183cbec
Merge pull request #223 from abitrolly/fix-travis
...
Update Travis config
2020-07-29 15:44:08 +02:00
Anatoli Babenia
a12fc16cb5
.travis.yml Show info about built images after compose start
...
The image size on my system is 399 MB.
2020-07-29 16:24:34 +03:00
Anatoli Babenia
8904e514c9
.travis.yml Switch to Ubuntu 18.04 with simplified Docker setup
2020-07-29 16:13:51 +03:00
Igor Chubin
99ae5c47bb
Merge pull request #221 from abitrolly/fix-docker
...
Fix Dockerfile (#172 , #156 )
2020-07-29 14:37:46 +02:00
Anatoli Babenia
fbe5414e9c
Write log as binary file in Python 3
...
Fixes
File "bin/srv.py", line 101, in log_query
my_file.write(log_entry.encode('utf-8')+"\n")
TypeError: can't concat str to bytes
2020-07-29 14:55:08 +03:00
Anatoli Babenia
aae40ae3a8
Install missing gawk
needed by ansi2html.sh ( #222 )
...
RuntimeError: /app/share/ansi2html.sh: line 38: gawk: command not found
2020-07-29 14:15:36 +03:00
Anatoli Babenia
96cc3f64bd
Install bash
and fix Python3 subprocess bytes
...
File "/app/lib/globals.py", line 25, in error
if not text.startswith("Too many queries"):
TypeError: startswith first arg must be bytes or a tuple of bytes, not str
2020-07-29 12:02:02 +03:00
Anatoli Babenia
dd00fa4188
Print full cmd when bash
is not found
2020-07-29 10:49:21 +03:00
Anatoli Babenia
c9a959f087
Add --debug option to server to log tracebacks on failures
...
podman build . -t cheat.sh
podman run -it --rm -p 8002 cheat.sh bin/srv.py --debug
https://stackoverflow.com/questions/26026148/how-to-run-wsgiserver-in-verbose-or-debug-mode
2020-07-28 23:08:04 +03:00
Anatoli Babenia
b2114a43fa
Pin Alpine to 3.12 to avoid surprises
2020-07-28 20:25:30 +03:00
Anatoli Babenia
b89e7196f4
Show server port on startup
2020-07-28 18:32:32 +03:00
Anatoli Babenia
f024e4d561
Run server
2020-07-28 15:23:51 +03:00
Anatoli Babenia
c022613313
Use shallow copy for sheat clones -34MB
2020-07-28 11:47:59 +03:00
Anatoli Babenia
f727f2ceb4
Do not store pip
cache -42MB
2020-07-28 11:34:09 +03:00
Anatoli Babenia
c3d5473123
Use Python3 to fetch cheat sheets
2020-07-27 21:06:14 +03:00
Anatoli Babenia
20e371c575
Fetch cheat sheets without installing cht.sh.txt
2020-07-27 11:03:46 +03:00
Anatoli Babenia
981aa35c36
Fix Dockerfile ( #172 , #156 )
...
This still doesn't work as expected, because `cht.sh.txt` runs in
interactive mode and gives the prompt.
Where should cheat.sh be installed [/root/.cheat.sh]?
2020-07-27 10:07:00 +03:00
Igor Chubin
38edd23387
Merge pull request #220 from ErezBinyamin/master
...
Better bibliography, Fixed high traffic collision bug
2020-07-14 18:58:26 +02:00
Your Name
5a6a80c8cc
SuperSandro2000: added mktemp
2020-07-09 20:36:54 -04:00
Your Name
d5fec97242
new tmp dirs for each instance + self cleanup (avoid collision)
2020-07-07 20:25:10 -04:00
Your Name
b388437ef0
Bibliography sources should be names (ignore and consolidate different dates with same name) with links
2020-07-07 20:11:44 -04:00
Your Name
0e678a54dd
Merge branch 'master' of https://github.com/chubin/cheat.sh
2020-07-07 19:53:54 -04:00
Igor Chubin
a5b04952de
Merge pull request #217 from ErezBinyamin/patch-7
...
Single letter permission changes (chmod +x)
2020-07-06 21:40:55 +02:00
Erez
4667a98dfb
Single letter permission changes (chmod +x)
...
Previously chmod.sh only accepted strings of length 9 to convert to an equivalent permission number.
Now shorter strings are accepted for use cases such as:
- ```chmod +x```
- ```chmod +sx```
- etc ...
2020-07-03 09:00:59 -04:00
Your Name
20daf66cf3
added comments, fixed blank table on hiphen error
2020-07-03 08:55:26 -04:00
Your Name
2217cc0ca6
added permission number to sigle letter chmod
2020-07-03 08:49:08 -04:00