fix(deploy): restart Fastify API on webhook promote + git safe.directory
BIT-1599 follow-up: recent-errors changes live in api/; restart bitreport-error-reporting-api.service alongside other units. Register ER_REPO_ROOT as a safe directory when root runs git against a tree owned by error-reporting (avoids dubious ownership failure on write-version-json / verify). Paperclip: BIT-1599 Made-with: Cursor
This commit is contained in:
1 parent
6e5d3ca2fc
commit
ab992382bc
1 file changed
+4
@@ -17,6 +17,9 @@ set +a
|
||||
_ROOT="${ER_REPO_ROOT:?ER_REPO_ROOT must be set in ${_ENV_FILE}}"
|
||||
cd "${_ROOT}"
|
||||
|
||||
# Avoid `fatal: detected dubious ownership` when root runs git on a tree owned by error-reporting.
|
||||
git config --global --add safe.directory "${_ROOT}" 2>/dev/null || true
|
||||
|
||||
# Match your deploy branch (repository uses master today).
|
||||
_DEPLOY_BRANCH="${ER_DEPLOY_BRANCH:-master}"
|
||||
git fetch origin "${_DEPLOY_BRANCH}"
|
||||
@@ -40,6 +43,7 @@ if [[ "${ER_WEBHOOK_RESTART_SERVICES:-1}" == "1" ]]; then
|
||||
systemctl restart bitreport-error-reporting-ingest-api.service
|
||||
systemctl restart bitreport-error-reporting-admin-ui.service
|
||||
systemctl restart bitreport-error-reporting-collector-worker.service
|
||||
systemctl restart bitreport-error-reporting-api.service
|
||||
fi
|
||||
|
||||
echo "webhook-deploy: done"
|
||||
Reference in new issue
Block a user