This is an automated email from the ASF dual-hosted git repository.
fgreg pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sdap-ningester.git
The following commit(s) were added to refs/heads/master by this push:
new 43667c6 Simple issue of not using the exit code returned from the
spring app. (#12)
43667c6 is described below
commit 43667c6f9700e704d15de7c546621b0ce121ff68
Author: fgreg <[email protected]>
AuthorDate: Tue Sep 11 15:31:51 2018 -0700
Simple issue of not using the exit code returned from the spring app. (#12)
---
docker/entrypoint.sh | 5 ++++-
src/main/java/org/apache/sdap/ningester/NingesterApplication.java | 2 +-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/docker/entrypoint.sh b/docker/entrypoint.sh
index 32f2a8f..973d585 100755
--- a/docker/entrypoint.sh
+++ b/docker/entrypoint.sh
@@ -16,7 +16,7 @@
# Exit immediately if a simple command returns non-zero exit code
# Cause the status of terminated background jobs to be reported immediately.
-set -eb
+set -ebx
# With pipefail, the return status of a pipeline is "the value of the last
(rightmost) command to exit with a non-zero status, or zero if all commands
exit successfully"
set -o pipefail
@@ -61,4 +61,7 @@ fi
echo "Launching ningester. Logs from this process will be prefixed with
[ningester]"
java -Dspring.profiles.active=$1
-Dspring.config.location=classpath:/application.yml,${CONFIG_FILES} -jar
${NINGESTER_JAR} granule=file://${GRANULE} ${@:2}
--ningester.pythonChainProcessor.base_url="http://${NINGESTER_PY_SERVER_NAME}/"
2>&1 | sed -e 's/^/[ningester] /'
+JAVA_EXIT_CODE=$?
+echo "Exiting with code ${JAVA_EXIT_CODE}"
+exit ${JAVA_EXIT_CODE}
diff --git a/src/main/java/org/apache/sdap/ningester/NingesterApplication.java
b/src/main/java/org/apache/sdap/ningester/NingesterApplication.java
index 88071b1..2ae6b2b 100644
--- a/src/main/java/org/apache/sdap/ningester/NingesterApplication.java
+++ b/src/main/java/org/apache/sdap/ningester/NingesterApplication.java
@@ -26,6 +26,6 @@ public class NingesterApplication {
public static void main(String[] args) {
ApplicationContext context =
SpringApplication.run(NingesterApplication.class, args);
- SpringApplication.exit(context);
+ System.exit(SpringApplication.exit(context));
}
}