diff --git a/CHANGELOG.md b/CHANGELOG.md index 60daed19..53d0579a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Changelog +## 20251103 +## What's Changed +* update Captainhook Hooks while running update_hook script + +## 20250924 +## What's Changed +* execute git command inside container + +## 20250918 +## What's Changed +* add option to kill create process by SIGINT or SIGTERM +* install ilserever depending on ilias version + +## 20250908 +## What's Changed +* fix that the wrong script is copied to doil_mail +* jq select without hostname +* create ilias-config.json with correct JSON flags and change the instance name +* add merge strategy to gitconfig +* also copy .idea directory +* ensure all files in ilias-root owned by www-data +* ensure openssl works with legacy algorithms + +## 20250903 +## What's Changed +* use right path for source file + +## 20250901 +## What's Changed +* also use port 443 for ssh-keyscan as an alternative + ## 20250806 ## What's Changed * ssh:509 mv ssh owner to config file, avoid .ssh mounts diff --git a/app/src/App.php b/app/src/App.php index 9cf93b74..5d8f5472 100644 --- a/app/src/App.php +++ b/app/src/App.php @@ -9,7 +9,7 @@ class App extends Application { - const NAME = "Doil Version 20250924 - build 2025-09-24"; + const NAME = "Doil Version 20251103 - build 2025-11-03"; public function __construct(Command ...$commands) { diff --git a/setup/stack/states/ilias-update-hook/ilias-update-hook/update_hook.php.j2 b/setup/stack/states/ilias-update-hook/ilias-update-hook/update_hook.php.j2 index ac2dae1c..378c5d17 100644 --- a/setup/stack/states/ilias-update-hook/ilias-update-hook/update_hook.php.j2 +++ b/setup/stack/states/ilias-update-hook/ilias-update-hook/update_hook.php.j2 @@ -61,6 +61,15 @@ if ($branch === $base_ref) { exit(); } + // Install captainhook + log_write("Install captainhook hooks\n"); + system("./libs/composer/vendor/captainhook/captainhook/bin/captainhook install -f -q", $result_code); + if ($result_code !== 0) { + log_write("Error running 'captainhook install'"); + http_response_code(500); + throw new Exception("Failed to run update hook"); + } + // Run language script log_write("Run language script\n"); system("./CI/tools/build-dev-custom-lang.sh >> /var/log/doil/instance-update.log 2>&1", $result_code); diff --git a/setup/updates/update-20251103.sh b/setup/updates/update-20251103.sh new file mode 100644 index 00000000..5a8050ae --- /dev/null +++ b/setup/updates/update-20251103.sh @@ -0,0 +1,30 @@ +#!/usr/bin/env bash + +doil_update_20251103() { + cp -r ${SCRIPT_DIR}/../app/src/* /usr/local/lib/doil/app/src/ + cp -r ${SCRIPT_DIR}/../setup/stack/states/ilias-update-hook/* /usr/local/share/doil/stack/states/ilias-update-hook/ + + if [ $(docker ps -a --filter "name=_local" --filter "name=_global" --format "{{.Names}}" | wc -l) -gt 0 ] + then + for INSTANCE in $(docker ps -a --filter "name=_local" --filter "name=_global" --format "{{.Names}}") + do + NAME=${INSTANCE%_*} + SUFFIX=${INSTANCE##*_} + GLOBAL="" + if [ "${SUFFIX}" == "global" ] + then + GLOBAL="-g" + fi + + doil up ${NAME} ${GLOBAL} &> /dev/null + sleep 5 + + doil_status_send_message "Apply state ilias to ${NAME}" + docker exec -it doil_saltmain /bin/bash -c "salt '${NAME}.${SUFFIX}' state.highstate saltenv=ilias-update-hook" &> /dev/null + doil_status_okay + + docker stop ${INSTANCE} &> /dev/null + done + fi + return $? +} \ No newline at end of file