Compare commits

..

2 commits

Author SHA1 Message Date
Benjamin Renard
45b7c3f3fa
Fix debian package dependency
All checks were successful
Run tests / tests (push) Successful in 1m29s
2024-07-16 09:43:09 +02:00
Benjamin Renard
73ebd4cddb
Improve deploy cron to log duration (and log file in case of error)
All checks were successful
Run tests / tests (push) Successful in 1m50s
2024-07-16 09:39:10 +02:00
2 changed files with 6 additions and 4 deletions

View file

@ -319,12 +319,14 @@ if [[ $DEPLOY_CRON -eq 1 ]]; then
for container in "${to_deploy[@]}"; do
message " $container: deploying..."
log="$REBUILD_DATA_DIR/$container.log"
if $COMPOSE_BIN -f "$DOCKERCOMPOSE_FILE" up -d --no-deps "$container" > "$log" 2>&1; then
message " $container: done"
start_time=$(current_time)
if $COMPOSE_BIN -f "$DOCKERCOMPOSE_FILE" up -d --no-deps "$container" >> "$log" 2>&1; then
message " $container: done (in $(format_duration "$(( $(current_time)-start_time ))"))"
update_rebuild_status -d "$container"
rm -f "$log"
else
error " $container: fail to deploy new container image"
error " $container: fail to deploy new container image (in" \
"$(format_duration "$(( $(current_time)-start_time ))"), see log: $log)"
update_rebuild_status "$container" "error=fail to deploy new container image"
error=1
fi

2
debian/control vendored
View file

@ -7,6 +7,6 @@ Standards-Version: 3.9.6
Package: check-container-upgrade
Architecture: all
Depends: ${misc:Depends}, python3, python3-requests
Depends: ${misc:Depends}, jq, jo
Description: Monitoring plugin to check Postgres Streaming replication state
This Icinga/Nagios check plugin permit to check Postgres Streaming replication state.