Skip to content
Snippets Groups Projects
Commit 1a8c1971 authored by Arie Peterson's avatar Arie Peterson
Browse files

Fix postStart error reporting when no error

parent 3b25987f
No related branches found
No related tags found
1 merge request!495Resolve "Consider allowing nextcloud to run when postStart fails"
Pipeline #37757 passed with stages
in 10 minutes and 52 seconds
...@@ -4,7 +4,7 @@ description: | ...@@ -4,7 +4,7 @@ description: |
A helm chart for installing NextCloud and setting up ONLYOFFICE integration A helm chart for installing NextCloud and setting up ONLYOFFICE integration
name: nextcloud-onlyoffice name: nextcloud-onlyoffice
appVersion: NC-25.0.3-OO-7.2.2.56 appVersion: NC-25.0.3-OO-7.2.2.56
version: 0.15.11-poststart-1 version: 0.15.11-poststart-2
icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg icon: https://cdn.rawgit.com/docker-library/docs/defa5ffc7123177acd60ddef6e16bddf694cc35f/nextcloud/logo.svg
dependencies: dependencies:
# https://artifacthub.io/packages/helm/nextcloud/nextcloud # https://artifacthub.io/packages/helm/nextcloud/nextcloud
......
...@@ -48,9 +48,16 @@ data: ...@@ -48,9 +48,16 @@ data:
exitCode=$2 exitCode=$2
lineNumber=$3 lineNumber=$3
echo "setup-apps.sh received $signal (code $exitCode) on line $lineNumber" echo "setup-apps.sh received $signal (code $exitCode) on line $lineNumber"
echo "Exiting with status 0 to allow nextcloud to start." if [ $signal == "EXIT" ] && [ $exitCode -eq 0 ]
# Report to prometheus that we have an error. then
report_metrics "1" # No problem, this is regular EXIT at the end of the script.
report_metrics "0"
echo "That's all good, exiting normally."
else
# Report to prometheus that we have an error.
report_metrics "1"
echo "Still exiting with status 0 to allow nextcloud to start."
fi
# Remove the handler for `EXIT` so we don't run that as well. If we're # Remove the handler for `EXIT` so we don't run that as well. If we're
# currently handling `EXIT` already then this is not necessary because # currently handling `EXIT` already then this is not necessary because
# bash treats an `exit` specially if it happens in the `EXIT` handler. # bash treats an `exit` specially if it happens in the `EXIT` handler.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment