[Tool] Fix image update failure in CI (#53667)

This commit is contained in:
andyziye 2024-12-06 15:28:22 +08:00 committed by GitHub
parent da57cae79e
commit aa3652607c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 10 deletions

View File

@ -138,18 +138,18 @@ jobs:
strategy:
fail-fast: false
matrix:
build_type: [ Release, ASAN ]
linux: [ centos7, ubuntu ]
steps:
- name: clean
run: |
rm -rf ${{ github.workspace }}
mkdir -p ${{ github.workspace }}
- name: Update Image (${{ matrix.build_type }})
- name: Update Image (${{ matrix.linux }})
id: update-image
if: needs.be-checker.outputs.output2 == 'true'
env:
linux_distro: ${{ matrix.build_type }}
linux_distro: ${{ matrix.linux }}
run: |
cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh
./bin/run-pr-update-image.sh
@ -157,7 +157,7 @@ jobs:
- name: Upload Thirdparty Result
uses: actions/upload-artifact@v4
with:
name: THIRDPARTY-RESULT-${{ matrix.build_type }}
name: THIRDPARTY-RESULT-${{ matrix.linux }}
path: image_cache.info
retention-days: 1
overwrite: true
@ -211,8 +211,6 @@ jobs:
env:
PR_NUMBER: ${{ github.event.number }}
BRANCH: ${{ github.base_ref }}
IMAGE_CACHE_ID: ${{ needs.thirdparty-info.outputs.ubuntu_image_cache_id }}
LINUX_DISTRO: ubuntu
steps:
- name: BRANCH INFO
id: branch
@ -227,10 +225,10 @@ jobs:
run: |
rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh
if [[ "${{ needs.be-checker.outputs.output2 }}" == 'true' ]]; then
export image_cache_id=${IMAGE_CACHE_ID}
export image_cache_id=${{ needs.thirdparty-info.outputs.centos7_image_cache_id }}
export image_tag=$BRANCH-$PR_NUMBER
fi
./bin/elastic-ut.sh --pr ${PR_NUMBER} --module be --branch ${{ steps.branch.outputs.branch }} --repository ${{ github.repository }} --linuxdistro ${LINUX_DISTRO}
./bin/elastic-ut.sh --pr ${PR_NUMBER} --module be --branch ${{ steps.branch.outputs.branch }} --repository ${{ github.repository }}
- name: clean ECI
if: always()
@ -448,7 +446,7 @@ jobs:
timeout-minutes: 60
run: |
rm -rf ./ci-tool && cp -rf /var/lib/ci-tool ./ci-tool && cd ci-tool && git pull && source lib/init.sh
./bin/elastic-ut.sh --pr ${PR_NUMBER} --module fe --branch ${{steps.branch.outputs.branch}} --build Release --repository ${{ github.repository }} --linuxdistro ubuntu
./bin/elastic-ut.sh --pr ${PR_NUMBER} --module fe --branch ${{steps.branch.outputs.branch}} --build Release --repository ${{ github.repository }}
- name: Clean ECI
if: always()
@ -509,4 +507,4 @@ jobs:
- name: Clean
run: |
rm -rf ${{ github.workspace }}/*
rm -rf ${{ github.workspace }}/*