Skip to content

[Enhancement] Optimize the root path choosing logic on tablet creation #3444

[Enhancement] Optimize the root path choosing logic on tablet creation

[Enhancement] Optimize the root path choosing logic on tablet creation #3444

Workflow file for this run

name: MERGE PIPELINE
on:
pull_request_target:
branches:
- main
- 'branch*'
types:
- closed
jobs:
backport:
runs-on: ubuntu-latest
if: >
${{ github.event.pull_request.merged == true }} &&
github.base_ref == 'main' &&
!contains(github.event.pull_request.title, 'cherry-pick') &&
!contains(github.event.pull_request.title, 'backport') && (
contains(github.event.pull_request.labels.*.name, '3.1') ||
contains(github.event.pull_request.labels.*.name, '3.0') ||
contains(github.event.pull_request.labels.*.name, '2.5') ||
contains(github.event.pull_request.labels.*.name, '2.4') )
env:
PR_NUMBER: ${{ github.event.number }}
steps:
- name: backport branch-3.1
if: contains(github.event.pull_request.labels.*.name, '3.1')
uses: thollander/actions-comment-pull-request@v1
with:
message: |
@Mergifyio backport branch-3.1
GITHUB_TOKEN: ${{ secrets.PAT }}
- uses: actions-ecosystem/action-remove-labels@v1
if: contains(github.event.pull_request.labels.*.name, '3.1')
with:
labels: '3.1'
- name: backport branch-3.0
if: contains(github.event.pull_request.labels.*.name, '3.0')
uses: thollander/actions-comment-pull-request@v1
with:
message: |
@Mergifyio backport branch-3.0
GITHUB_TOKEN: ${{ secrets.PAT }}
- uses: actions-ecosystem/action-remove-labels@v1
if: contains(github.event.pull_request.labels.*.name, '3.0')
with:
labels: '3.0'
- name: backport branch-2.5
if: contains(github.event.pull_request.labels.*.name, '2.5')
uses: thollander/actions-comment-pull-request@v1
with:
message: |
@Mergifyio backport branch-2.5
GITHUB_TOKEN: ${{ secrets.PAT }}
- uses: actions-ecosystem/action-remove-labels@v1
if: contains(github.event.pull_request.labels.*.name, '2.5')
with:
labels: '2.5'
- name: backport branch-2.4
if: contains(github.event.pull_request.labels.*.name, '2.4')
uses: thollander/actions-comment-pull-request@v1
with:
message: |
@Mergifyio backport branch-2.4
GITHUB_TOKEN: ${{ secrets.PAT }}
- uses: actions-ecosystem/action-remove-labels@v1
if: contains(github.event.pull_request.labels.*.name, '2.4')
with:
labels: '2.4'
thirdparty-update-image:
runs-on: self-hosted
name: Thirdparty Update Image
if: github.event.pull_request.merged == true
env:
PR_NUMBER: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
steps:
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
thirdparty:
- 'thirdparty/**'
- 'docker/dockerfiles/dev-env/dev-env.Dockerfile'
- name: update image
if: steps.changes.outputs.thirdparty == 'true'
run: |
rm -rf ./elastic-service
cp -rf /var/lib/elastic-service ./elastic-service
cd elastic-service && git pull
./bin/elastic-update-image.sh $BRANCH $PR_NUMBER
close_msg:
runs-on: self-hosted
if: github.event.pull_request.merged == true && github.base_ref == 'main'
env:
PR_NUMBER: ${{ github.event.number }}
steps:
- name: commit_sha
id: commit_sha
run: |
set -x
commit_sha=`curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/pulls/${PR_NUMBER} 2>/dev/null \
| jq .merge_commit_sha`
commit_sha=$(echo ${commit_sha//\"})
echo "commit_sha=${commit_sha}" >> $GITHUB_OUTPUT
- name: update merged coverage
run: |
set -ex
rm -rf ./elastic-service
ln -s /var/lib/elastic-service ./elastic-service
cd elastic-service && git pull
./bin/upload_cov_after_merge.sh --pr ${PR_NUMBER} --commit ${{ steps.commit_sha.outputs.commit_sha }}