Update sh workflow

This commit is contained in:
Alban Bronisz 2021-12-02 21:01:26 +01:00
parent ca47562f27
commit 7b915ee41d
4 changed files with 16 additions and 3 deletions

View File

@ -51,7 +51,7 @@ Display stats
This step permits to generate an html interactive render from the sqlite stats file.
It is simple, just run:
```bash
venv/bin/python generate_html.py
./generate_html.sh
```
The report is now accessible in `stats.html`.

View File

@ -1 +0,0 @@
/home/caracals/outils/docker-stats-histo/venv/bin/python /home/caracals/outils/docker-stats-histo/generate_html.py /home/caracals/outils/docker-stats-histo/stats.sqlite /home/caracals/services/org-caracals-files/files/stats.html

14
generate_html.sh Executable file
View File

@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -eu
# Move in repo folder
SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
pushd "${SCRIPT_PATH}" > /dev/null
venv/bin/python generate_html.py stats.sqlite /home/caracals/services/org-caracals-files/files/stats.html
# Back to original path
popd > /dev/null

View File

@ -4,7 +4,7 @@ set -eu
# Move in repo folder
SCRIPT_PATH="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
pushd ${SCRIPT_PATH} > /dev/null
pushd "${SCRIPT_PATH}" > /dev/null
venv/bin/python save_docker_stats.py