Skip to content

Commit

Permalink
[ci](trigger) support trigger branch-3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen committed Jul 31, 2024
1 parent 6fdce0d commit 5e36f64
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions .github/workflows/comment-to-trigger-teamcity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ jobs:
set -x
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-2.0'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-3.0'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-2.1'" ]]; then
trigger_or_skip_build \
"${{ steps.changes.outputs.changed_fe_ut }}" \
Expand All @@ -158,7 +159,7 @@ jobs:
"feut" \
"${{ steps.parse.outputs.COMMENT_REPEAT_TIMES }}"
else
echo "PR target branch is not in (master, branch-2.0, branch-2.1), skip run feut"
echo "PR target branch is not in (master, branch-2.0, branch-2.1, branch-3.0), skip run feut"
trigger_or_skip_build \
"false" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
Expand All @@ -175,6 +176,7 @@ jobs:
set -x
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-2.0'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-3.0'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-2.1'" ]]; then
trigger_or_skip_build \
"${{ steps.changes.outputs.changed_be_ut }}" \
Expand All @@ -183,7 +185,7 @@ jobs:
"beut" \
"${{ steps.parse.outputs.COMMENT_REPEAT_TIMES }}"
else
echo "PR target branch is not in (master, branch-2.0, branch-2.1), skip run beut"
echo "PR target branch is not in (master, branch-2.0, branch-2.1, branch-3.0), skip run beut"
trigger_or_skip_build \
"false" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
Expand All @@ -197,15 +199,16 @@ jobs:
run: |
source ./regression-test/pipeline/common/teamcity-utils.sh
set -x
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ]]; then
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-3.0'" ]]; then
trigger_or_skip_build \
"${{ steps.changes.outputs.changed_cloud_ut }}" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
"${{ steps.parse.outputs.COMMIT_ID_FROM_TRIGGER }}" \
"cloudut" \
"${{ steps.parse.outputs.COMMENT_REPEAT_TIMES }}"
else
echo "PR target branch is not master, skip run cloudut"
echo "PR target branch is not in (master, branch-3.0), skip run cloudut"
fi
- name: "Trigger or Skip compile"
Expand Down Expand Up @@ -279,16 +282,17 @@ jobs:
echo "COMMENT_TRIGGER_TYPE is buildall, trigger compile is enough, compile will trigger cloud_p0" && exit
fi
set -x
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ]]; then
echo "PR target branch in (master), need run cloud_p0"
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-3.0'" ]]; then
echo "PR target branch is in (master, branch-3.0), need run cloud_p0"
trigger_or_skip_build \
"${{ steps.changes.outputs.changed_cloud_p0 }}" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
"${{ steps.parse.outputs.COMMIT_ID_FROM_TRIGGER }}" \
"cloud_p0" \
"${{ steps.parse.outputs.COMMENT_REPEAT_TIMES }}"
else
echo "PR target branch not in (master), skip run cloud_p0"
echo "PR target branch is not in (master, branch-3.0), skip run cloud_p0"
trigger_or_skip_build \
"false" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
Expand All @@ -305,16 +309,17 @@ jobs:
echo "COMMENT_TRIGGER_TYPE is buildall, trigger compile is enough, compile will trigger cloud_p1" && exit
fi
set -x
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ]]; then
echo "PR target branch in (master), need run cloud_p1"
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-3.0'" ]]; then
echo "PR target branch is in (master, branch-3.0), need run cloud_p1"
trigger_or_skip_build \
"${{ steps.changes.outputs.changed_cloud_p1 }}" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
"${{ steps.parse.outputs.COMMIT_ID_FROM_TRIGGER }}" \
"cloud_p1" \
"${{ steps.parse.outputs.COMMENT_REPEAT_TIMES }}"
else
echo "PR target branch not in (master), skip run cloud_p1"
echo "PR target branch is not in (master, branch-3.0), skip run cloud_p1"
trigger_or_skip_build \
"false" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
Expand All @@ -341,16 +346,17 @@ jobs:
source ./regression-test/pipeline/common/teamcity-utils.sh
set -x
if [[ "${{ steps.parse.outputs.TARGET_BRANCH }}" == "'master'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-3.0'" ||
"${{ steps.parse.outputs.TARGET_BRANCH }}" == "'branch-2.0'" ]]; then
echo "PR target branch in (master, branch-2.0), need run performance"
echo "PR target branch is in (master, branch-2.0, branch-3.0), need run performance"
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 }}"
else
echo "PR target branch not in (master, branch-2.0), skip run performance"
echo "PR target branch is not in (master, branch-2.0, branch-3.0), skip run performance"
trigger_or_skip_build \
"false" \
"${{ steps.parse.outputs.PULL_REQUEST_NUM }}" \
Expand Down

0 comments on commit 5e36f64

Please sign in to comment.