drone: scope have_secret to the new stack — old stack's secrets satisfied the check post-rename
continuous-integration/drone/push Build is pending

This commit is contained in:
2026-09-21 17:00:29 +00:00
parent c5106bc1eb
commit afe7a10758
+4 -1
View File
@@ -52,7 +52,10 @@ let
set_env DRONE_ENV_VERSION "v1"
set_env COMPOSE_FILE '"compose.yml:compose.gitea.yml"'
have_secret() { docker secret ls --format '{{.Name}}' | grep -q "_$1_v1$"; }
# Stack-scoped: secret names are prefixed with the app's stack name, so during the
# 2026-09 domain rename the OLD stack's *_rpc_secret_v1 must not satisfy this check.
DRONE_STACK="drone_ci_autonomic_zone"
have_secret() { docker secret ls --format '{{.Name}}' | grep -q "^${DRONE_STACK}_$1_v1$"; }
have_secret rpc_secret || abra app secret insert "$DRONE_DOMAIN" rpc_secret v1 /run/secrets/drone_rpc_secret -f -n
have_secret client_secret || abra app secret insert "$DRONE_DOMAIN" client_secret v1 /run/secrets/drone_gitea_client_secret -f -n