This is an automated email from the ASF dual-hosted git repository.

zhangstar333 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new 02b27c16731 [ci](trigger) support "run performance" (#29259)
02b27c16731 is described below

commit 02b27c16731702df4b1b6776471cca965bddecac
Author: Dongyang Li <hello_step...@qq.com>
AuthorDate: Fri Dec 29 14:21:23 2023 +0800

    [ci](trigger) support "run performance" (#29259)
    
    * [ci](trigger) support "run performance"
    Co-authored-by: stephen <hello-step...@qq.com>
---
 .github/workflows/comment-to-trigger-teamcity.yml | 23 +++++++++++++++++++++--
 regression-test/pipeline/common/github-utils.sh   |  2 +-
 regression-test/pipeline/common/teamcity-utils.sh |  2 ++
 regression-test/pipeline/performance/prepare.sh   |  4 ++--
 4 files changed, 26 insertions(+), 5 deletions(-)

diff --git a/.github/workflows/comment-to-trigger-teamcity.yml 
b/.github/workflows/comment-to-trigger-teamcity.yml
index eb81eff09e5..7634a8ead5b 100644
--- a/.github/workflows/comment-to-trigger-teamcity.yml
+++ b/.github/workflows/comment-to-trigger-teamcity.yml
@@ -47,7 +47,8 @@ jobs:
             "${COMMENT_BODY}" == *'run pipelinex_p0'* ||
             "${COMMENT_BODY}" == *'run clickbench'* ||
             "${COMMENT_BODY}" == *'run arm'* ||
-            "${COMMENT_BODY}" == *'run tpch'* ]]; then
+            "${COMMENT_BODY}" == *'run tpch'* ||
+            "${COMMENT_BODY}" == *'run performance'* ]]; then
             echo "comment_trigger=true" | tee -a "$GITHUB_OUTPUT"
         else
             echo "comment_trigger=false" | tee -a "$GITHUB_OUTPUT"
@@ -63,7 +64,7 @@ jobs:
         echo "TARGET_BRANCH='${TARGET_BRANCH}'" | tee -a "$GITHUB_OUTPUT"
         echo "COMMENT_BODY='${COMMENT_BODY}'" | tee -a "$GITHUB_OUTPUT"
 
-        reg="run 
(buildall|compile|p0|p1|feut|beut|external|clickbench|pipelinex_p0|arm|tpch)( 
[1-9]*[0-9]+)*"
+        reg="run 
(buildall|compile|p0|p1|feut|beut|external|clickbench|pipelinex_p0|arm|tpch|performance)(
 [1-9]*[0-9]+)*"
         COMMENT_TRIGGER_TYPE="$(echo -e "${COMMENT_BODY}" | xargs | grep -E 
"${reg}" | awk -F' ' '{print $2}' | sed -n 1p | sed 's/\r//g')"
         COMMENT_REPEAT_TIMES="$(echo -e "${COMMENT_BODY}" | xargs | grep -E 
"${reg}" | awk -F' ' '{print $3}' | sed -n 1p | sed 's/\r//g')"
         echo "COMMENT_TRIGGER_TYPE=${COMMENT_TRIGGER_TYPE}" | tee -a 
"$GITHUB_OUTPUT"
@@ -113,6 +114,11 @@ jobs:
           else
             echo "changed_p1=false" | tee -a "$GITHUB_OUTPUT"
           fi
+          if file_changed_performance; then
+            echo "changed_performance=true" | tee -a "$GITHUB_OUTPUT"
+          else
+            echo "changed_performance=false" | tee -a "$GITHUB_OUTPUT"
+          fi
         else
           echo "INFO: failed to _get_pr_changed_files, default trigger all"
           echo "changed_fe_ut=true" | tee -a "$GITHUB_OUTPUT"
@@ -124,6 +130,7 @@ jobs:
           echo "changed_pipelinex_p0=true" | tee -a "$GITHUB_OUTPUT"
           echo "changed_arm=true" | tee -a "$GITHUB_OUTPUT"
           echo "changed_p1=true" | tee -a "$GITHUB_OUTPUT"
+          echo "changed_performance=true" | tee -a "$GITHUB_OUTPUT"
         fi
 
     # - name: "Setup tmate session"
@@ -266,3 +273,15 @@ jobs:
           "${{ steps.parse.outputs.COMMIT_ID_FROM_TRIGGER }}" \
           "tpch" \
           "${{ steps.parse.outputs.COMMENT_REPEAT_TIMES }}"
+
+    - name: "Trigger or Skip performance"
+      if: ${{ fromJSON(steps.parse.outputs.comment_trigger) && 
contains(fromJSON('["performance", "buildall"]'), 
steps.parse.outputs.COMMENT_TRIGGER_TYPE) }}
+      run: |
+        source ./regression-test/pipeline/common/teamcity-utils.sh
+        set -x
+        trigger_or_skip_build \
+          "${{ steps.changes.outputs.changed_performance }}" \
+          "${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
+          "${{ steps.parse.outputs.COMMIT_ID_FROM_TRIGGER }}" \
+          "performance" \
+          "${{ steps.parse.outputs.COMMENT_REPEAT_TIMES }}"
diff --git a/regression-test/pipeline/common/github-utils.sh 
b/regression-test/pipeline/common/github-utils.sh
index ecf7a055df0..687d9c589b9 100644
--- a/regression-test/pipeline/common/github-utils.sh
+++ b/regression-test/pipeline/common/github-utils.sh
@@ -298,7 +298,7 @@ file_changed_ckb() {
     echo "return no need" && return 1
 }
 
-file_changed_perf() {
+file_changed_performance() {
     local all_files
     all_files=$(cat all_files)
     if _only_modified_regression_conf; then echo "return no need" && return 1; 
fi
diff --git a/regression-test/pipeline/common/teamcity-utils.sh 
b/regression-test/pipeline/common/teamcity-utils.sh
index fff7048ce17..8e780d6f83f 100644
--- a/regression-test/pipeline/common/teamcity-utils.sh
+++ b/regression-test/pipeline/common/teamcity-utils.sh
@@ -35,6 +35,7 @@ comment_to_pipeline=(
     ['pipelinex_p0']='Doris_DorisRegression_P0RegressionPipelineX'
     ['arm']='Doris_ArmPipeline_P0Regression'
     ['tpch']='Tpch_TpchSf100'
+    ['performance']='Doris_PerformanceNew_Performance'
 )
 
 # github中评论的要触发的流水线名字
@@ -54,6 +55,7 @@ conment_to_context=(
     ['clickbench']='clickbench-new (clickbench)'
     ['arm']='P0 Regression (ARM pipeline)'
     ['tpch']='tpch-sf100 (tpch)'
+    ['performance']='performance (Performance New)'
 )
 
 get_commit_id_of_build() {
diff --git a/regression-test/pipeline/performance/prepare.sh 
b/regression-test/pipeline/performance/prepare.sh
index c96a0c86294..b3b54b85b28 100644
--- a/regression-test/pipeline/performance/prepare.sh
+++ b/regression-test/pipeline/performance/prepare.sh
@@ -68,10 +68,10 @@ fi
 source "$(bash 
"${teamcity_build_checkoutDir}"/regression-test/pipeline/common/get-or-set-tmp-env.sh
 'get')"
 if ${skip_pipeline:=false}; then echo "INFO: skip build pipline" && exit 0; 
else echo "INFO: no skip"; fi
 # shellcheck source=/dev/null
-# _get_pr_changed_files file_changed_perf
+# _get_pr_changed_files file_changed_performance
 source 
"${teamcity_build_checkoutDir}"/regression-test/pipeline/common/github-utils.sh
 if _get_pr_changed_files "${pull_request_num}"; then
-    if ! file_changed_perf; then
+    if ! file_changed_performance; then
         bash 
"${teamcity_build_checkoutDir}"/regression-test/pipeline/common/get-or-set-tmp-env.sh
 'set' "export skip_pipeline=true"
         exit 0
     fi


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to