feat: añadidos los retos y el script para ir mostrando quien va más
avanzado
This commit is contained in:
1
retos/3-deploy/srv/bot/VERSION
Normal file
1
retos/3-deploy/srv/bot/VERSION
Normal file
@@ -0,0 +1 @@
|
||||
1.0
|
||||
13
retos/3-deploy/srv/bot/healthcheck
Executable file
13
retos/3-deploy/srv/bot/healthcheck
Executable file
@@ -0,0 +1,13 @@
|
||||
#!/usr/bin/env bash
|
||||
# Se ejecuta en: el CT del equipo, desde la versión que se quiere comprobar.
|
||||
# Uso: ./healthcheck; echo $?
|
||||
# Comprueba que esta versión del bot funciona: termina con 0 si va bien y con
|
||||
# 1 si está rota.
|
||||
set -euo pipefail
|
||||
|
||||
version=$(cat "$(dirname "$0")/VERSION")
|
||||
if [[ $version == *broken* ]]; then
|
||||
echo "healthcheck: la versión $version no responde" >&2
|
||||
exit 1
|
||||
fi
|
||||
echo "healthcheck: la versión $version funciona"
|
||||
Reference in New Issue
Block a user