Skip to content

Commit

Permalink
update monitoring
Browse files Browse the repository at this point in the history
  • Loading branch information
dennyzhang committed Jul 8, 2017
1 parent 3774276 commit ef7934f
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 20 deletions.
13 changes: 8 additions & 5 deletions jenkins_scripts/monitor/monitor_git_branch_list.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Description :
## --
## Created : <2015-08-05>
## Updated: Time-stamp: <2017-06-28 18:50:11>
## Updated: Time-stamp: <2017-07-08 14:58:51>
##-------------------------------------------------------------------
################################################################################################
## env variables:
Expand All @@ -19,6 +19,7 @@
## env_parameters:
## export MARK_PREVIOUS_FIXED=false
## export CLEAN_START=false
## export SKIP_UPDATE_FLAGFILE=false
################################################################################################
. /etc/profile
[ -n "$DOWNLOAD_TAG_NAME" ] || export DOWNLOAD_TAG_NAME="tag_v6"
Expand Down Expand Up @@ -58,10 +59,12 @@ previous_activesprint_file="$HOME/previous_activesprint_$JOB_NAME.flag"

function shell_exit() {
errcode=$?
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
if [ -z "$SKIP_UPDATE_FLAGFILE" ] || [ "$SKIP_UPDATE_FLAGFILE" = "false" ]; then
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
fi
fi
exit $errcode
}
Expand Down
13 changes: 8 additions & 5 deletions jenkins_scripts/monitor/monitor_git_contentchanges.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Description :
## --
## Created : <2016-12-31>
## Updated: Time-stamp: <2017-06-28 18:50:11>
## Updated: Time-stamp: <2017-07-08 14:58:46>
##-------------------------------------------------------------------
################################################################################################
## env variables:
Expand All @@ -26,6 +26,7 @@
## env_parameters:
## export MARK_PREVIOUS_FIXED=false
## export CLEAN_START=false
## export SKIP_UPDATE_FLAGFILE=false
## export working_dir=$HOME/code/monitorgitcontent
################################################################################################
. /etc/profile
Expand Down Expand Up @@ -72,10 +73,12 @@ flag_file="$HOME/$JOB_NAME.flag"

function shell_exit() {
errcode=$?
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
if [ -z "$SKIP_UPDATE_FLAGFILE" ] || [ "$SKIP_UPDATE_FLAGFILE" = "false" ]; then
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
fi
fi
exit $errcode
}
Expand Down
13 changes: 8 additions & 5 deletions jenkins_scripts/monitor/monitor_git_filechanges.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Description :
## --
## Created : <2015-08-05>
## Updated: Time-stamp: <2017-06-28 18:50:10>
## Updated: Time-stamp: <2017-07-08 14:57:24>
##-------------------------------------------------------------------
################################################################################################
## env variables:
Expand All @@ -24,6 +24,7 @@
## env_parameters:
## export MARK_PREVIOUS_FIXED=false
## export CLEAN_START=false
## export SKIP_UPDATE_FLAGFILE=false
## export working_dir=$HOME/code/monitorfile
################################################################################################
. /etc/profile
Expand Down Expand Up @@ -70,10 +71,12 @@ flag_file="$HOME/$JOB_NAME.flag"

function shell_exit() {
errcode=$?
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
if [ -z "$SKIP_UPDATE_FLAGFILE" ] || [ "$SKIP_UPDATE_FLAGFILE" = "false" ]; then
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
fi
fi
exit $errcode
}
Expand Down
12 changes: 7 additions & 5 deletions jenkins_scripts/monitor/serverspec_check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
## Description :
## --
## Created : <2015-07-29>
## Updated: Time-stamp: <2017-06-28 18:50:10>
## Updated: Time-stamp: <2017-07-08 14:57:56>
##-------------------------------------------------------------------

################################################################################################
Expand Down Expand Up @@ -95,10 +95,12 @@ flag_file="$HOME/$JOB_NAME.flag"

function shell_exit() {
errcode=$?
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
if [ -z "$SKIP_UPDATE_FLAGFILE" ] || [ "$SKIP_UPDATE_FLAGFILE" = "false" ]; then
if [ $errcode -eq 0 ]; then
echo "OK" > "$flag_file"
else
echo "ERROR" > "$flag_file"
fi
fi
exit $errcode
}
Expand Down

0 comments on commit ef7934f

Please sign in to comment.