Skip to content

Commit

Permalink
Update version and minimize report messages of pre-builder group
Browse files Browse the repository at this point in the history
This commit is to omit display message ASAP of Pre-builder group.
Let's replace report structure with debug message structure.

* Omitted report message ASAP of pre-builder group
* Updated version of TAOS-CI in the config file

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
  • Loading branch information
leemgs committed Sep 24, 2020
1 parent 380f155 commit ad36c8f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 18 deletions.
32 changes: 15 additions & 17 deletions ci/taos/checker-pr-prebuild-async.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,7 @@ if [[ $1 == "" || $2 == "" || $3 == "" || $4 == "" || $5 == "" || $6 == "" ]]; t
fi

# @dependency
# git, which, grep, touch, find, wc, cat, basename, tail, clang-format-4.0, cppcheck, rpmlint, aha, stat, curl
# check if dependent packages are installed
# Check if dependent packages are installed
source ./common/api_collection.sh
check_cmd_dep git
check_cmd_dep which
Expand All @@ -79,7 +78,7 @@ check_cmd_dep curl
check_cmd_dep ctags
echo -e "[DEBUG] Checked dependency packages.\n"

# get user ID from the input_repo string
# Get user ID from the input_repo string
set -- "${input_repo}"
IFS="\/"; declare -a Array=($*); unset IFS;
user_id="@${Array[3]}"
Expand Down Expand Up @@ -123,16 +122,16 @@ cd $dir_commit
cd ./${PRJ_REPO_OWNER}
echo -e "Current path: $(pwd)."

# archive a patch file of latest commit with 'format-patch' option
# Archive a patch file of latest commit with 'format-patch' option
# This *.patch file is used for nobody check.
run_git_format_patch="git format-patch -1 $input_commit --output-directory ../report/"
echo -e "[DEBUG] $run_git_format_patch"
$run_git_format_patch
ls ../report -al

# declare default variables
# check_result variable can get three values such as success, skip, and failure.
# global_check_result variable can get two values such as success and failure.
# Declare default variables
# The check_result variable can get three values such as success, skip, and failure.
# The global_check_result variable can get two values such as success and failure.
check_result="success"
global_check_result="success"

Expand Down Expand Up @@ -160,32 +159,31 @@ done
##################################################################################################################

exit_code=0
# --------------------- Report module: submit webhook API for global check result to github website --------------
# report if all modules are successfully completed or not.
# --------------------- Report module: submit webhook API for global check result to GitHub website --------------
# Report if all modules are successfully completed or not.
echo -e "[DEBUG] Varaible global_check_result is $global_check_result."
if [[ $global_check_result == "success" ]]; then
# in case of success
# In case of success
message="Successfully all modules of the prebuild group are done."
cibot_report $TOKEN "success" "(INFO)${BOT_NAME}/pr-prebuild-group" "$message" "${CISERVER}${PRJ_REPO_UPSTREAM}/ci/${dir_commit}/" "${GITHUB_WEBHOOK_API}/statuses/$input_commit"
echo -e "[DEBUG] cibot_report $TOKEN success (INFO)${BOT_NAME}/pr-prebuild-group $message ${CISERVER}${PRJ_REPO_UPSTREAM}/ci/${dir_commit}/ ${GITHUB_WEBHOOK_API}/statuses/$input_commit"

# inform PR submitter of success content to encourage review process
# Inform PR submitter of success content to encourage review process
echo -e "[DEBUG] (INFO)${BOT_NAME}/pr-prebuild-group: All modules of the prebuld group are passed - it is ready to review!"
echo -e "[DEBUG] :shipit: Note that CI bot has two sub-bots such as ${BOT_NAME}/pr-postbuild-group and ${BOT_NAME}/pr-prebuild-group."

elif [[ $global_check_result == "failure" ]]; then
# in case of failure
# In case of failure
message="Oooops. There is a failed module of the prebuild group. Update your code correctly after reading error messages."
cibot_report $TOKEN "failure" "(INFO)${BOT_NAME}/pr-prebuild-group" "$message" "${CISERVER}${PRJ_REPO_UPSTREAM}/ci/${dir_commit}/" "${GITHUB_WEBHOOK_API}/statuses/$input_commit"

# inform PR submitter of a hint to fix issues
message=":octocat: **cibot**: $user_id, One of the module of prebuild group is failed. If you want to get a hint to fix this issue, please go to ${REPOSITORY_WEB}/wiki/."
cibot_comment $TOKEN "$message" "$GITHUB_WEBHOOK_API/issues/$input_pr/comments"
# Inform PR submitter of a hint to fix issues
echo -e "[DEBUG] $user_id, One of the modules (prebuild group) is failed. If you need a hint to fix this issue, please go to ${REPOSITORY_WEB}/wiki/."
exit_code=1

else
# in case that CI is broken
message="Oooops. It seems that CI bot has bug(s). CI bot has to be fixed."
# In case that CI is broken
message="Oooops. It seems that CI bot has bug(s). CI bot has to be fixed. Please contact administrator."
cibot_report $TOKEN "failure" "(INFO)${BOT_NAME}/pr-prebuild-group" "$message" "${CISERVER}${PRJ_REPO_UPSTREAM}/ci/${dir_commit}/" "${GITHUB_WEBHOOK_API}/statuses/$input_commit"
exit_code=1

Expand Down
2 changes: 1 addition & 1 deletion ci/taos/config/config-environment.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ TIZEN_GBS_PROFILE=""
RUN_QUEUE_PR_JOBS=8

# Version format: Major.Minor.DATE
VERSION="1.5.20200324"
VERSION="1.5.20200925"

#### Location of the GitHub repository
# We assume that the default folder of the www-data (user-id of Apache webserver) is "/var/www/html/" folder.
Expand Down

0 comments on commit ad36c8f

Please sign in to comment.