[config] Updated the existing configuration files for TAOS-CI
authorGeunsik Lim <geunsik.lim@samsung.com>
Tue, 4 Sep 2018 06:56:50 +0000 (15:56 +0900)
committerMyungJoo Ham <myungjoo.ham@gmail.com>
Tue, 4 Sep 2018 10:52:58 +0000 (19:52 +0900)
This commit is to update the existing configuration files for TAOS-CI because
the files are out-of-date.

**Changes proposed in this PR:**
1. Added webhook configuration file
2. Updated out-of-date configuration files
3. Updated default variables in the configuration files
4. Removed license contents in configuration files to avoid license issue

Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
Documentation/ci-config/config-environment.sh
Documentation/ci-config/config-plugins-audit.sh
Documentation/ci-config/config-plugins-format.sh
Documentation/ci-config/config-webhook.json [new file with mode: 0644]

index b584531..44d992d 100644 (file)
@@ -3,7 +3,7 @@
 ##
 # @file config-environment.sh
 # @brief Environment file to control all scripts commonly for CI bot
-# @see      https://github.sec.samsung.net/STAR/TAOS-CI
+# @see      https://github.com/nnsuite/TAOS-CI
 # @author   Geunsik Lim <geunsik.lim@samsung.com>
 #
 # This script to maintain consistently all scripts files via this file. 
 # c. In case that you need to create new project
 #
 
-################# Modify the below statements for your server  #######################
+################# Default: Modify the below statements for your server  #######################
 
 
 #### Repository setting
-# Project name of github.sec.samsung.net
+# Connecting to a repository using token id instead of your-gitbot-id@github.io id
+# because of two-authentification. Refer to https://github.com/settings/tokens
+TOKEN="2e44d5b23fda558807ed7a0cdd02bf**********"
+
+# Name of account (or orgranzation)
+GITHUB_ACCOUNT="nnsuite"
+
+# Project name of github website
 PRJ_REPO_UPSTREAM="nnstreamer"
 
 # CI Server webaddress. Should end with /
-CISERVER="http://aaci.mooo.com/"
+CISERVER="http://www.<your-dns>.net/"
 
 # Format area (pr-format)
 # Add root path of source folders
@@ -78,33 +85,35 @@ pr_doxygen_check_level=1
 filesize_limit=5
 
 
-################# Do not modify the below statements #################################
+#### Build mode of software platform
 
-# Version format: Major.Minor
-VERSION="1.20180709"
+# BUILD_MODE_***=0  : execute a build process without a debug file.
+# BUILD_MODE_***=1  : execute a build process with a debug file.
+# BUILD_MODE_***=99 : skip a build process (by default)
+#
+# Note: if a packaging management is not normally executed for package build, you must declare `BUILD_MODE_***=99` unavoidably
+# 1) Tizen (packaging/*.spec): If a maintainer done the gbs based build process, you may change builde mode from 99 to 0.
+# 2) Ubuntu (debian/*.rule)  : If a maintainer done the pdebuild based build process, you may change builde mode from 99 to 0.
+# 3) Yocto (CMakeLists.txt)  : If a maintainer done the devtool based build process, you may change builde mode from 99 to 0.
+BUILD_MODE_TIZEN=0
+BUILD_MODE_UBUNTU=99
+BUILD_MODE_YOCTO=99
 
-# Connecting to a repository using token id instead of git.bot.sec@samsung.com id
-# because of two-authentification. Refer to https://github.sec.samsung.net/settings/tokens
-TOKEN="01eec554abcaae8755c06c2b06f5d6bb84d4b4a5"
+# Version format: Major.Minor
+VERSION="1.20180820"
 
-# Email-address
-# Note that we have to log-in at least 3 times per a month to avoid deletion of the ID
-# according to announcement of "전자녹스포탈" (knoxportal.sec@samsung.com).
-EMAIL="git.bot.sec@samsung.com"
+#### Location
 
 # Reference repository to speed up "git clone" command
-REFERENCE_REPOSITORY="/var/www/html/$PRJ_REPO_UPSTREAM/"
+REFERENCE_REPOSITORY="/home/taos/public_html/$PRJ_REPO_UPSTREAM/"
 
 # RPM repo cache for GBS build
-REPOCACHE="/var/www/html/$PRJ_REPO_UPSTREAM/repo_cache/"
+REPOCACHE="/home/taos/public_html/$PRJ_REPO_UPSTREAM/repo_cache/"
 
 # Github repostiroy webaddress
-REPOSITORY_WEB="https://github.sec.samsung.net/STAR/$PRJ_REPO_UPSTREAM"
-REPOSITORY_GIT="https://github.sec.samsung.net/STAR/$PRJ_REPO_UPSTREAM.git"
+REPOSITORY_WEB="https://github.com/$GITHUB_ACCOUNT/$PRJ_REPO_UPSTREAM"
+REPOSITORY_GIT="https://github.com/$GITHUB_ACCOUNT/$PRJ_REPO_UPSTREAM.git"
 
 # Github webhook API
-GITHUB_WEBHOOK_API="https://github.sec.samsung.net/api/v3/repos/STAR/$PRJ_REPO_UPSTREAM"
-
-
-
+GITHUB_WEBHOOK_API="https://api.github.com/repos/$GITHUB_ACCOUNT/$PRJ_REPO_UPSTREAM"
 
index 733a6ff..b3cc956 100644 (file)
@@ -3,34 +3,46 @@
 ##
 # @file config-plugins-audit.sh
 # @brief add plugin modules for a github repository
-# @see      https://github.sec.samsung.net/STAR/TAOS-CI
+# @see      https://github.com/nnsuite/TAOS-CI
 # @author   Geunsik Lim <geunsik.lim@samsung.com>
 
+##### Set environment for audit plugins
+declare -i idx=-1
 
 ###### plugins-base ###############################################################################################
-echo "[MODULE] plugins-base: Basis plugins with good quality"
+echo "[MODULE] plugins-base: Plugin group that is maintained with good quality"
 # Please append your plugin modules here.
 
-module_name="pr-audit-build-tizen"
-echo "[DEBUG] $module_name is started."
-echo "[DEBUG] TAOS/$module_name: Check if Tizen rpm package is successfully generated."
+audit_plugins[++idx]="pr-audit-build-tizen"
+echo "[DEBUG] The default BUILD_MODE of ${audit_plugins[idx]} is declared with 99 (SKIP MODE) by default in plugins-base folder."
+echo "[DEBUG] ${audit_plugins[idx]} is started."
+echo "[DEBUG] TAOS/${audit_plugins[idx]}: Check if Tizen rpm package is successfully generated."
 echo "[DEBUG] Current path: $(pwd)."
-source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-base/$module_name.sh
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-base/${audit_plugins[idx]}.sh
 # Note that do not append the below "$module_name" because build step is implemented as a built-in module partially
-# $module_name
-echo "[DEBUG] $module_name is done."
 
-module_name="pr-audit-build-ubuntu"
-echo "[DEBUG] $module_name is started."
-echo "[DEBUG] TAOS/$module_name: Check if Ubuntu deb package is successfully generated."
+
+audit_plugins[++idx]="pr-audit-build-ubuntu"
+echo "[DEBUG] The default BUILD_MODE of ${audit_plugins[idx]} is declared with 99 (SKIP MODE) by default in plugins-base folder."
+echo "[DEBUG] ${audit_plugins[idx]} is started."
+echo "[DEBUG] TAOS/${audit_plugins[idx]}: Check if Ubuntu deb package is successfully generated."
 echo "[DEBUG] Current path: $(pwd)."
-source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-base/$module_name.sh
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-base/${audit_plugins[idx]}.sh
 # Note that do not append the below "$module_name" because build step is implemented as a built-in module partially
-# $module_name
-echo "[DEBUG] $module_name is done."
+
+
+#audit_plugins[++idx]="pr-audit-build-yocto"
+#echo "[DEBUG] The default BUILD_MODE of ${audit_plugins[idx]} is declared with 99 by default in plugins-base folder."
+#echo "[DEBUG] ${audit_plugins[idx]} is started."
+#echo "[DEBUG] TAOS/${audit_plugins[idx]}: Check if YOCTO deb package is successfully generated."
+#echo "[DEBUG] Current path: $(pwd)."
+#source ${REFERENCE_REPOSITORY}/ci/taos/plugins-base/${audit_plugins[idx]}.sh
+# Note that do not append the below "$module_name" because build step is implemented as a built-in module partially
+
+
 
 ###### plugins-good ###############################################################################################
-echo "[MODULE] plugins-good: Plugins with good quality"
+echo "[MODULE] plugins-base: Plugin group that is maintained with good quality"
 # Please append your plugin modules here.
 
 
@@ -39,14 +51,14 @@ echo "[MODULE] plugins-good: Plugins with good quality"
 
 
 ###### plugins-staging ################################################################################################
-echo "[MODULE] plugins-staging: Plugins without enough evaluation and aging test"
+echo "[MODULE] plugins-staging: Plugin group that does not have evaluation and aging test enough"
 # Please append your plugin modules here.
 
-module_name="pr-audit-resource"
-echo "[DEBUG] $module_name is started."
-echo "[DEBUG] TAOS/$module_name: Check if there are not-installed resource files."
-echo "[DEBUG] Current path: $(pwd)."
-source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-staging/$module_name.sh
-$module_name
-echo "[DEBUG] $module_name is done."
+module_name="pr-audit-resource"
+echo "[DEBUG] $module_name is started."
+echo "[DEBUG] TAOS/$module_name: Check if there are not-installed resource files."
+echo "[DEBUG] Current path: $(pwd)."
+# source ${REFERENCE_REPOSITORY}/ci/taos/plugins-staging/$module_name.sh
+$module_name
+echo "[DEBUG] $module_name is done."
 
index 6acf323..06afedf 100644 (file)
 ##
 # @file config-plugins-format.sh
 # @brief add plugin modules for a github repository
-# @see      https://github.sec.samsung.net/STAR/TAOS-CI
+# @see      https://github.com/nnsuite/TAOS-CI
 # @author   Geunsik Lim <geunsik.lim@samsung.com>
-#
+
+
+##### Set environment for format plugins
+declare -i idx=-1
 
 ##################################################################################################################
-echo "[MODULE] plugins-good: Plugins with good quality"
+echo "[MODULE] plugins-good: Plugin group that is maintained with good quality"
 # Please append your plugin modules here.
 
-echo "pr-format-indent is starting."
-echo "[MODULE] TAOS/pr-format-indent: Check the code formatting style with GNU indent"
-echo "Current path: $(pwd)."
-echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-indent.sh"
-source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-indent.sh
-pr-format-indent
-echo "pr-format-indent is done."
-
-# echo "pr-format-clang is starting."
-# echo "[MODULE] TAOS/pr-format-clang: Check the code formatting style with clang-format"
-# echo "Current path: $(pwd)."
-# echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-clang.sh"
-# source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-clang.sh
-# pr-format-clang
-# echo "pr-format-clang is done."
-
-# echo "pr-format-exclusive-io is starting."
-# echo "[MODULE] TAOS/pr-format-exclusive-vio: Check issue #279. VIO commits should not touch non VIO files."
-# echo "Current path: $(pwd)."
-# echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-exclusive-vio.sh"
-# source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-exclusive-vio.sh
-# pr-format-exclusive-vio
-# echo "pr-format-exclusive-io is done."
-
-echo "pr-format-pylint is starting."
-echo "[MODULE] TAOS/pr-format-pylint: Check the code formatting style with pylint"
-echo "Current path: $(pwd)."
-echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-pylint.sh"
-source ${REFERENCE_REPOSITORY}/ci/standalone/plugins-good/pr-format-pylint.sh
-pr-format-pylint
-echo "pr-format-pylint is done."
+format_plugins[++idx]="pr-format-doxygen"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check a source code consists of required doxygen tags."
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-indent"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the code formatting style with GNU indent"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+
+#format_plugins[++idx]="pr-format-clang"
+# echo "${format_plugins[idx]} is starting."
+# echo "[MODULE] TAOS/${format_plugins[idx]}: Check the code formatting style with clang-format"
+# echo "The current path: $(pwd)."
+# echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+# source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+#format_plugins[++idx]="pr-format-exclusive-vio"
+# echo "${format_plugins[idx]} is starting."
+# echo "[MODULE] TAOS/${format_plugins[idx]}: Check issue #279. VIO commits should not touch non VIO files."
+# echo "The current path: $(pwd)."
+# echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+# source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-pylint"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the code formatting style with pylint"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-newline"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check if there is a newline issue in text files"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-rpm-spec"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check if there is incorrect staements in *.spec file"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-file-size"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the file size to not include big binary files"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-cppcheck"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the file size to not include big binary files"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-nobody"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the file size to not include big binary files"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-timestamp"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the file size to not include big binary files"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-format-executable"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the file size to not include big binary files"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+format_plugins[++idx]="pr-hardcoded-path"
+echo "${format_plugins[idx]} is starting."
+echo "[MODULE] TAOS/${format_plugins[idx]}: Check the file size to not include big binary files"
+echo "The current path: $(pwd)."
+echo "[DEBUG] source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh"
+source ${REFERENCE_REPOSITORY}/ci/taos/plugins-good/${format_plugins[idx]}.sh
+
+
 
 ##################################################################################################################
 echo "[MODULE] plugins-staging: Plugin group that does not have evaluation and aging test enough"
diff --git a/Documentation/ci-config/config-webhook.json b/Documentation/ci-config/config-webhook.json
new file mode 100644 (file)
index 0000000..4444cae
--- /dev/null
@@ -0,0 +1,8 @@
+{
+    "github": {
+        "website": "github.com",
+        "id": "taos-ci",
+        "email": "taos-ci@github.io",
+        "secret": "********"
+    }
+}