Skip to content

Commit

Permalink
stop docker build if automated_install.pl failed
Browse files Browse the repository at this point in the history
  • Loading branch information
antonovchtd committed Sep 28, 2023
1 parent 899ac9a commit 8ce0f4f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ RUN PACKAGE_FILE=$(ls -1t $DEPLOYMENT_DIR/$APP_NAME_MASK 2>/dev/null | head -n 1
[ -z "$PACKAGE_FILE" ] && echo "Error. Docker image build failed: No valid application package detected." && exit 1 || \
echo "Using package file: $PACKAGE_FILE" && \
tar -xvf $PACKAGE_FILE -C $DEPLOYMENT_DIR/ && \
perl $APP_ROOT_DIR*/automated_install.pl && \
perl $APP_ROOT_DIR*/automated_install.pl || exit 1 && \
rm -rf $APP_ROOT_DIR* $DEPLOYMENT_DIR/$APP_NAME_MASK && \
[ -d "${APP_SERVER_DIR}/Logs" ] && \
tar czvf ${APP_SERVER_DIR}/Logs/img_build_logs.tar.gz -C ${APP_SERVER_DIR} Logs --remove-files 2> /dev/null || \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.centos
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ RUN PACKAGE_FILE=$(ls -1t $DEPLOYMENT_DIR/$APP_NAME_MASK 2>/dev/null | head -n 1
[ -z "$PACKAGE_FILE" ] && echo "Error. Docker image build failed: No valid application package detected." && exit 1 || \
echo "Using package file: $PACKAGE_FILE" && \
tar -xvf $PACKAGE_FILE -C $DEPLOYMENT_DIR/ && \
perl $APP_ROOT_DIR*/automated_install.pl && \
perl $APP_ROOT_DIR*/automated_install.pl || exit 1 && \
rm -rf $APP_ROOT_DIR* $DEPLOYMENT_DIR/$APP_NAME_MASK && \
[ -d "${APP_SERVER_DIR}/Logs" ] && \
tar czvf ${APP_SERVER_DIR}/Logs/img_build_logs.tar.gz -C ${APP_SERVER_DIR} Logs --remove-files 2> /dev/null || \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.redhat
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ RUN PACKAGE_FILE=$(ls -1t $DEPLOYMENT_DIR/$APP_NAME_MASK 2>/dev/null | head -n 1
[ -z "$PACKAGE_FILE" ] && echo "Error. Docker image build failed: No valid application package detected." && exit 1 || \
echo "Using package file: $PACKAGE_FILE" && \
tar -xvf $PACKAGE_FILE -C $DEPLOYMENT_DIR/ && \
perl $APP_ROOT_DIR*/automated_install.pl && \
perl $APP_ROOT_DIR*/automated_install.pl || exit 1 && \
rm -rf $APP_ROOT_DIR* $DEPLOYMENT_DIR/$APP_NAME_MASK && \
[ -d "${APP_SERVER_DIR}/Logs" ] && \
tar czvf ${APP_SERVER_DIR}/Logs/img_build_logs.tar.gz -C ${APP_SERVER_DIR} Logs --remove-files 2> /dev/null || \
Expand Down

0 comments on commit 8ce0f4f

Please sign in to comment.