Add stack-deploy.sh + envparse.py: safe env loading via Python for all stacks
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
admin
2026-06-22 22:57:51 -07:00
parent 81c97125ef
commit 3990ae8535
4 changed files with 53 additions and 38 deletions
+2 -2
View File
@@ -168,14 +168,14 @@ steps:
- |
YAML_FILES=$(echo "${CI_COMMIT_CHANGED_FILES}" | tr ',' '\n' | grep '\.yaml$' || true)
[ -z "$YAML_FILES" ] && echo "No yaml files changed" && exit 0
rsync -av -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" deploy/safe-deploy.sh root@192.168.4.32:/tmp/sd.sh
rsync -av -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" deploy/ root@192.168.4.32:/volume1/docker/compose-files/deploy/
for f in $YAML_FILES; do
[ -f "$f" ] || continue
STACK=$(basename "$f" .yaml)
rsync -av -e "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_rsa" \
"$f" root@192.168.4.32:/volume1/docker/compose-files/
ssh -o StrictHostKeyChecking=no root@192.168.4.32 \
"python3 /tmp/sd.sh ${STACK}" \
"bash /volume1/docker/compose-files/deploy/stack-deploy.sh $STACK" \
&& echo " OK $STACK" || { echo " FAIL $STACK"; exit 1; }
done
secrets: [ ssh_key ]