mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-24 09:28:31 +00:00
Merge pull request #10229 from ToolJet/feat/update-lts-machine
Updated CE LTS test system after release to develop branch
This commit is contained in:
commit
8c90192557
1 changed files with 51 additions and 0 deletions
|
|
@ -155,4 +155,55 @@ jobs:
|
|||
message="Job '${{ env.JOB_NAME }}' failed! tooljet/tooljet-ce:${{ github.event.inputs.image }}"
|
||||
fi
|
||||
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
|
||||
|
||||
update-lts-machine:
|
||||
runs-on: ubuntu-latest
|
||||
needs: build-tooljet-ce-image
|
||||
|
||||
if: "contains(github.event.release.tag_name, 'CE-LTS')"
|
||||
|
||||
steps:
|
||||
- name: SSH into GCP VM instance
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.GCP_CE_LTS_INSTANCE_IP }}
|
||||
username: ${{ secrets.GCP_USERNAME }}
|
||||
key: ${{ secrets.EC2_INSTANCE_SSH_KEY }}
|
||||
script: |
|
||||
ls -lah
|
||||
|
||||
# Stop the Docker containers
|
||||
sudo docker-compose down
|
||||
|
||||
# Check remaining images
|
||||
sudo docker images
|
||||
|
||||
# Remove the existing tooljet/* images
|
||||
sudo docker images -a | grep 'tooljet/' | awk '{print $3}' | xargs sudo docker rmi -f
|
||||
|
||||
# Check remaining images
|
||||
sudo docker images
|
||||
|
||||
# Update docker-compose.yml with the new image for tooljet service
|
||||
sed -i '/^[[:space:]]*tooljet:/,/^[[:space:]]*[^:]*$/ { /^[[:space:]]*image:[[:space:]]*tooljet\/tooljet-ce/s|\(image:[[:space:]]*\).*|\1tooljet/tooljet-ce:'"${{ github.event.inputs.image }}"'| }' docker-compose.yml
|
||||
|
||||
# check the updated docker-compose.yml file
|
||||
cat docker-compose.yaml
|
||||
|
||||
# Start the Docker containers
|
||||
sudo docker-compose up -d
|
||||
|
||||
#View containers
|
||||
sudo docker ps
|
||||
|
||||
- name: Send Slack Notification
|
||||
run: |
|
||||
if [[ "${{ job.status }}" == "success" ]]; then
|
||||
message="CE-LTS test system with updated the image: `tooljet/tooljet-ce:${{ github.event.inputs.image }}`"
|
||||
else
|
||||
message="Failed to update the CE LTS test system"
|
||||
fi
|
||||
|
||||
curl -X POST -H 'Content-type: application/json' --data "{\"text\":\"$message\"}" ${{ secrets.SLACK_WEBHOOK_URL }}
|
||||
Loading…
Reference in a new issue