Confirm docs-only changes no longer trigger a production deploy
This commit is contained in:
@@ -23,17 +23,24 @@ jobs:
|
||||
chmod 600 ~/.ssh/prod.pem
|
||||
ssh-keyscan -H "${{ secrets.EC2_HOST }}" >> ~/.ssh/known_hosts 2>/dev/null
|
||||
|
||||
- name: Report production Qdrant version
|
||||
run: |
|
||||
ssh -i ~/.ssh/prod.pem "ubuntu@${{ secrets.EC2_HOST }}" '
|
||||
sudo docker run --rm --network docker_default curlimages/curl -sf http://qdrant:6333/
|
||||
'
|
||||
|
||||
- name: Snapshot Qdrant collections on production
|
||||
run: |
|
||||
ssh -i ~/.ssh/prod.pem "ubuntu@${{ secrets.EC2_HOST }}" '
|
||||
set -e
|
||||
sudo docker run --rm --network docker_default curlimages/curl -sf -X POST http://qdrant:6333/collections/duocthu_v1/snapshots > /dev/null
|
||||
sudo docker run --rm --network docker_default curlimages/curl -sf -X POST http://qdrant:6333/collections/duocthu_v1__manifest/snapshots > /dev/null
|
||||
sleep 3
|
||||
SNAP=$(sudo docker exec docker-qdrant-1 ls -t /qdrant/storage/snapshots/duocthu_v1/ | head -1)
|
||||
SNAPM=$(sudo docker exec docker-qdrant-1 ls -t /qdrant/storage/snapshots/duocthu_v1__manifest/ | head -1)
|
||||
sudo docker cp "docker-qdrant-1:/qdrant/storage/snapshots/duocthu_v1/${SNAP}" /tmp/duocthu_v1.snapshot
|
||||
sudo docker cp "docker-qdrant-1:/qdrant/storage/snapshots/duocthu_v1__manifest/${SNAPM}" /tmp/duocthu_v1__manifest.snapshot
|
||||
snap() {
|
||||
collection="$1"; outfile="$2"
|
||||
name=$(sudo docker run --rm --network docker_default curlimages/curl -sf -X POST "http://qdrant:6333/collections/${collection}/snapshots" | grep -oP "\"name\":\"\K[^\"]+")
|
||||
test -n "$name"
|
||||
sudo docker run --rm --network docker_default curlimages/curl -sf "http://qdrant:6333/collections/${collection}/snapshots/${name}" > "$outfile"
|
||||
}
|
||||
snap duocthu_v1 /tmp/duocthu_v1.snapshot
|
||||
snap duocthu_v1__manifest /tmp/duocthu_v1__manifest.snapshot
|
||||
sudo chown ubuntu:ubuntu /tmp/duocthu_v1.snapshot /tmp/duocthu_v1__manifest.snapshot
|
||||
ls -la /tmp/*.snapshot
|
||||
'
|
||||
|
||||
Reference in New Issue
Block a user