Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
42d31e38e4 | ||
|
|
16a01a9ea5 |
+31
-5
@@ -221,10 +221,36 @@ steps:
|
||||
ssh -o StrictHostKeyChecking=no root@$${SWARM_MANAGER_IP} "source /tmp/cs.sh
|
||||
create_or_update_secret 'gamma_auth_token' '$${GAMMA_AUTH_TOKEN}'";;
|
||||
git)
|
||||
ssh -o StrictHostKeyChecking=no root@$${SWARM_MANAGER_IP} "source /tmp/cs.sh
|
||||
create_or_update_secret 'git_db_password' '$${GIT_DB_PASSWORD}'
|
||||
create_or_update_secret 'git_runner_token' '$${GIT_RUNNER_TOKEN}'
|
||||
create_or_update_secret 'git_mcp_access_token' '$${GIT_MCP_ACCESS_TOKEN}'";;
|
||||
# PATTERN B, DELIBERATE (see decision notes) — git hosts the source
|
||||
# of truth for every other stack's compose files, so it must be
|
||||
# restorable from a flat git.yaml + git.env backup alone, with zero
|
||||
# dependency on a running Swarm's Docker secret store. Native Docker
|
||||
# secrets (Pattern C) can't satisfy that: they only exist inside an
|
||||
# already-running Swarm, which is exactly the circular dependency
|
||||
# this stack can't have. Mirrors the ai) case's grep -v + printf
|
||||
# rewrite-in-place approach, never sed (values may contain slash,
|
||||
# dollar sign, ampersand).
|
||||
#
|
||||
# TEST PHASE: target is git.env.pipelinetest, NOT the real git.env.
|
||||
# The real file is never opened for writing by this step. First run
|
||||
# seeds the test file from the real git.env (carries over all
|
||||
# non-secret lines untouched); every push after that only refreshes
|
||||
# the 3 secret lines below. Also strips the legacy GITEA_ACCESS_TOKEN
|
||||
# key name so the test file converges on the git.env.example-
|
||||
# documented GITEA_MCP_ACCESS_TOKEN key. Cutover to the real file —
|
||||
# and pointing git.yaml/stack-deploy at it — is a deliberate,
|
||||
# separate follow-up after manually diffing this render.
|
||||
ssh -o StrictHostKeyChecking=no root@$${SWARM_MANAGER_IP} "FILE=/volume1/docker/compose-files/git.env.pipelinetest
|
||||
TMP=\$FILE.tmp.\$\$
|
||||
[ -f \$FILE ] || cp /volume1/docker/compose-files/git.env \$FILE
|
||||
grep -vE '^(GITEA__database__PASSWD|GITEA_RUNNER_REGISTRATION_TOKEN|GITEA_MCP_ACCESS_TOKEN|GITEA_ACCESS_TOKEN)=' \$FILE > \$TMP 2>/dev/null || touch \$TMP
|
||||
{ cat \$TMP
|
||||
printf 'GITEA__database__PASSWD=%s\n' '$${GIT_DB_PASSWORD}'
|
||||
printf 'GITEA_RUNNER_REGISTRATION_TOKEN=%s\n' '$${GIT_RUNNER_TOKEN}'
|
||||
printf 'GITEA_MCP_ACCESS_TOKEN=%s\n' '$${GIT_MCP_ACCESS_TOKEN}'
|
||||
} > \$FILE
|
||||
rm -f \$TMP
|
||||
echo ' [OK] git.env.pipelinetest updated - real git.env untouched'";;
|
||||
homeassistant)
|
||||
ssh -o StrictHostKeyChecking=no root@$${SWARM_MANAGER_IP} "source /tmp/cs.sh
|
||||
create_or_update_secret 'homeassistant_frigate_rtsp_password' '$${HOMEASSISTANT_FRIGATE_RTSP_PASSWORD}'
|
||||
@@ -352,7 +378,7 @@ steps:
|
||||
|
||||
# Bootstrap-tier guard: file synced to host, deploy is MANUAL
|
||||
case "$STACK" in
|
||||
traefik|woodpecker|postgresql|secrets)
|
||||
traefik|woodpecker|postgresql|secrets|git)
|
||||
echo " [BOOTSTRAP] $STACK: file synced. Deploy is MANUAL."
|
||||
echo " Run: bash /volume1/docker/compose-files/deploy/stack-deploy.sh $STACK"
|
||||
continue ;;
|
||||
|
||||
Reference in New Issue
Block a user