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:
yatinappsmith 2023-12-22 14:07:10 +05:30 committed by GitHub
parent b7c8c2b396
commit b57fa957c2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -228,31 +228,31 @@ jobs:
name: server-build name: server-build
path: app/server/dist/ path: app/server/dist/
#- name: Put release build in cache - name: Put release build in cache
# if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') if: success() && github.ref == 'refs/heads/release' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch')
# env: env:
# cachetoken: ${{ secrets.APPSMITH_CI_TEST_PAT }} cachetoken: ${{ secrets.CACHETOKEN }}
# reponame: ${{ github.event.repository.name }} reponame: ${{ github.event.repository.name }}
# gituser: ${{ secrets.CACHE_GIT_USER }} gituser: ${{ secrets.CACHE_GIT_USER }}
# gituseremail: ${{ secrets.CACHE_GIT_EMAIL }} gituseremail: ${{ secrets.CACHE_GIT_EMAIL }}
# run: | run: |
# pwd pwd
# tar -czvf server.jar dist/ tar -czvf server.jar dist/
# mkdir cacherepo mkdir cacherepo
# cd ./cacherepo cd ./cacherepo
# git config --global user.email "$gituseremail" git config --global user.email "$gituseremail"
# git config --global user.name "$gituser" git config --global user.name "$gituser"
# git clone https://$cachetoken@github.com/appsmithorg/cibuildcache.git git clone https://$cachetoken@github.com/appsmithorg/cibuildcache.git
# git lfs install git lfs install
# cd cibuildcache/ cd cibuildcache/
# if [ "$reponame" = "appsmith" ]; then export repodir="CE"; fi if [ "$reponame" = "appsmith" ]; then export repodir="CE"; fi
# if [ "$reponame" = "appsmith-ee" ]; then export repodir="EE"; fi if [ "$reponame" = "appsmith-ee" ]; then export repodir="EE"; fi
# cd $repodir/release/server cd $repodir/release/server
# cp ../../../../../server.jar ./ cp ../../../../../server.jar ./
# git lfs track "server.jar" git lfs track "server.jar"
# git add server.jar git add server.jar
# git commit -m "Update Latest Server.jar" git commit -m "Update Latest Server.jar"
# git push git push
- name: Save the status of the run - name: Save the status of the run
run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result run: echo "run_result=success" >> $GITHUB_OUTPUT > ~/run_result