CI: Server build cache (#29803)
Server build cache <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Chores** - Improved the caching process for release builds to enhance the efficiency of our deployment workflows. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
parent
b7c8c2b396
commit
b57fa957c2
50
.github/workflows/server-build.yml
vendored
50
.github/workflows/server-build.yml
vendored
|
|
@ -228,31 +228,31 @@ jobs:
|
|||
name: server-build
|
||||
path: app/server/dist/
|
||||
|
||||
#- name: Put release build in cache
|
||||
# if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||
# env:
|
||||
# cachetoken: ${{ secrets.APPSMITH_CI_TEST_PAT }}
|
||||
# reponame: ${{ github.event.repository.name }}
|
||||
# gituser: ${{ secrets.CACHE_GIT_USER }}
|
||||
# gituseremail: ${{ secrets.CACHE_GIT_EMAIL }}
|
||||
# run: |
|
||||
# pwd
|
||||
# tar -czvf server.jar dist/
|
||||
# mkdir cacherepo
|
||||
# cd ./cacherepo
|
||||
# git config --global user.email "$gituseremail"
|
||||
# git config --global user.name "$gituser"
|
||||
# git clone https://$cachetoken@github.com/appsmithorg/cibuildcache.git
|
||||
# git lfs install
|
||||
# cd cibuildcache/
|
||||
# if [ "$reponame" = "appsmith" ]; then export repodir="CE"; fi
|
||||
# if [ "$reponame" = "appsmith-ee" ]; then export repodir="EE"; fi
|
||||
# cd $repodir/release/server
|
||||
# cp ../../../../../server.jar ./
|
||||
# git lfs track "server.jar"
|
||||
# git add server.jar
|
||||
# git commit -m "Update Latest Server.jar"
|
||||
# git push
|
||||
- name: Put release build in cache
|
||||
if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
|
||||
env:
|
||||
cachetoken: ${{ secrets.CACHETOKEN }}
|
||||
reponame: ${{ github.event.repository.name }}
|
||||
gituser: ${{ secrets.CACHE_GIT_USER }}
|
||||
gituseremail: ${{ secrets.CACHE_GIT_EMAIL }}
|
||||
run: |
|
||||
pwd
|
||||
tar -czvf server.jar dist/
|
||||
mkdir cacherepo
|
||||
cd ./cacherepo
|
||||
git config --global user.email "$gituseremail"
|
||||
git config --global user.name "$gituser"
|
||||
git clone https://$cachetoken@github.com/appsmithorg/cibuildcache.git
|
||||
git lfs install
|
||||
cd cibuildcache/
|
||||
if [ "$reponame" = "appsmith" ]; then export repodir="CE"; fi
|
||||
if [ "$reponame" = "appsmith-ee" ]; then export repodir="EE"; fi
|
||||
cd $repodir/release/server
|
||||
cp ../../../../../server.jar ./
|
||||
git lfs track "server.jar"
|
||||
git add server.jar
|
||||
git commit -m "Update Latest Server.jar"
|
||||
git push
|
||||
|
||||
- name: Save the status of the run
|
||||
run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user