From ad36c8f14d7e623b3af8a06f760e6271f021386f Mon Sep 17 00:00:00 2001 From: Geunsik Lim Date: Fri, 25 Sep 2020 08:17:27 +0900 Subject: [PATCH] Update version and minimize report messages of pre-builder group 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 --- ci/taos/checker-pr-prebuild-async.sh | 32 +++++++++++++--------------- ci/taos/config/config-environment.sh | 2 +- 2 files changed, 16 insertions(+), 18 deletions(-) diff --git a/ci/taos/checker-pr-prebuild-async.sh b/ci/taos/checker-pr-prebuild-async.sh index 86348be3..59ba70c4 100755 --- a/ci/taos/checker-pr-prebuild-async.sh +++ b/ci/taos/checker-pr-prebuild-async.sh @@ -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 @@ -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]}" @@ -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" @@ -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 diff --git a/ci/taos/config/config-environment.sh b/ci/taos/config/config-environment.sh index ec57eea6..833f36c0 100644 --- a/ci/taos/config/config-environment.sh +++ b/ci/taos/config/config-environment.sh @@ -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.